<?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: Modelling an async user wait on a long running service task. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128411#M90276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And this kind of checks should be done periodically?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have a clue when I should do this kind of checkups so I don't need to pull them periodically?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case that the state of the workflow is changed by a call comming from a thread from JobExecutor (e.g. because a timer has expired) then I don't have any clue when the process arrives in a wait state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Feb 2014 14:29:13 GMT</pubDate>
    <dc:creator>andreibica</dc:creator>
    <dc:date>2014-02-25T14:29:13Z</dc:date>
    <item>
      <title>Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128407#M90272</link>
      <description>Hi,I have a scenario where I have long running evaluation service task (Java Delegate) that I need to run asynchronously so that I can provide user feedback experience, i.e. a spinner in a web application, whilst waiting for the service task to complete.&amp;nbsp; Having seen the parallel gateways feature, c</description>
      <pubDate>Fri, 19 Apr 2013 11:12:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128407#M90272</guid>
      <dc:creator>alistairb</dc:creator>
      <dc:date>2013-04-19T11:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128408#M90273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you have long-running tasks executed by the job-executor, you should consider that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Executing a service-task (or any other task) keeps a transaction open until a wait-state/process-end/async-task is reached. If you have long-running operations, make sure your DB doesn't time out.&lt;/LI&gt;&lt;LI&gt;When a jobs is running for 5 minutes, the job aquisistion-thread assumes the job-executor that was running the job, has either died or has failed. The lock of the job is removed and the job will be executed by another thread in the executor-pool. This timeout-setting can be&amp;nbsp; raised, if that is required.&lt;/LI&gt;&lt;LI&gt;Long-running tasks modeled IN the activiti-process always keep a transaction open and a job-executor thread occupied. Better practice is to use a queue-signal approach where the long-runnin operation is executed outside of activiti (queued to eg. camel using a service-task, providing the neccesairy variables needed alongside). When the long-running task is completed, it should signal the execution, which has a recieve-task modeled in.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 11:56:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128408#M90273</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-04-19T11:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128409#M90274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm also trying to model a long operation followed by a result which must be feed into the workflow. For this I am using a Java Service Task to initiate the operation and a Java Receive Task to wait for the result. The problem that I see here is that the result of the operation may come faster then the engine is reaching the Java Receive Task. In this case if I am trying to signal the process when I receive the result I will get an exception because the process is not in waiting state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to avoid this problem or am I missing something?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrei&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 15:22:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128409#M90274</guid>
      <dc:creator>andreibica</dc:creator>
      <dc:date>2014-02-21T15:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128410#M90275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm I'm afraid such a problem can only be resolved by putting a queue in front of the service which checkes whether the process is in the correct state and delivers the message only if it's true.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 09:22:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128410#M90275</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-02-25T09:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128411#M90276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And this kind of checks should be done periodically?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have a clue when I should do this kind of checkups so I don't need to pull them periodically?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case that the state of the workflow is changed by a call comming from a thread from JobExecutor (e.g. because a timer has expired) then I don't have any clue when the process arrives in a wait state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 14:29:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128411#M90276</guid>
      <dc:creator>andreibica</dc:creator>
      <dc:date>2014-02-25T14:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128412#M90277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;gt; Do I have a clue when I should do this kind of checkups so I don't need to pull them periodically?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use regular queue implementations (jms is a bit heavy, but something like hazelcast queue or something of Spring …)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp; then I don't have any clue when the process arrives in a wait state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;True. But you can always query for the state of all your processes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 09:11:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128412#M90277</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-03-10T09:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128413#M90278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Frederik Heremans wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;When you have long-running tasks executed by the job-executor, you should consider that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Executing a service-task (or any other task) keeps a transaction open until a wait-state/process-end/async-task is reached. If you have long-running operations, make sure your DB doesn't time out.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;When a jobs is running for 5 minutes, the job aquisistion-thread assumes the job-executor that was running the job, has either died or has failed. The lock of the job is removed and the job will be executed by another thread in the executor-pool. This timeout-setting can be&amp;nbsp; raised, if that is required.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Long-running tasks modeled IN the activiti-process always keep a transaction open and a job-executor thread occupied. Better practice is to use a queue-signal approach where the long-runnin operation is executed outside of activiti (queued to eg. camel using a service-task, providing the neccesairy variables needed alongside). When the long-running task is completed, it should signal the execution, which has a recieve-task modeled in.&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm also running a long service-task, and would like to raise the job execution timeout as &lt;B&gt;Frederik Heremans&lt;/B&gt; suggested.&lt;/P&gt;&lt;P&gt;Does anyone (Fredeik?) know how to do it? I can't find any documentation for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aviran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 05:11:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128413#M90278</guid>
      <dc:creator>avirankatz</dc:creator>
      <dc:date>2017-07-04T05:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128414#M90279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;asyncExecutorSecondsToWaitOnShutdown&lt;BR /&gt;&lt;A href="https://www.activiti.org/userguide/6.latest/#_async_executor_configuration" rel="nofollow noopener noreferrer"&gt;https://www.activiti.org/userguide/6.latest/#_async_executor_configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ProcessEngineConfigurationImpl.setAsyncExecutorSecondsToWaitOnShutdown&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Activiti/Activiti/blob/master/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java" title="https://github.com/Activiti/Activiti/blob/master/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java" rel="nofollow noopener noreferrer"&gt;Activiti/ProcessEngineConfigurationImpl.java at master · Activiti/Activiti · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;public ProcessEngineConfigurationImpl setAsyncExecutorSecondsToWaitOnShutdown(long asyncExecutorSecondsToWaitOnShutdown) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; this.asyncExecutorSecondsToWaitOnShutdown = asyncExecutorSecondsToWaitOnShutdown;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return this;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 07:19:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128414#M90279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-04T07:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128415#M90280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a similar Question.&lt;/P&gt;&lt;P&gt;I would like to model a Process for a Questionnaire, so someone assigns the questionnaire, and the assignee has to fill that out. &amp;nbsp;If the Questionnaire is not filled in 5 days I'll send him a reminder and so on.&lt;/P&gt;&lt;P&gt;Is this too longterm to model in Activiti or is that viable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 10:49:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128415#M90280</guid>
      <dc:creator>ksgphellow</dc:creator>
      <dc:date>2017-10-16T10:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modelling an async user wait on a long running service task.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128416#M90281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are solving this by using only one service task for send and receive that is a&amp;nbsp;spring&amp;nbsp;@Component extending&amp;nbsp;&lt;STRONG&gt;ReceiveTaskActivityBehavior&lt;/STRONG&gt;. In the execute() you start your async processing storing your executionId, when finished just triggering that executionId.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This works, but I'm not sure this is really the proper way, because Activiti doc says: don't extend ActivitiBehavior just if you know what you are doing.)&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 09:58:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modelling-an-async-user-wait-on-a-long-running-service-task/m-p/128416#M90281</guid>
      <dc:creator>haridaniel</dc:creator>
      <dc:date>2018-04-10T09:58:43Z</dc:date>
    </item>
  </channel>
</rss>

