<?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: Long-running service tasks in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95239#M65324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Activiti engine has specifically added async continuations to the engine. Mark your service task as async and the thread of the caller will be returned. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The job executor (don't forget to enable it in your config), will pick it up afterwards and continue the work in its own threadpool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2012 08:51:32 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2012-02-03T08:51:32Z</dc:date>
    <item>
      <title>Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95237#M65322</link>
      <description>Hi,I would like some advice on best way to implement long-running service tasks in BPMN and Activiti. By long-running I mean tasks which will take more than a second and up to some indeterminate time.Based on my understanding of how Activiti works (including transaction handling and threading) am I</description>
      <pubDate>Thu, 02 Feb 2012 09:42:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95237#M65322</guid>
      <dc:creator>jsher</dc:creator>
      <dc:date>2012-02-02T09:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95238#M65323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Apologies for bumping but I'd be interested in some opinions please. Hopefully I've explained myself ok and it's clear what kind of opinion/confirmation I'm interested in, specifically that it's not a good idea to block a thread in a service task invocation for seconds/minutes/etc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; James&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 21:34:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95238#M65323</guid>
      <dc:creator>jsher</dc:creator>
      <dc:date>2012-02-02T21:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95239#M65324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Activiti engine has specifically added async continuations to the engine. Mark your service task as async and the thread of the caller will be returned. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The job executor (don't forget to enable it in your config), will pick it up afterwards and continue the work in its own threadpool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 08:51:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95239#M65324</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-02-03T08:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95240#M65325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Many thanks for the reply Joram. If I understand it correctly async continuations are mainly there to provide better control over transaction boundaries and not to provide a pool of threads which are suitable for executing long-running tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess that essentially my question is what is best way to handle the situation where I have a task which takes eg. 30 minutes to complete. Is it ok to implement this in a blocking service task, blocking thread (even if this is a JobExecutor thread) for the duration ? Or should this be achieved using an approach which involves async signalling of task completion (like user task or message receiving) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; James&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 09:06:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95240#M65325</guid>
      <dc:creator>jsher</dc:creator>
      <dc:date>2012-02-03T09:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95241#M65326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;30 minutes sure is a long time! The job executor threadpool could be an option, but if you have many of those long running tasks, I'm worrying the system will not function properly. The job executor threadpool is configurable (but not documented), so you should find the right balance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The alternative is writing your own queue system: send a message to some queue, do the work somewhere externally and send a message back to a receive task in the process using the execution id. However, this is exactly what the job executor does, so my first take would be to use the job executor.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 09:17:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95241#M65326</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-02-03T09:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95242#M65327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry to bump this old thread but the advice in the last post seems to contradict the more recent post here… &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/content/modelling-async-user-wait-long-running-service-task" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/content/modelling-async-user-wait-long-running-service-task&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a similar requirement for a long running service task (FTP of large files), and it would be good not to have to complicate the workflow designer's job by including another tech such as Camel, and have them configure receive tasks, etc each time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The statements in the other thread seem clear: a blocked service task will keep a TX open and eventually the database will time out. Is it fundamental to the engine design for it to work this way, or is this something that might be modified in the future? I agree with the statement above that the job executor gets us most of the way there… it's a slight shame it has this timeout limitation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Alfie.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 11:53:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95242#M65327</guid>
      <dc:creator>jugglingcats</dc:creator>
      <dc:date>2013-09-05T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Long-running service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95243#M65328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Frameworks like Camel provide the asynchronous functionality you are looking for by default. So I do think this is the best way to go forward. It doesn't complicate things more than if we would implement the same functionality in Activiti. Re-using functionality from another framework seems to be a more logical approach then implementing it again in Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 15:11:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/long-running-service-tasks/m-p/95243#M65328</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-09-05T15:11:01Z</dc:date>
    </item>
  </channel>
</rss>

