Better design for an infinite retry error handling BPMN

The scenario is that when a user completes a user task by filling out a form, the system will start a provisioning process.

Usually, these provision-related service tasks may fail because the user filled in the wrong information.

We can’t verify the information provided by the user before provisioning, the only way to verify is to try to provision.

When any service task throws an error, the process should “retry”, which means the user task should be executed again.

And also, when a service task is done without any error, the next retry won’t execute it again.

Currently, I design this BPMN for this scenario, and it has the behavior I expected.


error-handling.bpmn (16.9 KB)

However, it looks a little complicated, and I wonder if there’s a better design for this.

Thanks.

Hi @kent010341,

Below model might be more readable.

1 Like

I had a very similar idea to @hassang :slight_smile:

2 Likes

If all tasks can be executed in parallel then I believe @Niall model is the best to go with.

If task2 should follow task1 then I believe using parallel and exclusive gateways could be the best option to have a consistent easy to read model.

1 Like

Hi, @Niall and @hassang. Thanks for sharing your ideas!

I made this simple BPMN for POC, and I use a Java application for the external service task.

I have a question for these BPMN, what would happen if one of the service tasks takes a long time to succeed or throw an exception, and the other one throws an exception very fast, and then the user task is complete before the previous long-running service task is completed?

Since my service tasks are used to send data (such as provisioning permission, creating person data, etc.) to other systems, I am worried about the transaction.

And also, task 1 and task 2 are for system A, and task 3 is for system B, and I want the tasks for both systems can run at the same time (parallel).

Thanks a lot.