Get taskInstanceId from DelegateExecution

We have a requirement to collect information about each failure retries of service task in our custom tables. We partially achieved this through the use of a class that implements FlowableEventListener interface. In this class, we listen to the TASK_XXX events and store data like task instance ID, created time, completed time, etc… However, there is no TASK_FAILURE event type, so if the service task fails, we are not able to capture the completed time since no event is fired. Is there some other event we can listen to that will be fired on an exception that was thrown in a service task?

Hey @jkli123,

If a service task fails then it won’t be completed. Usually, the transaction will be rollbacked.

Cheers,
Filip