<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Display current task within a process instance in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97644#M67227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This class is part of activiti-engine, otherwise it wouldn't work.. What import are you using? the class is in org.activiti.engine.impl.RepositoryServiceImpl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Mar 2013 10:56:40 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-03-28T10:56:40Z</dc:date>
    <item>
      <title>Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97638#M67221</link>
      <description>I think this question has been asked before but I have never managed to track down an answerIs there any way to display the process diagram AND show which task the user is currently on. I have seen mention of the ProcessDiagramImageGenerator API but cannot find anything that shows the way to show th</description>
      <pubDate>Mon, 16 Jul 2012 15:06:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97638#M67221</guid>
      <dc:creator>mikepoole</dc:creator>
      <dc:date>2012-07-16T15:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97639#M67222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; public static InputStream generateDiagram(ProcessDefinitionEntity processDefinition, String imageType, List&amp;lt;String&amp;gt; highLightedActivities) {&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Example usage in activiti-explorer code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processInstance&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getProcessDefinitionId());&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (processDefinition != null &amp;amp;&amp;amp; processDefinition.isGraphicalNotationDefined()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InputStream definitionImageStream = ProcessDiagramGenerator.generateDiagram(processDefinition, "png", &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runtimeService.getActiveActivityIds(processInstance.getId()));&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 06:53:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97639#M67222</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-17T06:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97640#M67223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Frederik&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I attempt to run this code…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt; ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml").buildProcessEngine();&lt;BR /&gt;&amp;nbsp; RuntimeService runtimeService = processEngine.getRuntimeService();&lt;BR /&gt;&amp;nbsp; RepositoryService repositoryService = processEngine.getRepositoryService();&lt;BR /&gt;&amp;nbsp; ProcessDefinitionQuery processDefQ = repositoryService.createProcessDefinitionQuery().processDefinitionKey("ProcessDEADLINE");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; System.out.println("Count: " + processDefQ.count());&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; for(ProcessDefinition p: processDefQ.list()){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(p.getVersion() == processDefQ.count()){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInstance pi = runtimeService.createProcessInstanceQuery().processDefinitionId(p.getId()).singleResult();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InputStream is = ProcessDiagramGenerator.generateDiagram((ProcessDefinitionEntity) p, "png", runtimeService.getActiveActivityIds(pi.getId()));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutputStream out = new FileOutputStream(new File("C:\\Mike data\\Diagram.png"));&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int read = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] bytes = new byte[1024];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((read = is.read(bytes)) != -1) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.write(bytes, 0, read);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is.close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.flush();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.close();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the following error…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Exception in thread "main" java.awt.image.RasterFormatException: (x + width) is outside raster&lt;BR /&gt; at sun.awt.image.IntegerInterleavedRaster.createWritableChild(IntegerInterleavedRaster.java:450)&lt;BR /&gt; at java.awt.image.BufferedImage.getSubimage(BufferedImage.java:1156)&lt;BR /&gt; at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramCanvas.generateImage(ProcessDiagramCanvas.java:166)&lt;BR /&gt; at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator.generateDiagram(ProcessDiagramGenerator.java:236)&lt;BR /&gt; at org.iop.production.ProcessDiagramImageGenerator.main(ProcessDiagramImageGenerator.java:38)&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have checked my XML file (created via the Eclipse plugin) and it appears that all elements have a name and x and y co-ordinates and the XML has all the DI information&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 14:09:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97640#M67223</guid>
      <dc:creator>mikepoole</dc:creator>
      <dc:date>2012-07-17T14:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97641#M67224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please use the code I gave you, not sure this is causing the issue you mention, but it's the way you should use it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processInstance&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getProcessDefinitionId());&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the query to obtain a processDefinition doesn't initialize in internal activity-structure, rather it's just a entity representing database-row…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 14:16:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97641#M67224</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-17T14:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97642#M67225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Frederik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is absolutely superb!!!! Works like a dream&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I was trying to also find my way round the Engine API and whole relationships so I seemed to just cherry pick the bits I thought I needed from your code! Won't make that mistake again!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many many thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 14:42:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97642#M67225</guid>
      <dc:creator>mikepoole</dc:creator>
      <dc:date>2012-07-17T14:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97643#M67226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Frederic i tried to use this* code but RepositoryServiceImpl is not recognized as a class what am i missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processInstance&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getProcessDefinitionId());&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 09:35:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97643#M67226</guid>
      <dc:creator>fchatzia</dc:creator>
      <dc:date>2013-03-28T09:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97644#M67227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This class is part of activiti-engine, otherwise it wouldn't work.. What import are you using? the class is in org.activiti.engine.impl.RepositoryServiceImpl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 10:56:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97644#M67227</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-03-28T10:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97645#M67228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you very much frederik for the&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;immediate answer, i suppose that eclipse has a bad day and doesn't make suggestions. When i import the class you wrote the problem was solved.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 12:09:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97645#M67228</guid>
      <dc:creator>fchatzia</dc:creator>
      <dc:date>2013-03-28T12:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97646#M67229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Example is working fine…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can we export the active task diagram &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ie. i have a large process diagram, so don't want to export the whole diagram, instead i wish if it is possible to export the cropped digram that shows only active task with surrounding tasks only…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 13:17:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97646#M67229</guid>
      <dc:creator>mixit_em</dc:creator>
      <dc:date>2016-05-19T13:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97647#M67230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , Is there any way to get current task and next task?&lt;/P&gt;&lt;P&gt;I would prefer any&amp;nbsp; REST API if available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 10:03:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97647#M67230</guid>
      <dc:creator>raviksoni25</dc:creator>
      <dc:date>2018-01-10T10:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97648#M67231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please use this rest api to get current task.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.activiti.org/userguide/#_get_diagram_for_a_process_instance" title="https://www.activiti.org/userguide/#_get_diagram_for_a_process_instance" rel="nofollow noopener noreferrer"&gt;Activiti User Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to get&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;next task too, you need to make custom logic useing&amp;nbsp;&lt;SPAN style="color: #24292e;"&gt;ProcessDiagramGenerator.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #24292e;"&gt;&lt;A class="link-titled" href="https://github.com/Activiti/Activiti/tree/6.x/modules/activiti-image-generator/src/main/java/org/activiti/image" title="https://github.com/Activiti/Activiti/tree/6.x/modules/activiti-image-generator/src/main/java/org/activiti/image" rel="nofollow noopener noreferrer"&gt;Activiti/modules/activiti-image-generator/src/main/java/org/activiti/image at 6.x · Activiti/Activiti · GitHub&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #24292e;"&gt;The following url is my sample using&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;ProcessDiagramGenerator.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #24292e;"&gt;In addition to this sample, it is necessary to add custom logic to acquire an activity ID to be independently connected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/daisuke-yoshimoto/generateDiagram/blob/master/src/main/java/generateDiagram/GenerateDiagramSample.java" title="https://github.com/daisuke-yoshimoto/generateDiagram/blob/master/src/main/java/generateDiagram/GenerateDiagramSample.java" rel="nofollow noopener noreferrer"&gt;generateDiagram/GenerateDiagramSample.java at master · daisuke-yoshimoto/generateDiagram · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 03:00:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97648#M67231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-11T03:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Display current task within a process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97649#M67232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; margin: 20px 0px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;how I can set variable processInstance? ProcessInstance processInstance = ???&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;/DIV&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; font-size: 14px; margin: 20px 0px 0px;"&gt;&lt;DIV class="" data-comment-id="841846" style="color: #8b8b8b; border: none; font-weight: inherit; font-size: 0.8571rem;"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 08:12:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/display-current-task-within-a-process-instance/m-p/97649#M67232</guid>
      <dc:creator>nhhao1996</dc:creator>
      <dc:date>2019-02-21T08:12:24Z</dc:date>
    </item>
  </channel>
</rss>

