A simple process start event -> task -> terminate end event + execution listener on the terminate end event.
Execution listener is invoked twice with the event "end" and more specifically in the order "end" -> "start" -> "end".
The execution listener invocation order "start" -> "end" for a listener defined on the terminate end event.
There appears to be a problem that AtomicOperationTransitionNotifyListenerTake triggers scope cancellation (cf. line 71) if the following activity is a scope cancelling one, leading to the first "end" event invocation. However, the end event is then regularly executed such that the listener is invoked again with "start" and "end" events.
See failing test case: https://github.com/camunda/camunda-bpm-platform/commit/515581aa84377aabeaaf4aa9750f76841f7484cf
Forum discussion: https://groups.google.com/forum/#!topic/camunda-bpm-users/nFlmxFaKngM