AnsweredAssumed Answered

Is Boundary Signal Event even support for Service Task?

Question asked by cls on Mar 10, 2017
Latest reply on Mar 14, 2017 by cls

Hey experts - I am new to Activiti and recently hitting a problem in trying to stop an active process.  The reason of doing that is a breakglass handling when a service task is stuck in execution.

 

We tried to attach a boundary signal event to our Service process, but then on calling signalEventReceived, nothing happens, and the task is not killed (proven by some log dump to the process itself).

Is Boundary event even support for service task?

 

<signal id="sForceTerminate" name="sForceTerminateName" activiti:scope="global"></signal>
<message id="ElocateRequest" name="ElocateRequest"></message>
<process id="ElocateRequestProcess" isExecutable="true">
<startEvent id="AmpsMessageReceived" name="Elocate Request">
<messageEventDefinition messageRef="ElocateRequest"></messageEventDefinition>
</startEvent>
<serviceTask id="CreateElocateRequest" name="Create elocate request" activiti:async="true" activiti:expression="${messageConverter.convertRequestToObject(execution)}"></serviceTask>
<sequenceFlow id="IsElocateRequest" sourceRef="AmpsMessageReceived" targetRef="CreateElocateRequest"></sequenceFlow>
<sequenceFlow id="sid-05EF09EE-83F6-43F9-A367-34BC52E0AF2B" sourceRef="ForceTerminateEvent" targetRef="sid-D21BB7B8-BC83-46F2-BE23-DE4759CA732E"></sequenceFlow>
<boundaryEvent id="ForceTerminateEvent" attachedToRef="CreateElocateRequest" cancelActivity="true">
<signalEventDefinition signalRef="sForceTerminate"></signalEventDefinition>
</boundaryEvent>
<serviceTask id="sid-D21BB7B8-BC83-46F2-BE23-DE4759CA732E" name="Post Termination Processing" activiti:expression="${postHandler.execute(execution)}"></serviceTask>
<endEvent id="sid-696F0901-FC92-4F3C-A832-31C1898DAE41"></endEvent>
<sequenceFlow id="sid-E4852BD7-56DD-4E71-AE18-F6A75EBEF6CE" sourceRef="CreateElocateRequest" targetRef="sid-696F0901-FC92-4F3C-A832-31C1898DAE41"></sequenceFlow>
<sequenceFlow id="sid-55466468-EAC3-4B01-87D9-F52BABEE5094" sourceRef="sid-D21BB7B8-BC83-46F2-BE23-DE4759CA732E" targetRef="sid-696F0901-FC92-4F3C-A832-31C1898DAE41"></sequenceFlow>
</process>

Outcomes