cancel
Showing results for 
Search instead for 
Did you mean: 

Boundary timer event not firing (jobExecutorActivate=true)

gavnunns
Champ on-the-rise
Champ on-the-rise
Hi I'm having a problem with a boundary timer event not firing.  I realize the typical issue for this is <property name="jobExecutorActivate" value="true"/> has not been set to true.  That is not the issue here.

Below is a snipit of code from my bpmn file.  The flow arrives at the user task and I expect the timer boundary event to trigger after 2 seconds (set for test purposes).  However the User task is never canceled and the email task that is linked to the timer boundary event is never called.

<userTask id="waitingForSecondPayment" name="Waiting For Second Payment" activiti:candidateGroups="ROLE_REQUESTOR"></userTask>
    <sequenceFlow id="flow6" sourceRef="notifySecondPayment" targetRef="waitingForSecondPayment"></sequenceFlow>
    <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="waitingForSecondPayment" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>PT2S</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <serviceTask id="notifyArchivedNo2ndPayment" name="Archived No 2nd Payment" activiti:type="mail">…


Any help would be very much appreciated.

Thanks
5 REPLIES 5

gavnunns
Champ on-the-rise
Champ on-the-rise
<code>
<userTask id="waitingForSecondPayment" name="Waiting For Second Payment" activiti:candidateGroups="ROLE_REQUESTOR"></userTask>
    <sequenceFlow id="flow6" sourceRef="notifySecondPayment" targetRef="waitingForSecondPayment"></sequenceFlow>
    <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="waitingForSecondPayment" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>PT2S</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <serviceTask id="notifyArchivedNo2ndPayment" name="Archived No 2nd Payment" activiti:type="mail">
</code>

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Gavin,

I did not find anything wrong there. Advice: Try create jUnit test (you can follow this template:http://forums.activiti.org/content/sticky-how-write-unit-test). Debug it and find rws in ACT_RU_JOB table it could help you to understand and find the problem.

Regards
Martin

gavnunns
Champ on-the-rise
Champ on-the-rise
Well I'm still baffled, I wrote a unit test and stepped through with debug, it is just not triggering the boundary timer event.  I even created a small test flow and the same thing occurred, then I tried placing the boundary event on a sub-process and again, nothing triggered.

What did fix it was upgrading from 5.12 -> 5.14.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Gavin,

There is jUnit test testing boundary events on user task in activiti sources. e.g.
org.activiti.engine.test.bpmn.event.timer.BoundaryTimerEventTest#testMultipleTimersOnUserTask
I am pretty sure that the same test is in 5.12. You can try to find it and run it. - May be it helps.

Regards
Martin

gavnunns
Champ on-the-rise
Champ on-the-rise
Solved - I got the unit tests working but I was still being baffled when the same bpmn was being run from my activiti engine. 

Then it dawned on me…. I had two Activiti Engines running and pointing at the same database, a stand alone one and Activiti explorer both with jobExecutorActivate = true, however Activti explorer did not have the correct class path so when it consumed the timed event a error would be thrown and lost in the tomcat logs (which I was not paying any attention too).  This also explains why I was getting multiple emails….

It all makes sense now Smiley Happy  Well at least it forced me to upgrade me to the latest version of Activiti running in all my projects

I'll put this one down to user error Smiley Wink