<?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: Using getActiveActivityIds() with a parrallel gateway in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112073#M78842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a test project that demonstrates the failing test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more confusing thing is, I have added a simple groovy scriptTask to just print to the console after each receiveTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scriptTask prints as expected after the first receiveTask but does not print after the second receiveTask (regardless of whether these is a gateway or not), any idea why that would happen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2012 13:57:14 GMT</pubDate>
    <dc:creator>donovanmuller</dc:creator>
    <dc:date>2012-07-04T13:57:14Z</dc:date>
    <item>
      <title>Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112068#M78837</link>
      <description>Hi,I'm experiencing an issue using runtimeService.getActiveActivityIds() on a process that contains a parallel gateway.The attached screenshot shows my test process.Basically, I have a receiveTask before the gateway. After starting a process instance, I call getActiveActivityIds() with the process i</description>
      <pubDate>Wed, 04 Jul 2012 10:46:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112068#M78837</guid>
      <dc:creator>donovanmuller</dc:creator>
      <dc:date>2012-07-04T10:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112069#M78838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If there second signal works as expected, that means that there was indeed a receive-taks waiting in a (sub)execution of the process-instance. So in theory, the active activity list shouldn't be null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When calling runtimeService.getActiveActivityIds(), the active activity in the given execution are returned (if execution is active) and the ones that are active in it's child-executions (ant recessively in all it's children). The only way the receive-task is not seen as an "active" activity is that the&amp;nbsp; sub-execution is not active… I'll look a bit deeper into this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 10:55:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112069#M78838</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-04T10:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112070#M78839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a unit-test for the problem you're describing (trunk - 5.10-SNAPSHOT):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;### Eclipse Workspace Patch 1.0&lt;BR /&gt;#P activiti-engine&lt;BR /&gt;Index: src/test/java/org/activiti/engine/test/api/runtime/RuntimeServiceTest.java&lt;BR /&gt;===================================================================&lt;BR /&gt;— src/test/java/org/activiti/engine/test/api/runtime/RuntimeServiceTest.java (revision 3512)&lt;BR /&gt;+++ src/test/java/org/activiti/engine/test/api/runtime/RuntimeServiceTest.java (working copy)&lt;BR /&gt;@@ -197,6 +197,21 @@&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals(1, activities.size());&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp; @Deployment(resources={&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; "org/activiti/engine/test/api/oneReceiveTaskProcess.bpmn20.xml"})&lt;BR /&gt;+&amp;nbsp; public void testFindActiveActivityIdsReceiveTask() {&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneReceiveTaskProcess");&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;String&amp;gt; activities = runtimeService.getActiveActivityIds(processInstance.getId());&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; assertNotNull(activities);&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals(1, activities.size());&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; runtimeService.signal(processInstance.getId());&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; activities = runtimeService.getActiveActivityIds(processInstance.getId());&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; assertNotNull(activities);&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals(1, activities.size());&lt;BR /&gt;+&amp;nbsp; }&lt;BR /&gt;+&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; public void testFindActiveActivityIdsUnexistingExecututionId() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runtimeService.getActiveActivityIds("unexistingExecutionId");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Index: src/test/resources/org/activiti/engine/test/api/oneReceiveTaskProcess.bpmn20.xml&lt;BR /&gt;===================================================================&lt;BR /&gt;— src/test/resources/org/activiti/engine/test/api/oneReceiveTaskProcess.bpmn20.xml (revision 0)&lt;BR /&gt;+++ src/test/resources/org/activiti/engine/test/api/oneReceiveTaskProcess.bpmn20.xml (revision 0)&lt;BR /&gt;@@ -0,0 +1,31 @@&lt;BR /&gt;+&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;+&amp;lt;definitions&lt;BR /&gt;+&amp;nbsp; xmlns="&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;"&lt;BR /&gt;+&amp;nbsp; xmlns:activiti="&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;"&lt;BR /&gt;+&amp;nbsp; targetNamespace="Examples"&amp;gt;&lt;BR /&gt;+&lt;BR /&gt;+&amp;nbsp; &amp;lt;process id="oneReceiveTaskProcess" name="The One Receive Rask Process"&amp;gt;&lt;BR /&gt;+&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="theStart" /&amp;gt; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow1" sourceRef="theStart" targetRef="firstReceive" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;receiveTask id="firstReceive" name="First Receive" /&amp;gt;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="firstReceive" targetRef="fork" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;parallelGateway id="fork" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="fork" targetRef="receivePayment" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="fork" targetRef="shipOrder" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;receiveTask id="receivePayment" name="Receive Payment" /&amp;gt;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="receivePayment" targetRef="theEnd" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;manualTask id="shipOrder" name="Ship Order" /&amp;gt; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="shipOrder" targetRef="theEnd" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="theEnd" /&amp;gt;&lt;BR /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;+&amp;nbsp; &amp;lt;/process&amp;gt;&lt;BR /&gt;+&lt;BR /&gt;+&amp;lt;/definitions&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems like it runs green (I replaced the scriptTask with a manual-task, but they behave the same when it comes to process-flow). When are you actually calling the "getActiveActivities()"? I presume not in the script-task but in your code that is consuming the API, right after the first signal() call?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a suggestion: try to use a parallel gateway to join the two parallel executions again, see &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#bpmnParallelGateway" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#bpmnParallelGateway&lt;/A&gt;&lt;SPAN&gt;. if this makes no difference, can you pour your process into a failing test-case?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 11:11:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112070#M78839</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-04T11:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112071#M78840</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;BR /&gt;&lt;SPAN&gt;Thanks for the quick reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have run your test case and it fails (Activiti 5.9):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;assertEquals(1, activities.size()); –&amp;gt; junit.framework.AssertionFailedError: expected:&amp;lt;1&amp;gt; but was:&amp;lt;0&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added another test case modifying your process but with no gateway in and it passed successfully. So definitely something fishy when the receiveTask is "in" a gateway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Activiti as an embedded workflow engine in a spring app that is exposed as a RESTful web service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two separate calls to resume the process (when a receiveTask is waiting) and to get the current active activities (hence the use of getActiveActivities())&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the calls to signal() and getActive…() are not directly below each other in code. Would this affect it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try your other suggestion regarding the gateway now…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 13:05:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112071#M78840</guid>
      <dc:creator>donovanmuller</dc:creator>
      <dc:date>2012-07-04T13:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112072#M78841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would only affect something if the call to getActiveActivityIds() was made from within the process (JavaDelegate, execution listener, …) which is not recommended. So your approach is perfectly fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The failing test on 5.9 indicates that there is a fix comitted on trunk regarding parallel gateways. Not sure for what issue though…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 13:24:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112072#M78841</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-04T13:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112073#M78842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a test project that demonstrates the failing test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more confusing thing is, I have added a simple groovy scriptTask to just print to the console after each receiveTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scriptTask prints as expected after the first receiveTask but does not print after the second receiveTask (regardless of whether these is a gateway or not), any idea why that would happen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 13:57:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112073#M78842</guid>
      <dc:creator>donovanmuller</dc:creator>
      <dc:date>2012-07-04T13:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112074#M78843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The test doesn't actually signal the second task, maybe that's why the second println doesn't show through.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Confirmed with your tests, 5.9 fails and 5.10-SNAPSHOT is successful. So you rather wait for 5.10 final or use a snapshot for now to overcome the issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 14:14:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112074#M78843</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-04T14:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112075#M78844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, stupid mistake on my side. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've added a second signal to the test case but now the process with the "return" gateway, as per your suggestion, fails when trying to signal the second receiveTask with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SEVERE: EXCEPTION: org.activiti.engine.ActivitiException: this activity doesn't accept signals&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why this would happen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When is 5.10 final expected?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 14:24:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112075#M78844</guid>
      <dc:creator>donovanmuller</dc:creator>
      <dc:date>2012-07-04T14:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using getActiveActivityIds() with a parrallel gateway</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112076#M78845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;5.10 is scheduled for 1st of August (&lt;/SPAN&gt;&lt;A href="https://jira.codehaus.org/browse/ACT/fixforversion/18341" rel="nofollow noopener noreferrer"&gt;https://jira.codehaus.org/browse/ACT/fixforversion/18341&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure all your sequence-flows are valid in the processes you're testing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 06:09:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-getactiveactivityids-with-a-parrallel-gateway/m-p/112076#M78845</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-05T06:09:46Z</dc:date>
    </item>
  </channel>
</rss>

