<?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: ServiceTask executed after process end event in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1980#M116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg - thanks for such immediate answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you mentioned "queue size" you think about state of&amp;nbsp;AcquireAsyncJobsDueRunnable thread? I can't give you specific numbers, but this scenario takes place during "rush hours" for our application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We set modifyService as asynchronous because we want it executed by general thread pool dedicated to async tasks.&amp;nbsp;We don't want to bother "timer thread" to do the task, because sometimes it can take more time (this one is calling some other webservice).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About DB timestamps - we verified logs of applications and it also confirms this strange behavior - task was executed after end event for process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What information do you need to diagnose the problem in more details? Maybe BPMN definition would be helpful? We are suffering because of this problem, so we want to spot and eliminate it as soon as it possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jan 2017 06:09:56 GMT</pubDate>
    <dc:creator>tzar1911</dc:creator>
    <dc:date>2017-01-04T06:09:56Z</dc:date>
    <item>
      <title>ServiceTask executed after process end event</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1978#M114</link>
      <description>Hi,we encountered several cases when serviceTasks are executed after reaching process end event. One example from ACT_HI_ACTINST_TABLE looks like this:&amp;nbsp; SELECT &amp;nbsp;&amp;nbsp;&amp;nbsp;EXECUTION_ID_, &amp;nbsp;&amp;nbsp;&amp;nbsp;PROC_INST_ID_, &amp;nbsp;&amp;nbsp;&amp;nbsp;ACT_ID_, &amp;nbsp;&amp;nbsp;&amp;nbsp;ACT_TYPE_, &amp;nbsp;&amp;nbsp;&amp;nbsp;START_TIME_, &amp;nbsp;&amp;nbsp;&amp;nbsp;END_TIME_&amp;nbsp; FROM ACT_HI_ACTINST &amp;nbsp;&amp;nbsp;WHERE PROC_INST_ID_ = &amp;nbsp;&amp;nbsp;&amp;nbsp;'</description>
      <pubDate>Tue, 03 Jan 2017 16:51:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1978#M114</guid>
      <dc:creator>tzar1911</dc:creator>
      <dc:date>2017-01-03T16:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceTask executed after process end event</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1979#M115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While I would need a lot more detail (such as queue size, load etc) o provide a direct answer to your question, one wonders why you don't set your "modifyService" to act synchronously if it is to fire immediately after "&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;timerintermediatecatchevent1". If you set it to be synchronous, the timer event will pick up (timers are sitting on the job queue) and immediately (on the same thread) call "modifyService".&lt;BR /&gt;&lt;BR /&gt;Like I said, doesnt answer your question, but you have to be careful about using DB datestamps as the order of insertion may not actually match the order of execution due to transaction boundaries (especialy when you have more than one job scheduler associated with the one db).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 19:34:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1979#M115</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-01-03T19:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceTask executed after process end event</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1980#M116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg - thanks for such immediate answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you mentioned "queue size" you think about state of&amp;nbsp;AcquireAsyncJobsDueRunnable thread? I can't give you specific numbers, but this scenario takes place during "rush hours" for our application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We set modifyService as asynchronous because we want it executed by general thread pool dedicated to async tasks.&amp;nbsp;We don't want to bother "timer thread" to do the task, because sometimes it can take more time (this one is calling some other webservice).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About DB timestamps - we verified logs of applications and it also confirms this strange behavior - task was executed after end event for process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What information do you need to diagnose the problem in more details? Maybe BPMN definition would be helpful? We are suffering because of this problem, so we want to spot and eliminate it as soon as it possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2017 06:09:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1980#M116</guid>
      <dc:creator>tzar1911</dc:creator>
      <dc:date>2017-01-04T06:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceTask executed after process end event</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1981#M117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radek,&lt;/P&gt;&lt;P&gt;I'm still a little confused as to why you wont set the modifyService task to synchronous.&lt;BR /&gt;By binding it to the same thread as the timer task (which is essentially what synchronous does) you are still using the Job Executor thread pool. Yes, it doesnt use the pool associated with async tasks, but your problem goes away, and, if you are concerned about performance, then&amp;nbsp;separate the nodes that process async and timer tasks.&amp;nbsp;&lt;SPAN&gt;The fact that this happens during "Rush hours" indicates that you need to tune up your job executor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option you have is to "block" the "End event" using a signal receiver that is triggered by a signal send event placed immediately after the modifyService.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2017 17:49:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1981#M117</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-01-04T17:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceTask executed after process end event</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1982#M118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attached the screenshot showing process definition. As I said modifyService should be executed right after timer and in most cases is. I don't disagree with your fix proposition but I would like to know what is causing such behavior - is this our fault, or is it engine problem. We also observed this kind of behavior in other processes where serviceTask are located one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason of marking task as async is to make clear transaction boundaries and limit rollback to retry only one task. When we designed process without that, engine was retrying several tasks before faulty one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/alfresco/11897_Zrzut ekranu 2017-01-05 o 09.03.53.png" style="width: 620px; height: 93px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2017 08:12:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1982#M118</guid>
      <dc:creator>tzar1911</dc:creator>
      <dc:date>2017-01-05T08:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceTask executed after process end event</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1983#M119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any hints?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 06:15:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/servicetask-executed-after-process-end-event/m-p/1983#M119</guid>
      <dc:creator>tzar1911</dc:creator>
      <dc:date>2017-01-09T06:15:47Z</dc:date>
    </item>
  </channel>
</rss>

