AnsweredAssumed Answered

End event triggered on non-canceling boundary timer?

Question asked by jhahn on Apr 7, 2015
Latest reply on Apr 14, 2015 by jhahn
If there's a boundary timer with execution listener for event end, is it expected behavior that a non-canceling boundary timer will trigger the event end? So I have a receive task with a non-canceling timer with 30s timer. After 30s, it will execute the

<activiti:executionListener event="end" expression="${execution.setVariable(&quot;test&quot;, true)}"></activiti:executionListener>

Is this expected behavior? I expected it to not trigger since non-canceling timer doesn't really end the receive task?

Also, I'm a little confused on the documentation for execution listener. It says for event="start", it will NOTIFY the execution listener when it starts but only EXECUTE/CALL the notify function when an end event occurs. Then it says the 3rd execution listener (event="end") in that example will be CALLED when it "ends".

Is notify and call different? If event="start" and event="end" will both only be actually called when end event occurs, what's the difference?

Anyway, here is the test process for the first question.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="" xmlns:xsi="" xmlns:xsd="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="">
  <process id="myProcess" name="My process" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <receiveTask id="receivetask1" name="Receive Task">
        <activiti:executionListener event="end" expression="${execution.setVariable(&quot;test&quot;, true)}"></activiti:executionListener>
    <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="receivetask1" cancelActivity="false">
    <userTask id="usertask1" name="User Task"></userTask>
    <sequenceFlow id="flow1" sourceRef="boundarytimer1" targetRef="usertask1"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="startevent1" targetRef="receivetask1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow3" sourceRef="receivetask1" targetRef="endevent1"></sequenceFlow>