End-Event executionListener no longer executed in V6

We have a process with an executionListener that worked under Version 5. After the migration to flowable 6.2.1 the listener gets no longer called.

Here a Unit Test that worked under Flowable 5:

    @Test
	public void testEndExecutionListener() {
		ProcessInstance pi = runtimeService.startProcessInstanceByKey("myProcess");
		Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();
		taskService.complete(task.getId());
		assertEquals(pi.getProcessInstanceId(), listener.getPid());
	}

@Component
public class TestListener {

private String pid;

public void processEndListener(DelegateExecution ex) {
	pid = ex.getProcessInstanceId();
}

public String getPid() {
	return pid;
}
}

And the simple process

 <process id="myProcess" name="My process" isExecutable="true">
    <extensionElements>
     <activiti:executionListener event="end" expression="${testListener.processEndListener(execution)}">
     </activiti:executionListener>
   </extensionElements>
<startEvent id="startevent1" name="Start"></startEvent>
<endEvent id="terminateendevent1" name="TerminateEndEvent">
  <terminateEventDefinition></terminateEventDefinition>
</endEvent>
<userTask id="usertask1" name="User Task"></userTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="terminateendevent1"></sequenceFlow>
</process>
</definitions>

Any Ideas what’s going wrong here?
Thanks
Wolfgang

Hi Wolfgang,

Thanks for sharing this. The terminate end event logic has changed in the version 6 engine and it looks like the end event execution listener isn’t invoked anymore for terminate end events. Could you create an issue on the Flowable Engine Github page? We’ll make sure to get it fixed then.

Best regards,

Tijs

Hi Tijs,

please see: https://github.com/flowable/flowable-engine/issues/901

Thanks for fixing,

Wolfgang