<?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: Looping Activiti Workflow in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64046#M40310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sigh, sorry, you focussed on THAT remark… I'm less willing to help now, in combination with you trying and trying (in PM) to justify wrongly posting in this forum. If you have any IQ, you would not have taken that TO seriously and looked at the second remark… MODDELING THINGS DIFFERENTLY. But for me to help you with that, you should describe what you want to achieve, not focus on a single problem that happens to (almost) noone but you…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jul 2011 19:15:32 GMT</pubDate>
    <dc:creator>ronald_van_kuij</dc:creator>
    <dc:date>2011-07-26T19:15:32Z</dc:date>
    <item>
      <title>Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64040#M40304</link>
      <description>I have been trying to implement a daemon process that will wakeup and do some work every X time in activiti.I was able to do this with 2 service tasks and an exclusive gate that loops back to the first task, but after the flow executes 92 times it crashes, always.It reports back a stackOverflow erro</description>
      <pubDate>Mon, 25 Jul 2011 18:41:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64040#M40304</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-25T18:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64041#M40305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wrong forum, but I'll respond anyway (next time use the userforum please) because it is a fairly common misconception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A sleep in a task makes sure you stay in the same thread. So it is indeed recursive. Normally you'll have a real waitstate and e.g. trigger it from an external event. So either use e.g quartz or model timeouts on tasks so they become real waitstates and yo do not get recursive behaviour&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 18:54:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64041#M40305</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-07-25T18:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64042#M40306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;shouldn't the workflow processing be sequential though and not recursive? does this mean that i cannot create linear workflows that are larger than 92 steps?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 19:05:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64042#M40306</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-25T19:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64043#M40307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The easiest way to contribute is create a JIRA and add a patch file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that looping support is not an easy task, and should be tested thorougly with plenty unit tests.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 08:12:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64043#M40307</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-07-26T08:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64044#M40308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;shouldn't the workflow processing be sequential though and not recursive? does this mean that i cannot create linear workflows that are larger than 92 steps?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;What you do is not really recursive, it is a loop, a special kind of sequence. There needs to be a kind of 'callstack' to be able to undo things if an exception occurs, or to commit things when things go wrong. The concept of BPM is (most of the time) that there are some kinds of wait states like usertasks, receive tasks etc… If those are modeled in, the 'callstack' is persisted and stack overflows do not occur. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does indeed mean that e.g. in your case, a lot of servicestasks after another without a waitstate will lead to stackoverflows, whether caused by loops or real sequences does not matter. Adding additional memory helps, but modelling things differently often does as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 15:55:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64044#M40308</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-07-26T15:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64045#M40309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so how would i go about adding more memory to a single workflow that is going to execute?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 17:44:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64045#M40309</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-26T17:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64046#M40310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sigh, sorry, you focussed on THAT remark… I'm less willing to help now, in combination with you trying and trying (in PM) to justify wrongly posting in this forum. If you have any IQ, you would not have taken that TO seriously and looked at the second remark… MODDELING THINGS DIFFERENTLY. But for me to help you with that, you should describe what you want to achieve, not focus on a single problem that happens to (almost) noone but you…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 19:15:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64046#M40310</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-07-26T19:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64047#M40311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;obviously you intended to tell me to model things differently…. and obviously the reason that I asked how to change the memory is because I cannot accept the limited amount of memory space that is being allocated to individual workflows AND because runtime execution stack dumps are not acceptable when the workflow may not actually contain recursion or infinite loops.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to be able to change the memory size to model the expected stack space consumption of an entire workflow execution.&amp;nbsp; based on this I can then report back that a designed workflow is most likely going to bust the activiti stack and prevent their deployment before they are instantiated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 22:49:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64047#M40311</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-26T22:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64048#M40312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've exactly the same problem, i want to make a loop with a condition that it may take long or short time, and it gives me the "StackOverflow" exception. I have trying doing this with a exclusive gateway and a parallel gateway and in both cases gives the&amp;nbsp; "StackOverflow" exception. Is there a way to make a efficient loop?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like this: &lt;/SPAN&gt;&lt;A href="http://www.workflowpatterns.com/patterns/control/new/wcp21.php" rel="nofollow noopener noreferrer"&gt;http://www.workflowpatterns.com/patterns/control/new/wcp21.php&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 14:16:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64048#M40312</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-07-27T14:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64049#M40313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;based on the past few days discussion and as far as i know&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;short version:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;no.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;long version:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this is because memory is being added to the stack at every step inside of your workflow (by the engine), never being cleaned up, it will eventually cause a stack overflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ronald.van.kuijk's response was to model it differently….&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 15:28:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64049#M40313</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-27T15:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64050#M40314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes I know the cause but model it differently? how? Can anybody explain me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 15:45:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64050#M40314</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-07-27T15:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64051#M40315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;they would prefer that you use an external system that will periodically execute the workflow.&amp;nbsp; this would avoid the memory issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have been able to do it by creating 2 workflows&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start -&amp;gt; do looping work -&amp;gt; call sleep -&amp;gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start -&amp;gt; sleep -&amp;gt; call loop -&amp;gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**the calling sleep and calling loop is done via a different communication channel so that the memory dependency can be cleared by the "end" step being reached.&amp;nbsp; essentially the "call sleep" is async.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**there is added overhead in starting and stopping all of these workflows (if the loop is that fast)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**the "sleep" step does not actually have to sleep, the whole point is that the first workflow needs to be able to reach the end state so that memory could be freed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 16:32:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64051#M40315</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-27T16:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64052#M40316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's a little bit awkward but thanks for the tip.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 17:05:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64052#M40316</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-07-27T17:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64053#M40317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't understand one thing, what do you mean with external system? For instance, I'm doing tests with eclipse plugin with the example that you mention and I created 2 workflows and to call each one other I use CallActivity task but also gives "StackOverflow" exception and with reason because callactivity its synchronous. How can i make an asynchronous comunication?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 15:42:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64053#M40317</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-07-28T15:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64054#M40318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;by external system i mean using JMS / socket / carrier pidgeon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(i am using JMS…. it required an additional controller to actually spawn the things upon death instead of using callactivities)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it needs to be an async call that is not in any way connected to activiti, this will allow the workflow to actually die&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;more detail:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start -&amp;gt; loop -&amp;gt; JMS start sleep -&amp;gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start -&amp;gt; sleep -&amp;gt; JMS start loop -&amp;gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;export both to runnable jar&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to allow this to work there is also an activiti_controller (Normal Java Process) that is capable of spawning (via java process exec java -jar workflowName) individual workflows.&amp;nbsp; this controller listens on the JMS queue for messages via a while(true) recvMessage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is async because the controller will recv the messages and process them when it is capable, aka re-start the workflows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(for it to be more robust the controller should be multi-threaded)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is not the only way to get it to happen, it is just the way that I did it. (yes it is an awful kludge)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;let me know if you have any other troubles, i have code and such that works with this via JMS (but i have more components and threading going on)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 16:16:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64054#M40318</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-28T16:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64055#M40319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes I understand the solution but I need to run multiple loops not only one, if for all loops I've to make something like that it is really bad. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the replies.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 18:42:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64055#M40319</guid>
      <dc:creator>filipearaujo</dc:creator>
      <dc:date>2011-07-28T18:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64056#M40320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;agreed…. but we essentially have no other choice, as far as the developers have told me / the forums&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;do you want parallel loops in a single workflow? or in multiple different workflows executing in parallel, each with a loop?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it is easier if you change parallel loops in a single workflow into the case where each loop is its own workflow.&amp;nbsp; you can then use a multi-threaded activiti-controller to invoke each of the loop items.&amp;nbsp; This would have to be a blocking loop call that would allow return values from the loop to obtained most likely.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 19:14:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64056#M40320</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-28T19:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64057#M40321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;there are several statements in replies in this topic that I'd like to address. Some are wrong and some are the result of assumptions that how things could be done by diving directly into technical solutions instead of looking at it from a functional standpoint and asking for solutions for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;execution stack dumps are not acceptable when the workflow may not actually contain recursion or infinite loops.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;That is tuning… If I give my JBoss just 128M, it crashes all the time with oom without loops. We need to do things like tuning all the time…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i want to make a loop with a condition that it may take long or short time, and it gives me the "StackOverflow" exception.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Long running is not the problem, the number of loop BEFORE a waitstate is encountered is..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;short version:&lt;BR /&gt;no.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Yes and no. Yes if there is a wait-state, no if there are to many repetitions and tuning is not done correctly (tuning can't solve all)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;long version:&lt;BR /&gt;this is because memory is being added to the stack at every step inside of your workflow (by the engine), never being cleaned up, it will eventually cause a stack overflow.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I did not say that memory was never released, it is not released until a waitstate is encountered. This is because a commit to the db still needs to take place… Keeping all things in memory requires well… memory. And not per workflow, per engine&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;they would prefer that you use an external system that will periodically execute the workflow. this would avoid the memory issue.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;That is your interpretation based on your first remark in the first post in this forum&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have been trying to implement a daemon process that will wakeup and do some work every X time in activiti.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;What I said use an external system to execute the service and have a waitstate in the process. This could e.g. be done by a minimal service task that puts a message in a jms queue somewhere, followed by a receive task (wait state! so persistence takes place, so memory is freed) with a timeout on it that makes it continue/loop… After the job finishes normally, the receive task is triggerd. This is way simpler than your example and can even be achieved plain jms or with combining e.g. &lt;/SPAN&gt;&lt;A href="http://www.mulesoft.org/activiti-bpm" rel="nofollow noopener noreferrer"&gt;Mule and Activiti&lt;/A&gt;&lt;SPAN&gt; or [url=&lt;/SPAN&gt;&lt;A href="http://fox.camunda.com/peal-psi/Camunda" rel="nofollow noopener noreferrer"&gt;http://fox.camunda.com/peal-psi/Camunda&lt;/A&gt;&lt;SPAN&gt; PSI&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh and &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-126" rel="nofollow noopener noreferrer"&gt;Async continuations&lt;/A&gt;&lt;SPAN&gt; would be another option&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;agreed…. but we essentially have no other choice, as far as the developers have told me / the forums&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Totally disagree here… No one told you that 'your solution' was the only choice as you can read above… Lots of other choices, so please do not draw wrong conclusions and pretend we said things…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 21:26:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64057#M40321</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-07-28T21:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64058#M40322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;isn't forcing people who only want to use service tasks into using wait states an unnecessary requirement?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm gonna ignore the rest and jump to the java receive tasks, which I had not read about until now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;probably the only semi viable solution is in the Java receive task's. but is the only way to wake someone that is in the wait state is by:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessInstance pi = runtimeService.startProcessInstanceByKey("receiveTask");&lt;BR /&gt;Execution execution = runtimeService.createExecutionQuery()&lt;BR /&gt;&amp;nbsp; .processInstanceId(pi.getId())&lt;BR /&gt;&amp;nbsp; .activityId("wait")&lt;BR /&gt;&amp;nbsp; .singleResult();&lt;BR /&gt;assertNotNull(execution);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;runtimeService.signal(execution.getId());&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;correct? so i have to identify the process by name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is ok for simple tasks that essentially bounce back and fourth between each other…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am dynamically deploying these workflows in a multi-tenant system which is using JMS for unique and private communication between workflow java tasks and remote java class execution.&amp;nbsp; (this reduces the memory / compute footprint required by the tasks within the activiti engine since they only pass JMS now)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hence my complicated example that i provided before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;runtimeService.signal(execution.getId());&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;this does not allow any dynamic parameter passing to the process that we are telling to resume correct? or is there some other way to pass parameters via this method?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 22:36:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64058#M40322</guid>
      <dc:creator>coner</dc:creator>
      <dc:date>2011-07-28T22:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Activiti Workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64059#M40323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;isn't forcing people who only want to use service tasks into using wait states an unnecessary requirement?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;No, it's called working within the posibilities of a framework/… I for intance want to be able to write a multi-milion application in java in one line of code… Can't be done… &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i'm gonna ignore the rest and…&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Confronting isn't it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i'm gonna ignore the rest and jump to the java receive tasks, which I had not read about until now.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; Receive tasks, not JAVA receive tasks… and I mentioned them before[&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;quote="COner"]correct? so i have to identify the process by name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No, the process INSTANCE, and by ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;this is ok for simple tasks that essentially bounce back and fourth between each other…&lt;BR /&gt;&lt;BR /&gt;i am dynamically deploying these workflows in a multi-tenant system which is using JMS for unique and private communication between workflow java tasks and remote java class execution. (this reduces the memory / compute footprint required by the tasks within the activiti engine since they only pass JMS now)&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Sorry, I do not understand why this is only for simple tasks etc… Can you elaborarte?&amp;nbsp; And yes, maybe your 'solution' is a complicating factor because of the way it is implemented… You always need some kind of 'correlation' and the combination of the process instance id and the name of the receive task to be called is an perfectly normal example in lots of businesscase&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;hence my complicated example that i provided before.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Again, sorry… I miss the reasoning behind the 'hence'…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;this does not allow any dynamic parameter passing to the process that we are telling to resume correct?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; No clue what you mean by 'dynamic parameter passing'… You seem to talk in technical terms a lot, what is it that you want to achieve? Do you want values that come from the external service to be added to the specific process instance?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 23:39:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/looping-activiti-workflow/m-p/64059#M40323</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-07-28T23:39:10Z</dc:date>
    </item>
  </channel>
</rss>

