Conditional gateway - incoming sequence flow

Hello,

I am trying to model following use case with BPMN. would appreciate your help.

I have used parallel gateway to have 3 concurrent executions. which now, wait for 3 different messages.

Question.
Is there a “conditional gateway” that can be used for “join” executions which evaluates a certain condition? This gateway should evaluate a “condition” on each message catch event.

Execution should move ahead if either,

  1. Condition hold “true” on receiving any number of message.
  2. or, All 3 messages has been received.

Parallel Gateway, at join waits for all 3 messages to reach, Exclusive gateway doesn’t wait at all!

Please let me know if there is any clarification required!

Thanks,
Neeraj.

Just to understand correctly what exactly you’re expecting i wanted to just show you how the current model would work. So i used token simulation in the Camunda modeler to show what would happen if your current model used an XOR gateway at the end.
TokenFlow

Is this what you’re after?

3 Likes

Hi @Niall , thank you so much for quick reply.

If we use exclusive gateway, then 3 tokens reach at end state.

I wanted to know if there is a gateway which keeps a state, evaluate a condition and continue execution if either condition holds or all all messages has been exhausted?

Currently, I have used a service task with conditional sequence flow. Though I have not tested this with Token simulation / Camunda engine.

Also, I want to understand if there, if there is any cleaner approach to model this?

Thanks.

The XOR gateway i used in the above would be able to evaluate each message using a condition.

Yes, I can write a condition on exclusive gateway, and branch based on that. BUT 3 different tokens will reach at end state.

In this case, Task A and Task B will be performed multiple times.

Ok - for each message that is returned you want to evaluate something - but you only want one token to progress through the rest of the process.

At the moment the model doesn’t synchronize the tokens created by the paraelle gateway, so do you want to evaluate something after each one? or wait until all messages have been received before evaluating something?

I want to evaluate something after each message, but unlike exclusive gateway, execution should proceed only if condition holds true or all messages exhausted.

I need a gateway more like “Parallel Gateway” but instead of waiting for all messages to arrive, it should wait for either

  1. a certain condition to become true.
  2. all messages arrived / exhausted.

If any of the above condition is true, then only, execution should proceed ahead.

I think we can use Receive task Multi Instance activity along with interrupting boundary conditional event to model mentioned use case.

Screenshot 2021-05-21 at 11.27.10 PM