How to have a dynamic condition expression for an exclusive gateway?

Hi all!
I would like to have 2 different condition expressions for a single exclusive gateway.

For example: For a particular scenario, I want the condition expression for the exclusive gateway to be ’ some x in a satisfies x = “b” '. Whereas for another scenario, I want the condition expression to be ’ (some x in a satisfies x = “b”) and (some y in a satisfies y = “c”) ’ for the same exclusive gateway.

How can I implement this?

Hi @Yogapriya, welcome to the forums! I think you can do this with a simple FEEL expression: =(x = "a") or (x = "b" and y = "c"). You can test these expressions in the FEEL Playground too! (Clicking that link should open an example with this expression!)

Hi @nathan.loding, thanks for the reply! I’m combining this exclusive gateway to a timer and a service task.
For my scenario, the expression i need is something like this: = (x = “a” and y = “c”) or (x = “a”) , Where x compares to the same value “a” in the former and latter part of the condition. And since I have a timer, even if the value of “c” is initially null, before the timer task ends “c” can have a value. So I do not want the flow to exit only because the latter part (x=“a”) is met.
And for certain other scenarios, the value of “c” will always be null, throughout the timer task, so only those should exit the flow because (x = “a”) is met.

@Yogapriya - the expression =(x = "a" and y = "c") or (x = "a") will be true for all values of y. Or said another way, as long as x = "a", that expression is true, so I would simplify to x = "a".

What would be helpful is to see a draft of your model. Can you model it and share the BPMN?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.