<?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: Best way to handle looping service tasks to avoid StackOverflowError in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218999#M172129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the suggestion, it is really helpful. I will try to add my custom validator in same way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JDP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 May 2016 12:35:37 GMT</pubDate>
    <dc:creator>jdp</dc:creator>
    <dc:date>2016-05-05T12:35:37Z</dc:date>
    <item>
      <title>Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218992#M172122</link>
      <description>Hi,I have a workflow as displayed in below link for a specific requirement &lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;esign : https://www.dropbox.com/s/t3k6tsmnanaziub/ServiceTaskLooping.png?dl=0Definition : attachedTest Class : attachedhere when 'status' is other than 1 or 2, workflow goes in infinite loop and throws a StackOverflowError</description>
      <pubDate>Mon, 02 May 2016 10:32:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218992#M172122</guid>
      <dc:creator>jdp</dc:creator>
      <dc:date>2016-05-02T10:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218993#M172123</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;As I am not able to edit the title of this post, please consider title as "which is the best way to handle looping service tasks to avoid StackOverflowError"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have following options to avoid this problem :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Restrict service task input flow, every service task should have max one in flow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Add executionCounter variable for each service task and if it reach at max limit, suspend/cancel workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;please suggest if these are the only valid solutions or there are other ways provided by activiti itself ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JDP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 05:38:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218993#M172123</guid>
      <dc:creator>jdp</dc:creator>
      <dc:date>2016-05-03T05:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218994#M172124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a known problem in v5 and has been fixed in v6 (by fundamentally changing the exection algorithm)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A workaround is to make the stack size of the JVM larger. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A more code-wise solution is to split up processing of such iterations and add async points to make sure the process instance state is persisted in between.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 12:57:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218994#M172124</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-05-03T12:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218995#M172125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply. actually I want to restrict such workflow's infinite execution somehow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Option one is, my app should validate such loops in workflow design and do not allow such workflows to be deployed. Is there any already available validation code through which I can add this type of validation or can find such loops in workflow design ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is point 2, I had mentioned in my above comment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please suggest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JDP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 13:45:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218995#M172125</guid>
      <dc:creator>jdp</dc:creator>
      <dc:date>2016-05-03T13:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218996#M172126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi JDP,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you use async task in the loop it should avoid stack overflow exception.&lt;/SPAN&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>Wed, 04 May 2016 12:09:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218996#M172126</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-05-04T12:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218997#M172127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate your suggestion. As I had mentioned, I don’t want this type of workflows executes infinite times. I want to restrict such workflows to be deployed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any validation framework already available with which I can find and validate such loops in workflows and stop deployment of the same, if not, can you please suggest some approach to do the same ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am thinking to implement such validation by workflow paths traversal mechanism.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JDP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 12:21:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218997#M172127</guid>
      <dc:creator>jdp</dc:creator>
      <dc:date>2016-05-04T12:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218998#M172128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi JDP,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there any validation framework already available with which I can find and validate such loops in workflows and stop deployment of the same, if not, can you please suggest some approach to do the same ?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;You can validate model before export from modeler (not enough - non validated model can fail again) &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#_validating_diagrams_and_exporting_to_custom_output_formats" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#_validating_diagrams_and_exporting_to_custom_output_formats&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can create your own deployer to check this condition. (somebody can change definition directly in the DB and make this loop)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hook into the process definition parsing (&lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#_hooking_into_process_parsing" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#_hooking_into_process_parsing&lt;/A&gt;&lt;SPAN&gt;) and do not allow such a definition to be parsed into memory&lt;/SPAN&gt;&lt;BR /&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, 05 May 2016 09:29:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218998#M172128</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-05-05T09:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle looping service tasks to avoid StackOverflowError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218999#M172129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the suggestion, it is really helpful. I will try to add my custom validator in same way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JDP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 12:35:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-way-to-handle-looping-service-tasks-to-avoid/m-p/218999#M172129</guid>
      <dc:creator>jdp</dc:creator>
      <dc:date>2016-05-05T12:35:37Z</dc:date>
    </item>
  </channel>
</rss>

