Lack of knowledge on how to handle correctly gateways


I’d like to model a schema where I can trigger 2 activites at the same time but if an activity is already in progress the second activity need to retry once the previous one is finished.

I modeled something like this and tried to play with token simulator but I wasn’t able to make it work.

Any idea?

Thank you

I have trouble understanding what you are trying to achieve.
Do you really want to trigger them at the same time? In this case, they always need to be retried, don’t they? Can you explain what you’re trying using your example? Can you give me a sequence of the activities A, X, Y, B, and C that you desire?

I try to be a little bit more clear.

I want for example to trigger a check of 2 documents at the same time but I can only check document one by one. Then if it’s check document A, then document B needs to be retried several minutes later until the slot is free.

I’ll give it a try:

I use events. Timer events are used to show that the token waits for a certain period before continuing. Error boundary events show that the task is interrupted if this error occurs. The AND join waits until both documents have been checked.

Is there a domain-specific reason, why you want to start the two activities concurrently, even if they can only be processed sequentially?

I would say that at the time we implemented the solution we weren’t aware that document were processed one by one. So it was a lack of knowledge.

I thank you for your explanation, yet, I have one more question because with the last gateway (AND join) it means that in order to complete the process both document need to be checked but they are independant. Yes, I’d like to check both but if for any reason when the document A is checked I have an issue the process can be finished so I guess I could have several end ways, no?

Yes, you can have multiple end-events. You can also catch this error and merge the flow beforehand:

1 Like

Is it possible to see how the token simulation behave in case of error on document B for example ?
When I run token simulation the token is duplicated on both activities and I have only one in the end but I thought that I would be able to “force” visually how it behaves.

With token simulation activated, you’ll see a pause button when you hover over the activities. If you click this button, the token will wait for user intervention.

You can decide whether the activity will be completed successfully or the error event will be caught: