Issue Getting Signal Boundary Event to Trigger


Heading 1

Heading 2

Col A1

Col A2

UPDATE 2: I fixed the hyperlinks so they don't redirect to, apologies for the mistake on my part!

UPDATE: I made a new account on the Activiti Forum and my topic was finally posted, so it's probably better to address the issue on the forum now. The link to the topic is here:
Please take a look at it and thank you!

My apologies for bringing up this issue here as I realize it's likely more of a conceptual issue than a bug, but on the Activiti forum my newly created topic would not post for some reason. As this is crucial to my (and probably others') workflows, I thought I'd directly ask the experts here on JIRA. I've been working on a project using Activiti 6.0.0.Beta2, and I've run into an issue with signal boundary events attached to user tasks not triggering. I've searched and made adjustments to my code based on what other people on this forum have said worked for them, but unfortunately I'm still having the same issue. I've created a unit test in Java along with a corresponding BPMN diagram which I've included below to illustrate the problem. The BPMN diagram is as follows:

The corresponding XML source code for the diagram follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" xmlns:tns="" xmlns:xsd="" xmlns:xsi="" xmlns:yaoqiang="" exporter="" exporterVersion="" expressionLanguage="" id="m1452892595912" name="" targetNamespace="" typeLanguage="" xsi:schemaLocation="">
<signal activiti:scope="processInstance" id="cancelSignal" name="Cancel Signal"/>
<process id="signalTestProcess" isClosed="false" isExecutable="true" processType="None">
<userTask completionQuantity="1" id="userTask" implementation="##unspecified" isForCompensation="false" name="User Task" startQuantity="1">
<boundaryEvent attachedToRef="userTask" cancelActivity="true" id="cancelTask" name="Cancel Task" parallelMultiple="false">
<signalEventDefinition id="cancelTaskEvent" signalRef="cancelSignal"/>
<startEvent id="startEvent" isInterrupting="true" name="Start Event" parallelMultiple="false">
<sequenceFlow id="startFlow" sourceRef="startEvent" targetRef="userTask"/>
<endEvent id="normalEndEvent" name="End Event">
<sequenceFlow id="cancelFlow" sourceRef="cancelTask" targetRef="cancelEndEvent"/>
<endEvent id="cancelEndEvent" name="End Event">
<sequenceFlow id="normalEndFlow" sourceRef="userTask" targetRef="normalEndEvent"/>

The code for the unit test follows:

Assert.assertEquals(1, runtimeService.createExecutionQuery().signalEventSubscriptionName("Cancel Signal").list().size());

runtimeService.signalEventReceived("Cancel Signal",
.signalEventSubscriptionName("Cancel Signal")

.map(h => h.getActivityName)

Assert.assertEquals(0, taskService.createTaskQuery().count());

When I run the unit test I get the error "java.lang.AssertionError: Expected :0 Actual :1" corresponding to the assertion in the last line. Also, the println function prints "User Task". These results seem to imply that after signalEventReceived is run, the execution remains at User Task instead of going down the signal boundary event flow. In terms of common issues with signal events that I've addressed in my code, the signal name (and not the signal id) is passed to signalEventReceived and the cancelActivity attribute for the signal boundary event is set to true. Also, as the first assertion passes successfully, I'm pretty certain that the correct execution id is being passed to signalEventReceived. If anyone could provide insight on why the execution still refuses to go down the signal boundary event flow I'd greatly appreciate it. Thanks!


OSX, Spring hello


Vlad Stan
December 8, 2016, 8:42 AM

Hi Ben,

I have managed to reproduce your issue. A similar scenario is covered in the unit test:

The only difference between your scenario and the unit test is that the unit test has a different scope for the Signal Event.
Unit Test:

Your test:

If you change the activiti:scope to global, your test will pass.

Vlad Stan
December 8, 2016, 8:51 AM

The scope for signal events is described here:

My assumption is that the processInstance scope makes sense when the Signal Event is thrown from inside the process (a SignalThrowingEvent).

When the signal is "thrown" from the API then the global scope should be used. If you specify the executionId, like you did:

Then only that executionId is notified (not all executions).

I have created a unit test with two processes to check that only one of them catches the event when an executionId is specified. You can find the test here:

Johnathan James
February 13, 2017, 5:46 PM

Is the verdict that this is not an issue? Or, should it at least be resolved as WONT FIX?


Joram Barrez


Ben Zheng




Affects versions