We have a process that can end up in a user task. If the user goes into the cockpit and decides to just cancel the instance, we need to be able to catch this and clean up. This used to work but no longer seems to - we are using v7.15.3-ee.
What we have implemented looks like this in the BPMN:
<bpmn:process id=“ProcessID” name=“ProcessName” isExecutable=“true” camunda:versionTag=“1.7.0” camunda:historyTimeToLive=“6” camunda:isStartableInTasklist=“false”>
bpmn:extensionElements
<camunda:executionListener delegateExpression=“${processLifecycleListener}” event=“end” />
</bpmn:extensionElements>
and then there is some Java code that looks like:
public class ProcessLifecycleListener implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
final ExecutionEntity executionEntity = (ExecutionEntity) execution;
if (executionEntity.isCanceled()) {
LOGGER.debug(“Process instance {} was cancelled”, executionEntity.getProcessBusinessKey());
As I have already said, this used to work but now the listener only gets called when the process completes normally and not when it is cancelled. After cancelling the instance says ‘Cancelled externally’ in the cockpit.
Any ideas on how I get this to work?
Thanks
Mike