<?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 Generating diagram form process instance always stays on the same initial task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/generating-diagram-form-process-instance-always-stays-on-the/m-p/207951#M161081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using Activiti in a spring boot application and have a process that has the first activity as asynch as explained in this forum to get it executed from a rest call without keeping the API stuck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The API return the processID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A second API query for the image of the running process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public InputStream getProcessImage(String id){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("ProcessID:"+id);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProcessInstance pi;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pi = runtimeService.createProcessInstanceQuery().processInstanceId(id).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (pi == null){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("Process execution:"+pi.getId());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BpmnModel bmod = processEngine.getRepositoryService().getBpmnModel(pi.getProcessDefinitionId());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&amp;lt;String&amp;gt; actact = runtimeService.getActiveActivityIds(id);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("ActiveActivities:"+actact.toString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return new DefaultProcessDiagramGenerator().generateDiagram(bmod,"png",actact);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The active activity is always the first one and the image always has that activiti highlighted even if the process executes normally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any hints?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2015 13:37:25 GMT</pubDate>
    <dc:creator>gioppoluca</dc:creator>
    <dc:date>2015-04-23T13:37:25Z</dc:date>
    <item>
      <title>Generating diagram form process instance always stays on the same initial task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/generating-diagram-form-process-instance-always-stays-on-the/m-p/207951#M161081</link>
      <description>I'm using Activiti in a spring boot application and have a process that has the first activity as asynch as explained in this forum to get it executed from a rest call without keeping the API stuck.The API return the processIDA second API query for the image of the running process:Here is the method</description>
      <pubDate>Thu, 23 Apr 2015 13:37:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/generating-diagram-form-process-instance-always-stays-on-the/m-p/207951#M161081</guid>
      <dc:creator>gioppoluca</dc:creator>
      <dc:date>2015-04-23T13:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Generating diagram form process instance always stays on the same initial task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/generating-diagram-form-process-instance-always-stays-on-the/m-p/207952#M161082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;can you create jUnit test?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.activiti.org/content/sticky-how-write-unit-test" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/content/sticky-how-write-unit-test&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 06:28:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/generating-diagram-form-process-instance-always-stays-on-the/m-p/207952#M161082</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2015-04-24T06:28:57Z</dc:date>
    </item>
  </channel>
</rss>

