Retry logic using Message events for error handling

Hi all,

I have an Event Subprocess with an Error Start Event to handle API/business errors.
When an API call in Service C subprocess fails, the event subprocess is triggered, and a user form appears allowing the user to choose Retry.

When user selects Retry flow proceeds to message intermediate throw event, which should retry the API service task to which the message intermediate catch event is attached(in this case, the one inside Service C). I am also using unique correlation key for message correlation. However, the task is not being retried as expected.

Thanks!

I believe that when the Error on Service C was thrown, that process’s scope was terminated, therefore there was nobody listening to the retry message.

There are multiple reasons why this doesn’t work.

First, @claudio_rio is right. When an error occurs, the event sub-process interrupts (i.e. terminates) the process instance. Only the event sub-process can be finished in this state.

Second, the message catch event never becomes active. An embedded sub process only starts with the none start event.

@Niall I’m actually surprised this can be deployed. Are there some checks needed to prevent such models?

Third, messaging within a process instance is not allowed by BPMN.

In your example, try attaching an error event on the “Service C” sub process instead of using an even sub process. When the the user wants to retry, you can simply flow back to the embedded sub-process.

And it is not even a Message Start event - which would violate the sub-process rule anyway. It’s a Message Intermediate event with an exit point and no entry point. I would expect that model to be flagged as syntactically incorrect.