<?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 Modeling a 'loop' in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165091#M118800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;HI all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a strange situation that I cannot solve, even though reading the docs, it seems that it should be feasible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a task (Java Service Task) that should be invoked after an external event (modeled with a signal) happens. When the task executes, it reads the content of the message that was associated with the event (we serialize the content of such message in the process variables) and acts accordingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What can happen is that the content of the event may be of interest to only ne of the various instances of the same activiti processes running (think a multi-customer scenario).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Plus we're waiting a set number of such events (say 5) in the same process, but we don't know the order in which they come and we don't know at design time how many of these events will happen (process A may have 5, process B may have 3 and a next iteration of A may have only 4).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending if the event is handled or not by the task, then:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if the task doesn't handle the event, it should just loop back to the signal handler and wait&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if the task handles the event, then it should move the execution forward, but ALSO wait again if not all events have come.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if the task handles the event and it's the last, then it should only move the execution forward &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have tried in some different way to model this loop all without full success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on the userguide, it seems that a construct like this image (hope it can be seen) should work, but it doesn't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A href="http://it.tinypic.com/r/2hgs9bs/8" rel="nofollow noopener noreferrer"&gt;http://it.tinypic.com/r/2hgs9bs/8&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The two branches have two different conditions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- the right flow has a condition like ${parseFileTask.eventWasHandled} which calls back on the task (spring bean) if the last event was handled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- the looping flow has a condition like ${parseFileTask.eventsRemaining} which is true only when there are more events expected by the process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this doesn't work, as only ONE of the flows gets taken (sems actually only the first defined in the xml).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We tried with an inclusive gateway at the output of the task, as that should be the "right" way to do this, but also in that case only one path is taken (we suspect that the loop messes up with the selection logic in the inclusive gateway as the exit path will also be an input path).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We tried with a third solution with a parallel gateway at the output of the Parse task which pushed the looping leg through a manual task which looped then back - conditionally - into the signal catching event, but that path was always taken (like the condition wasn't evaluated)…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any hints on how to solve this (I may agree that the modeling is not perfect and could be worked out more).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti is version 5.14&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2014 18:17:44 GMT</pubDate>
    <dc:creator>lmollea</dc:creator>
    <dc:date>2014-03-26T18:17:44Z</dc:date>
    <item>
      <title>Modeling a 'loop'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165091#M118800</link>
      <description>HI all,I have a strange situation that I cannot solve, even though reading the docs, it seems that it should be feasible.We have a task (Java Service Task) that should be invoked after an external event (modeled with a signal) happens. When the task executes, it reads the content of the message that</description>
      <pubDate>Wed, 26 Mar 2014 18:17:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165091#M118800</guid>
      <dc:creator>lmollea</dc:creator>
      <dc:date>2014-03-26T18:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling a 'loop'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165092#M118801</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;I prepared small jUnit test example how to design loop &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://github.com/martin-grofcik/activiti-unit-test-template/tree/modeling-loop" rel="nofollow noopener noreferrer"&gt;https://github.com/martin-grofcik/activiti-unit-test-template/tree/modeling-loop&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>Thu, 27 Mar 2014 07:53:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165092#M118801</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-03-27T07:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling a 'loop'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165093#M118802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Implementation is in the bpmn process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/martin-grofcik/activiti-unit-test-template/blob/modeling-loop/src/test/resources/org/activiti/test/my-process.bpmn20.xml" rel="nofollow noopener noreferrer"&gt;https://github.com/martin-grofcik/activiti-unit-test-template/blob/modeling-loop/src/test/resources/org/activiti/test/my-process.bpmn20.xml&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>Thu, 27 Mar 2014 09:36:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165093#M118802</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-03-27T09:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modeling a 'loop'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165094#M118803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I download it, but there was no loop implementation in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;———————&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, it's my mistake, the branch I worked with is not the modeling-loop one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 09:41:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modeling-a-loop/m-p/165094#M118803</guid>
      <dc:creator>wuaner</dc:creator>
      <dc:date>2014-03-27T09:41:52Z</dc:date>
    </item>
  </channel>
</rss>

