<?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: Timer fired every 5 minutes while executing a long running command in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185747#M138877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your response. I found out the real issue and a fix for this. Posting it for the benefit of others. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[size=20]scenario[/size]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;START — TimerCatchingEvent (PT10S Intermediate Event) (This could be any async script (or) service task) — ScriptTask (or) Service Task (Long running - runs for more than 5 min) — END&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[size=20]Issue[/size]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti considers any tasks running for more than 5 min as long running tasks and thinks that the task is stuck and rerun from the point where the new thread is created (i believe as jbarrez said the job executor does this) in the workflow. It would be nice if this 5 min limit is captured in the user guide. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even marking the long running task (script (or) service) as 'async' doesn't help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Activiti team, &lt;/SPAN&gt;&lt;SPAN style="color:#FF0000;"&gt;I request you to capture this behavior either in the user guide or FAQ&lt;/SPAN&gt;&lt;SPAN&gt;, please. This would definitely save lot of man hours.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[size=20]Solution[/size]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Make your delegate as a receive task - extend from ReceiveTaskActivityBehavior&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;eg: public class MyReceiveTask extends ReceiveTaskActivityBehavior&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Signal it using runtimeService once the task is done. Assuming your service task id is 'servicetask1' you could signal the task using runtimeService.signal("servicetask1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Found a relevant thread that explains job executor timeout: &lt;/SPAN&gt;&lt;BR /&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2014 19:13:28 GMT</pubDate>
    <dc:creator>nchan</dc:creator>
    <dc:date>2014-11-20T19:13:28Z</dc:date>
    <item>
      <title>Timer fired every 5 minutes while executing a long running command</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185742#M138872</link>
      <description>Activiti version&amp;nbsp; tested : 5.16 and 5.10I have a simple workflow with a timer catching event and a long running task attached to it.START — TimerCatchingEvent (PT10S Intermediate Event) — ScriptTask (Long running - runs for more than 5 min) — ENDThe script task runs for more than 5 minutes. While th</description>
      <pubDate>Fri, 14 Nov 2014 16:38:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185742#M138872</guid>
      <dc:creator>nchan</dc:creator>
      <dc:date>2014-11-14T16:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Timer fired every 5 minutes while executing a long running command</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185743#M138873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you retest when you make the script task async?&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>Fri, 14 Nov 2014 16:47:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185743#M138873</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-11-14T16:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Timer fired every 5 minutes while executing a long running command</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185744#M138874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am still seeing this behavior with script task async turned on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tweaked my activiti bpmn to include a listener and print the time and thread id on entry and exit of the timer and the script task. Reposting my new bpmn along with the test console logs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;definitions xmlns="&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;" xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;" xmlns:xsd="&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;" xmlns:activiti="&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;" xmlns:bpmndi="&lt;A href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/DI&lt;/A&gt;" xmlns:smileysurprised:mgdc="&lt;A href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DC&lt;/A&gt;" xmlns:smileysurprised:mgdi="&lt;A href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DI&lt;/A&gt;" typeLanguage="&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;" expressionLanguage="&lt;A href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;" targetNamespace="&lt;A href="http://www.activiti.org/test" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/test&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;process id="myProcess" name="My process" isExecutable="true"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="startevent1" name="Start"&amp;gt;&amp;lt;/startEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;intermediateCatchEvent id="timerintermediatecatchevent3" name="TimerCatchEvent"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:executionListener event="start" class="com.cisco.xxx.MyTaskListener"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:executionListener event="end" class="com.cisco.xxx.MyTaskListener"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeDuration&amp;gt;PT10S&amp;lt;/timeDuration&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/intermediateCatchEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow24" sourceRef="timerintermediatecatchevent3" targetRef="scripttask5"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="scripttask5" name="Long running command" activiti:async="true" scriptFormat="groovy" activiti:autoStoreVariables="false"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:executionListener event="start" class="com.cisco.xxx.MyTaskListener"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:executionListener event="end" class="com.cisco.xxx.MyTaskListener"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;println "Running command .."&lt;BR /&gt;def y = 5000000&lt;BR /&gt;&lt;BR /&gt;while ( y– &amp;amp;gt; 0 ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def command = """find . -name "*.*" -print"""&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def proc = command.execute()&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc.waitFor()&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( y % 50000 == 0) println&amp;nbsp; Thread.currentThread().getId() + " – " + " Still running …" + y&lt;BR /&gt;}&lt;BR /&gt;print "Completed running command"&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow25" sourceRef="scripttask5" targetRef="endevent2"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="endevent2" name="End"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:executionListener event="start" class="com.cisco.xxx.MyTaskListener"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/endEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow26" sourceRef="startevent1" targetRef="timerintermediatecatchevent3"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/process&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;bpmndi:BPMNDiagram id="BPMNDiagram_myProcess"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdc:Bounds height="35.0" width="35.0" x="210.0" y="70.0"&amp;gt;&amp;lt;/omgdc:Bounds&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNShape&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent3" id="BPMNShape_timerintermediatecatchevent3"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdc:Bounds height="35.0" width="35.0" x="290.0" y="70.0"&amp;gt;&amp;lt;/omgdc:Bounds&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNShape&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNShape bpmnElement="scripttask5" id="BPMNShape_scripttask5"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdc:Bounds height="71.0" width="105.0" x="360.0" y="52.0"&amp;gt;&amp;lt;/omgdc:Bounds&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNShape&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdc:Bounds height="35.0" width="35.0" x="530.0" y="70.0"&amp;gt;&amp;lt;/omgdc:Bounds&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNShape&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNEdge bpmnElement="flow24" id="BPMNEdge_flow24"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdi:waypoint x="325.0" y="87.0"&amp;gt;&amp;lt;/omgdi:waypoint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdi:waypoint x="360.0" y="87.0"&amp;gt;&amp;lt;/omgdi:waypoint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNEdge&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNEdge bpmnElement="flow25" id="BPMNEdge_flow25"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdi:waypoint x="465.0" y="87.0"&amp;gt;&amp;lt;/omgdi:waypoint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdi:waypoint x="530.0" y="87.0"&amp;gt;&amp;lt;/omgdi:waypoint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNEdge&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bpmndi:BPMNEdge bpmnElement="flow26" id="BPMNEdge_flow26"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdi:waypoint x="245.0" y="87.0"&amp;gt;&amp;lt;/omgdi:waypoint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;omgdi:waypoint x="290.0" y="87.0"&amp;gt;&amp;lt;/omgdi:waypoint&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNEdge&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bpmndi:BPMNPlane&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bpmndi:BPMNDiagram&amp;gt;&lt;BR /&gt;&amp;lt;/definitions&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;My listener:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;package com.cisco.xxx;&lt;BR /&gt;import java.util.Date;&lt;BR /&gt;import java.util.logging.Logger;&lt;BR /&gt;&lt;BR /&gt;import org.activiti.engine.delegate.DelegateExecution;&lt;BR /&gt;import org.activiti.engine.delegate.ExecutionListener;&lt;BR /&gt;&lt;BR /&gt;public class MyTaskListener implements ExecutionListener {&lt;BR /&gt; &lt;BR /&gt; private static final long serialVersionUID = 1L;&lt;BR /&gt; private Logger log = Logger.getLogger(MyTaskListener.class.getName());&lt;BR /&gt;&lt;BR /&gt; @Override&lt;BR /&gt; public void notify(DelegateExecution execution) throws Exception {&lt;BR /&gt;&amp;nbsp; System.out.println("Thread:" + Thread.currentThread().getId() + " event name:" + execution.getEventName() + " – Inside listener for task:id " + execution.getCurrentActivityName() + ":" + execution.getCurrentActivityId() + " ….&amp;nbsp; @" + new Date() );&amp;nbsp; &lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Test output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;Nov 14, 2014 9:35:33 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions&lt;BR /&gt;INFO: Loading XML bean definitions from class path resource [activiti.cfg.xml]&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource&lt;BR /&gt;INFO: performing create on engine with resource org/activiti/db/create/activiti.h2.create.engine.sql&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource&lt;BR /&gt;INFO: performing create on history with resource org/activiti/db/create/activiti.h2.create.history.sql&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource&lt;BR /&gt;INFO: performing create on identity with resource org/activiti/db/create/activiti.h2.create.identity.sql&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.ProcessEngineImpl &amp;lt;init&amp;gt;&lt;BR /&gt;INFO: ProcessEngine default created&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.jobexecutor.JobExecutor start&lt;BR /&gt;INFO: Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable run&lt;BR /&gt;INFO: JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs&lt;BR /&gt;Nov 14, 2014 9:35:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;BR /&gt;INFO: Processing resource myProcess.bpmn20.xml&lt;BR /&gt;&lt;BR /&gt;Thread:1 event name:start – Inside listener for task:id TimerCatchEvent:timerintermediatecatchevent3 ….&amp;nbsp; @Fri Nov 14 09:35:37 PST 2014&lt;BR /&gt;Thread:22 event name:end – Inside listener for task:id TimerCatchEvent:timerintermediatecatchevent3 ….&amp;nbsp; @Fri Nov 14 09:35:50 PST 2014&lt;BR /&gt;&lt;BR /&gt;Thread:23 event name:start – Inside listener for task:id null:scripttask5 ….&amp;nbsp; @Fri Nov 14 09:35:50 PST 2014&lt;BR /&gt;Running command ..&lt;BR /&gt;&lt;BR /&gt;Thread:24607 event name:start – Inside listener for task:id null:scripttask5 ….&amp;nbsp; @Fri Nov 14 09:40:51 PST 2014&lt;BR /&gt;Running command ..&lt;BR /&gt;&lt;BR /&gt;Thread:22 event name:start – Inside listener for task:id null:scripttask5 ….&amp;nbsp; @Fri Nov 14 09:45:52 PST 2014&lt;BR /&gt;Running command ..&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 17:55:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185744#M138874</guid>
      <dc:creator>nchan</dc:creator>
      <dc:date>2014-11-14T17:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Timer fired every 5 minutes while executing a long running command</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185745#M138875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Five minutes seems very long, my guess is that the job executor thinks the jon is stuck and releases it, and then executes it again. You can set the locktime to be higher than 5 minutes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 23:20:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185745#M138875</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-11-19T23:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timer fired every 5 minutes while executing a long running command</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185746#M138876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;gt;Activiti team, I request you to capture this behavior either in the user guide or FAQ, please. This would definitely save lot of man hours.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be even cooler if you could create a pull request for this &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; I takes as much time as writing this post &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; (see &lt;/SPAN&gt;&lt;A href="http://www.jorambarrez.be/blog/2014/11/05/how-to-create-an-activiti-pull-request/" rel="nofollow noopener noreferrer"&gt;http://www.jorambarrez.be/blog/2014/11/05/how-to-create-an-activiti-pull-request/&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The lock time is configurable. However, the approach with the receive task is certainly the more preferred approach.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 08:58:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185746#M138876</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-11-20T08:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timer fired every 5 minutes while executing a long running command</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185747#M138877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your response. I found out the real issue and a fix for this. Posting it for the benefit of others. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[size=20]scenario[/size]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;START — TimerCatchingEvent (PT10S Intermediate Event) (This could be any async script (or) service task) — ScriptTask (or) Service Task (Long running - runs for more than 5 min) — END&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[size=20]Issue[/size]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti considers any tasks running for more than 5 min as long running tasks and thinks that the task is stuck and rerun from the point where the new thread is created (i believe as jbarrez said the job executor does this) in the workflow. It would be nice if this 5 min limit is captured in the user guide. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even marking the long running task (script (or) service) as 'async' doesn't help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Activiti team, &lt;/SPAN&gt;&lt;SPAN style="color:#FF0000;"&gt;I request you to capture this behavior either in the user guide or FAQ&lt;/SPAN&gt;&lt;SPAN&gt;, please. This would definitely save lot of man hours.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[size=20]Solution[/size]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Make your delegate as a receive task - extend from ReceiveTaskActivityBehavior&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;eg: public class MyReceiveTask extends ReceiveTaskActivityBehavior&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Signal it using runtimeService once the task is done. Assuming your service task id is 'servicetask1' you could signal the task using runtimeService.signal("servicetask1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Found a relevant thread that explains job executor timeout: &lt;/SPAN&gt;&lt;BR /&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 19:13:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-fired-every-5-minutes-while-executing-a-long-running/m-p/185747#M138877</guid>
      <dc:creator>nchan</dc:creator>
      <dc:date>2014-11-20T19:13:28Z</dc:date>
    </item>
  </channel>
</rss>

