User Question: How to use an OR condition in a WF decision step

[Possible Siebel?]



A reader from Texas, US, asked "How to use an OR condition in Siebel workflow decision point".

[Answer]
By default, every WF condition is binded to the 'AND' operator.

To perform an 'OR' condition, compose a condition using the following values

Compare To: Expression
Operation: <Use the default>
Object: <Blank>
Field: <Blank>
Values: Enter your 'OR' expression in here

Eg.


Reactions:

4 comments:

  1. Another way to achieve this is to use multiple WF conditions with the same start and end points. So from the above example you'd have one whose condition is [&A] = "Y" and another whose condition is [&B] = "Y". (Don't forget to also include a Default WF Condition). That way if A = Y then the first WF Condition would be followed, if B = Y then the second would be followed - as both have the same destination, so it will behave like an "OR"

    ReplyDelete
  2. Hi Matt,

    Thanks for the tip.

    What you are describing works, but has a little known effect of parallelism.

    If A and B both equal Y, then every subsequent step in the flow will be executed twice!

    Jason

    ReplyDelete
  3. In addition, if we need to check for an OR on the same variable with different values, we could use the following according to how the workflow has been set up:

    Compare To : Process Property or Business Component
    Object : Select Process Property or Business Component
    Field : Select field if you are comparing values in a BC Field
    Operation : One Must Match (Ignore Case)

    Another approach to check for an 'OR' between different variables would be to use a nested if; i.e.,

    Start
    Decision : Is A='Y'
    Branch A1 : Yes : Do the Action & End
    Branch A2 : No : Decision : Is B='Y'
    Branch B1 : Yes : Do the Action & End
    Branch B2 : No : Skip the Action & End

    ReplyDelete
  4. Another tricky alternative is, negating the condition and reversing the decision box connectors.

    i.e for the "if" arrow of decision box
    - default
    for the else case, add the two conditions
    A - None can match- Y
    B - None can match- Y

    By default these two will be ANDed and the requirement is achieved

    Arun.K

    ReplyDelete

Comments are open to all, please make it constructive.