SignalEvent Handling in Flowable vs Activiti

Hi there,

has the signalEvant handling been changed in flowable 6?

the blow snippet works in activiti 5.22.0 but produces an error in flowable 6.0.1
org.flowable.engine.common.api.FlowableException: Execution '6' has not subscribed to a signal event with name 'signal'.

public class SignalTest {
	public void testSignal() {
		ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

		TaskService taskService = processEngine.getTaskService();
		RepositoryService repositoryService = processEngine.getRepositoryService();
		RuntimeService runtimeService = processEngine.getRuntimeService();

		Task t = taskService.createTaskQuery().taskDefinitionKey("userTask").singleResult();
		runtimeService.signalEventReceived("signal", t.getExecutionId());
		assertTrue(runtimeService.createProcessInstanceQuery().list().size() == 0);	    

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="" xmlns:xsi="" xmlns:xsd="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" xmlns:flowable="" typeLanguage="" expressionLanguage="" targetNamespace="Examples">
  <signal id="signal" name="signal"></signal>
  <process id="eventProcess" isExecutable="true">
    <startEvent id="start"></startEvent>
    <userTask id="userTask" name="User Task"></userTask>
    <boundaryEvent id="boundaryEvent" name="Boundary event" attachedToRef="userTask" cancelActivity="true">
      <signalEventDefinition signalRef="signal"></signalEventDefinition>
    <sequenceFlow id="flow4" sourceRef="userTask" targetRef="end"></sequenceFlow>
    <endEvent id="end"></endEvent>
    <scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script><![CDATA[out:println "Signal Received";]]></script>
    <sequenceFlow id="flow7" sourceRef="boundaryEvent" targetRef="scripttask1"></sequenceFlow>
    <sequenceFlow id="flow8" sourceRef="scripttask1" targetRef="end"></sequenceFlow>
    <sequenceFlow id="flow9" sourceRef="start" targetRef="userTask"></sequenceFlow>


The execution id of the signal event can be different than in Activiti 5.22.0. In Flowable 6 more executions are created so scoping is better handled and the execution tree is more consistent. You could query for the correct execution with the ExecutionQuery signalEventSubscriptionName method.

Best regards,


Hi Tijs,

thanks for the reply. I see that ExecutionQuery returns a execution, but this is now the boundary event.
Now I have to run the query and navigate to the parent’s execution Id, first.

Previously, in activiti, I used to use the execution Id of the ScopeExecution, which was the UserTask in my example, directly. I liked the old style as this made it quite easy to signal a UserTask, i.e. to abort it, with just one TaskQuery.