I have basically in the need of the same functionality depicted in this entry terminate-long-running-process.
The solution given by Niall looks very clean however I could not make it work for our process. Our process looks like the following simplified model
The subprocess XML definition is follwing:
<bpmn:subProcess id="SubProcess_0nuqv0k" name="Timer Subprocess" triggeredByEvent="true"> <bpmn:endEvent id="EndEvent_0pkuw91"> <bpmn:incoming>SequenceFlow_1ett7tf</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1ett7tf" sourceRef="IntermediateThrowEvent_18iuwaz" targetRef="EndEvent_0pkuw91" /> <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_18iuwaz" name="GlobalTimerCatch"> <bpmn:outgoing>SequenceFlow_1ett7tf</bpmn:outgoing> <bpmn:timerEventDefinition> <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT3M</bpmn:timeDuration> </bpmn:timerEventDefinition> </bpmn:intermediateCatchEvent> </bpmn:subProcess>
The problem is the event subprocess does not catch any timer event and finish process. I tried with terminate end event but it did not bring anything. The process can stay indefinitely long in a user task and also after a transition the subprocess timer is not kicked.
Can it be the case that we start the process upon a message triggered from our rest controller or do I miss something else?
Thanks in advance for any help or hint.