when I try to cancel a user task by means of a signal boundary event I get the error message "Execution has not subscribed to a signal event with name ‘sigCancel’. Below is the test process.
Is it possible at all to interrupt a user task with a boundary signal event?
In a unit test (the one provided by Camunda test-project) I do the following after starting the process:
// Given we create a new process instance ProcessInstance processInstance = runtimeService().startProcessInstanceByKey("testProcess"); // Then it should be active assertThat(processInstance).isActive(); // And it should be the only instance assertThat(processInstanceQuery().count()).isEqualTo(1); // And there should exist just a single task within that process instance assertThat(task(processInstance)).isNotNull(); final String currentActivityId = rule.getRuntimeService().getActiveActivityIds(processInstance.getId()).get(0); Assertions.assertThat(currentActivityId).isEqualTo("utTest"); // cancel task rule.getRuntimeService().signalEventReceived("sigCancel", processInstance.getId());
testProcess.bpmn (3.8 KB)
Thanks in advance,