Boundary Timer Event isn't getting triggered

Hello,

I’ve added Boundary Timer Event but it’s not getting triggered, could you please take a look?
Here is the BPMN Process xml,

<?xml version="1.0" encoding="UTF-8"?>

<bpmn:definitions xmlns:bpmn=“http://www.omg.org/spec/BPMN/20100524/MODEL
xmlns:di=“http://www.omg.org/spec/BPMN/20100524/DI
xmlns:dc=“http://www.omg.org/spec/DD/20100524/DC
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xmlns:di_1=“http://www.omg.org/spec/DD/20100524/DI
xmlns:flowable=“Open Source
id=“idCASImportProcessDefinition”
targetNamespace=“https://flowable.com/open-source/test
exporterVersion=“7.3.0”>
<bpmn:process id=“CAS_IMPORT” name=“CAS Import Scenario” isExecutable=“true”>
<bpmn:startEvent id=“idStartEvent” name=“Start Event” />
<bpmn:sequenceFlow id=“idsequenceFlow1” sourceRef=“idStartEvent” targetRef=“idParseDescriptorsAndValidationsAndOrderList” />
<bpmn:serviceTask id=“idParseDescriptorsAndValidationsAndOrderList” name=“Parse descriptors and Validations” flowable:async=“true” flowable:delegateExpression=“${parseDescriptorsAndValidationsAndOrderList}” />
<bpmn:sequenceFlow id=“Flow_1unfx48” sourceRef=“idParseDescriptorsAndValidationsAndOrderList” targetRef=“idUploadAndDeploy”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“Flow_0gqeaos” sourceRef=“idParseDescriptorsAndValidationsAndOrderList” targetRef=“idCASDeleteReources”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id=“idUploadAndDeploy” name=“Upload and Deploy” flowable:delegateExpression=“${uploadAndDeploy}” />
<bpmn:sequenceFlow id=“idsequenceFlow9” sourceRef=“idUploadAndDeploy” targetRef=“idUploadAndDeploy”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“idsequenceFlow3” sourceRef=“idUploadAndDeploy” targetRef=“idGetGACDStatus”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“idsequenceFlow10” sourceRef=“idUploadAndDeploy” targetRef=“idCASDeleteReources”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>${(numOfDeployedModules >= numOfModules)}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id=“idGetGACDStatus” name=“Get Status” flowable:delegateExpression=“${getGACDStatus}” />
<bpmn:boundaryEvent id=“idBE1” name=“BoundaryEvent1” attachedToRef=“idGetGACDStatus”>
bpmn:timerEventDefinition
bpmn:timeDurationPT1S</bpmn:timeDuration>
</bpmn:timerEventDefinition>
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id=“idsequenceFlow11” sourceRef=“idBE1” targetRef=“idSetStatusAborted”></bpmn:sequenceFlow>
<bpmn:serviceTask id=“idSetStatusAborted” name=“Set Status Aborted” flowable:delegateExpression=“${setStatusAborted}” />
<bpmn:sequenceFlow id=“idsequenceFlow12” sourceRef=“idSetStatusAborted” targetRef=“idGetGACDLogs” />
<bpmn:sequenceFlow id=“idsequenceFlow4” sourceRef=“idGetGACDStatus” targetRef=“idGetGACDLogs” />
<bpmn:serviceTask id=“idGetGACDLogs” name=“Get Logs” flowable:delegateExpression=“${getGACDLogs}” />
<bpmn:sequenceFlow id=“idsequenceFlow5” sourceRef=“idGetGACDLogs” targetRef=“idGACDDelete” />
<bpmn:serviceTask id=“idGACDDelete” name=“Delete Content” flowable:delegateExpression=“${gACDDelete}” />
<bpmn:sequenceFlow id=“idsequenceFlow7” sourceRef=“idGACDDelete” targetRef=“idUploadAndDeploy”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>${(numOfDeployedModules < numOfModules)}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“idsequenceFlow6” sourceRef=“idGACDDelete” targetRef=“idCASDeleteReources”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>${(numOfDeployedModules >= numOfModules)}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id=“idCASDeleteReources” name=“CAS Delete Reources from Disk” flowable:delegateExpression=“${cASDeleteResources}” />
<bpmn:sequenceFlow id=“idsequenceFlow8” sourceRef=“idCASDeleteReources” targetRef=“idEndEvent” />
<bpmn:endEvent id=“idEndEvent” name=“End Event” />
</bpmn:process>
<di:BPMNDiagram id=“BPMNDiagram_1”>
<di:BPMNPlane id=“BPMNPlane_1” bpmnElement=“CAS_IMPORT”>
<di:BPMNEdge id=“Flow_1l498j2_di” bpmnElement=“idsequenceFlow8”>
<di_1:waypoint x=“1189.9499999999564” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“1230.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0b7xahl_di” bpmnElement=“idsequenceFlow6”>
<di_1:waypoint x=“1029.95” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“1090.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“idsequenceFlow7_di” bpmnElement=“idsequenceFlow7”>
<di_1:waypoint x=“980” y=“180” />
<di_1:waypoint x=“980” y=“80” />
<di_1:waypoint x=“470” y=“80” />
<di_1:waypoint x=“470” y=“180” />
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_1l498j1_di” bpmnElement=“idsequenceFlow5”>
<di_1:waypoint x=“859.9499999999999” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“930.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0548kcs_di” bpmnElement=“idsequenceFlow4”>
<di_1:waypoint x=“699.9499999999999” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“760.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0p7myzy_di” bpmnElement=“idsequenceFlow3”>
<di_1:waypoint x=“519.95” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“600.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0p7abzy_di” bpmnElement=“idsequenceFlow9”>
<di_1:waypoint x=“445.0” y=“180.0”></di_1:waypoint>
<di_1:waypoint x=“445.0” y=“83.0”></di_1:waypoint>
<di_1:waypoint x=“421.0” y=“83.0”></di_1:waypoint>
<di_1:waypoint x=“421.0” y=“180.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0gqeaos_di” bpmnElement=“Flow_0gqeaos”>
<di_1:waypoint x=“320.0” y=“259.95000000000005”></di_1:waypoint>
<di_1:waypoint x=“320.0” y=“350.0”></di_1:waypoint>
<di_1:waypoint x=“1140.0” y=“350.0”></di_1:waypoint>
<di_1:waypoint x=“1140.0” y=“259.95000000000005”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_1unfx48_di” bpmnElement=“Flow_1unfx48”>
<di_1:waypoint x=“370” y=“220” />
<di_1:waypoint x=“420” y=“220” />
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_1skh859_di” bpmnElement=“idsequenceFlow1”>
<di_1:waypoint x=“369.9499999999581” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“419.9999999999364” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNShape id=“Event_08epzk5_di” bpmnElement=“idStartEvent”>
<dc:Bounds x=“162” y=“202” width=“30” height=“30” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0618a0d_di” bpmnElement=“idParseDescriptorsAndValidationsAndOrderList”>
<dc:Bounds x=“270” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0r9ung1_di” bpmnElement=“idUploadAndDeploy”>
<dc:Bounds x=“420” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0bimd7i_di” bpmnElement=“idGetGACDStatus”>
<dc:Bounds x=“600” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0l5431c_di” bpmnElement=“idGetGACDLogs”>
<dc:Bounds x=“760” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_1h6t3sj_di” bpmnElement=“idGACDDelete”>
<dc:Bounds x=“930” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_1h6t3sy_di” bpmnElement=“idCASDeleteReources”>
<dc:Bounds x=“1090” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Event_0na780t_di” bpmnElement=“idEndEvent”>
<dc:Bounds x=“1230” y=“206” width=“28” height=“28” />
di:BPMNLabel
<dc:Bounds x=“1245” y=“206” width=“28” height=“28” />
</di:BPMNLabel>
</di:BPMNShape>
</di:BPMNPlane>
</di:BPMNDiagram>
</bpmn:definitions>

Regards,
Ashmita Sinha

Import failed for the given xml. Error message: Error reading XML.
Probably some tags are missing in the XML ?

Yeah, while pasting here it’s getting deleted.Take this,

<?xml version="1.0" encoding="UTF-8"?>

<bpmn:definitions xmlns:bpmn=“http://www.omg.org/spec/BPMN/20100524/MODEL
xmlns:di=“http://www.omg.org/spec/BPMN/20100524/DI
xmlns:dc=“http://www.omg.org/spec/DD/20100524/DC
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xmlns:di_1=“http://www.omg.org/spec/DD/20100524/DI
xmlns:flowable=“http://flowable.org/bpmn
id=“idCASImportProcessDefinition”
targetNamespace=“https://flowable.com/open-source/test
exporterVersion=“7.3.0”>
<bpmn:process id=“CAS_IMPORT” name=“CAS Import Scenario” isExecutable=“true”>
<bpmn:startEvent id=“idStartEvent” name=“Start Event” />
<bpmn:sequenceFlow id=“idsequenceFlow1” sourceRef=“idStartEvent” targetRef=“idParseDescriptorsAndValidationsAndOrderList” />
<bpmn:serviceTask id=“idParseDescriptorsAndValidationsAndOrderList” name=“Parse descriptors and Validations” flowable:async=“true” flowable:delegateExpression="{parseDescriptorsAndValidationsAndOrderList}" /> <bpmn:sequenceFlow id="Flow_1unfx48" sourceRef="idParseDescriptorsAndValidationsAndOrderList" targetRef="idUploadAndDeploy"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[{(isValidDescriptor == “YES”)}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“Flow_0gqeaos” sourceRef=“idParseDescriptorsAndValidationsAndOrderList” targetRef=“idCASDeleteReources”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id=“idUploadAndDeploy” name=“Upload and Deploy” flowable:delegateExpression="{uploadAndDeploy}" /> <bpmn:sequenceFlow id="idsequenceFlow9" sourceRef="idUploadAndDeploy" targetRef="idUploadAndDeploy"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[{isUploadAndDeployFailed}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“idsequenceFlow3” sourceRef=“idUploadAndDeploy” targetRef=“idGetGACDStatus”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“idsequenceFlow10” sourceRef=“idUploadAndDeploy” targetRef=“idCASDeleteReources”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>{(numOfDeployedModules &gt;= numOfModules)}</bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:serviceTask id="idGetGACDStatus" name="Get Status" flowable:delegateExpression="{getGACDStatus}" />
<bpmn:boundaryEvent id=“idBE1” name=“BoundaryEvent1” attachedToRef=“idGetGACDStatus”>
bpmn:timerEventDefinition
bpmn:timeDurationPT1S</bpmn:timeDuration>
</bpmn:timerEventDefinition>
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id=“idsequenceFlow11” sourceRef=“idBE1” targetRef=“idSetStatusAborted”></bpmn:sequenceFlow>
<bpmn:serviceTask id=“idSetStatusAborted” name=“Set Status Aborted” flowable:delegateExpression="{setStatusAborted}" /> <bpmn:sequenceFlow id="idsequenceFlow12" sourceRef="idSetStatusAborted" targetRef="idGetGACDLogs" /> <bpmn:sequenceFlow id="idsequenceFlow4" sourceRef="idGetGACDStatus" targetRef="idGetGACDLogs" /> <bpmn:serviceTask id="idGetGACDLogs" name="Get Logs" flowable:delegateExpression="{getGACDLogs}" />
<bpmn:sequenceFlow id=“idsequenceFlow5” sourceRef=“idGetGACDLogs” targetRef=“idGACDDelete” />
<bpmn:serviceTask id=“idGACDDelete” name=“Delete Content” flowable:delegateExpression="{gACDDelete}" /> <bpmn:sequenceFlow id="idsequenceFlow7" sourceRef="idGACDDelete" targetRef="idUploadAndDeploy"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">{(numOfDeployedModules < numOfModules)}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id=“idsequenceFlow6” sourceRef=“idGACDDelete” targetRef=“idCASDeleteReources”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>{(numOfDeployedModules &gt;= numOfModules)}</bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:serviceTask id="idCASDeleteReources" name="CAS Delete Reources from Disk" flowable:delegateExpression="{cASDeleteResources}" />
<bpmn:sequenceFlow id=“idsequenceFlow8” sourceRef=“idCASDeleteReources” targetRef=“idEndEvent” />
<bpmn:endEvent id=“idEndEvent” name=“End Event” />
</bpmn:process>
<di:BPMNDiagram id=“BPMNDiagram_1”>
<di:BPMNPlane id=“BPMNPlane_1” bpmnElement=“CAS_IMPORT”>
<di:BPMNEdge id=“Flow_1l498j2_di” bpmnElement=“idsequenceFlow8”>
<di_1:waypoint x=“1189.9499999999564” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“1230.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0b7xahl_di” bpmnElement=“idsequenceFlow6”>
<di_1:waypoint x=“1029.95” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“1090.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“idsequenceFlow7_di” bpmnElement=“idsequenceFlow7”>
<di_1:waypoint x=“980” y=“180” />
<di_1:waypoint x=“980” y=“80” />
<di_1:waypoint x=“470” y=“80” />
<di_1:waypoint x=“470” y=“180” />
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_1l498j1_di” bpmnElement=“idsequenceFlow5”>
<di_1:waypoint x=“859.9499999999999” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“930.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0548kcs_di” bpmnElement=“idsequenceFlow4”>
<di_1:waypoint x=“699.9499999999999” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“760.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0p7myzy_di” bpmnElement=“idsequenceFlow3”>
<di_1:waypoint x=“519.95” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“600.0” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0p7abzy_di” bpmnElement=“idsequenceFlow9”>
<di_1:waypoint x=“445.0” y=“180.0”></di_1:waypoint>
<di_1:waypoint x=“445.0” y=“83.0”></di_1:waypoint>
<di_1:waypoint x=“421.0” y=“83.0”></di_1:waypoint>
<di_1:waypoint x=“421.0” y=“180.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_0gqeaos_di” bpmnElement=“Flow_0gqeaos”>
<di_1:waypoint x=“320.0” y=“259.95000000000005”></di_1:waypoint>
<di_1:waypoint x=“320.0” y=“350.0”></di_1:waypoint>
<di_1:waypoint x=“1140.0” y=“350.0”></di_1:waypoint>
<di_1:waypoint x=“1140.0” y=“259.95000000000005”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_1unfx48_di” bpmnElement=“Flow_1unfx48”>
<di_1:waypoint x=“370” y=“220” />
<di_1:waypoint x=“420” y=“220” />
</di:BPMNEdge>
<di:BPMNEdge id=“Flow_1skh859_di” bpmnElement=“idsequenceFlow1”>
<di_1:waypoint x=“369.9499999999581” y=“220.0”></di_1:waypoint>
<di_1:waypoint x=“419.9999999999364” y=“220.0”></di_1:waypoint>
</di:BPMNEdge>
<di:BPMNShape id=“Event_08epzk5_di” bpmnElement=“idStartEvent”>
<dc:Bounds x=“162” y=“202” width=“30” height=“30” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0618a0d_di” bpmnElement=“idParseDescriptorsAndValidationsAndOrderList”>
<dc:Bounds x=“270” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0r9ung1_di” bpmnElement=“idUploadAndDeploy”>
<dc:Bounds x=“420” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0bimd7i_di” bpmnElement=“idGetGACDStatus”>
<dc:Bounds x=“600” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_0l5431c_di” bpmnElement=“idGetGACDLogs”>
<dc:Bounds x=“760” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_1h6t3sj_di” bpmnElement=“idGACDDelete”>
<dc:Bounds x=“930” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Activity_1h6t3sy_di” bpmnElement=“idCASDeleteReources”>
<dc:Bounds x=“1090” y=“180” width=“100” height=“80” />
</di:BPMNShape>
<di:BPMNShape id=“Event_0na780t_di” bpmnElement=“idEndEvent”>
<dc:Bounds x=“1230” y=“206” width=“28” height=“28” />
di:BPMNLabel
<dc:Bounds x=“1245” y=“206” width=“28” height=“28” />
</di:BPMNLabel>
</di:BPMNShape>
</di:BPMNPlane>
</di:BPMNDiagram>
</bpmn:definitions>

I think it’s still the same XML. I still see the di:BPMNLabel is not in any tag near the end of XML.

I’ve used boundary timer previously, this is how configuration looks in XML that I have:

<boundaryEvent id="BT1" attachedToRef="sid-0F5F4D4D-FCCE-4C6E-BDBD-70E79AACE49D" cancelActivity="true">
  <timerEventDefinition>
    <timeDuration>PT6H</timeDuration>
  </timerEventDefinition>
</boundaryEvent>

I’ve also tried it in a similar way, are there any pre-requisites for working with Boundary Timer Event? One is that you need to set asyncExecutorActivate to true.
Here when I’m pasting the XML, it is somehow removing few brackets for tags.

I didn’t use asyncExecutorActivate when using Boundary Timer on user tasks. Just configured the time and it worked.
Are you getting any error?
Instead of xml, you can try to share a screenshot of how you are using boundary timer

This is how I’ve used BE,

<bpmn:boundaryEvent id=“idBE1” name=“BoundaryEvent1” attachedToRef=“idGetGACDStatus”>
<bpmn:timerEventDefinition>
<bpmn:timeDuration>PT1S</bpmn:timeDuration>
</bpmn:timerEventDefinition>
</bpmn:boundaryEvent>

Which element has id idGetGACDStatus that is populated in attachedToRef attribute ?

It’s a service task as tagged above.

Hello,
Is there any constraint that Boundary Timer Event only works with user tasks and not with service tasks?

  • To have timers work, you indeed need the async executor component to be active

  • Boundary timers events will only work on wait states. They won’t work on service tasks that are not wait states (like automatic steps).

According to this documentation I understood that Boundary Timer Event works with all the activities which also includes Service Task.

Is there any other solution to this problem? I have a task to poll the status via Http request, if the task runs for more than 20 mins, then it should cancel it and proceed to next task.

Regards,
Ashmita Sinha

No, timer boundary do not work on automatic steps.

Do note that keeping a database open for 20 minutes is a bad practice. Typical databases won’t allow this.

A solution could be to send off to another system (e.g. using a send event) and then wait for it to come back. That would allow you to 1) place a boundary event 2) don’t keep the transaction open that long.