Asynchronous Behavious through process Engine

Hi Folks,

I went through transactions in camunda which says we can’t commit to DB unless a wait state occurs but if any exception happen in between it will roll back to previous stable state, the problem with this we can’t track exactly where the error has come and nothing is logged in act_hi_op_log as well , so to achieve this we have to mark elements as Async Before/after in modeler but instead of that we need to provide default behaviour to all elements , is there any way we can set it up in process engine .

Thank you.

You can provide a custom BpmnParseListener that amends all of the activities you need by setting the appropriate async flags. Typically, you would use one that runs after the default parsing has taken place, i.e., in the ProcessEngineConfiguration, that’s the postParseListeners list you want to add yours to.

The parse listener will be applied to any process definition that’s loaded into memory for execution, before the execution takes place.

1 Like

A similar situation has been discussed here: Showing which step really failed