Details
-
Feature Request
-
Resolution: Fixed
-
L3 - Default
-
None
Description
There are two cases in which an execution listener that is registered on the event "end" is called:
- when the activity it is defined on completes successfully
- when the process instance is cancelled, for example by a terminate end event or by API (e.g. runtimeService#deleteProcessInstance)
AT:
- There is a way to differentiate between these two cases when developing an execution listener
There are two ways to approach this problem:
1. We expose the method isCanceled() in the interface DelegateExecution. This way, an execution listener can check whether the activity ended successfully or not
2. We introduce two new events a listener can register on, perhaps named "success" and "cancel" that differentiate between these cases. For backwards compatibility, we have to keep "end" and ensure that an "end" execution listener is called in both cases