How to achieve multiple conditions with out using if condition using switch flow

Hi ,

I have these rules based on these rules i need to get these status…with out using if condition.
Can you help me how to do this

Hi @sindhura506

I suggest you to create a decision tree



Then create the same decision tree on the flowchart using Flow Switches for different litteral values and flow decision for True\False statement

If you have problems with any object, just ask

Thank you for your response @Gabriele_Camilli …But, I didn’t get how to start this one…can you send any sample workflow file…

Flowchart.xaml (11.7 KB)

An alternate option is to simulate Bit masks and using the values within the swith:

Lets assume:
Test1: Delivery (w/o dnumber) Check returns True or False (as Boolean)
Test2: Goods Insurance Check returns True or False (as Boolean)

we do implement the different check with the constraint the it retruns a boolean

Test1Result = If/What else is to implement
Test2Result = If/What else is to implement

now we define our test mask from right to left as following:

we do have different options on how to express the evaluation result
e.g. 1=True, 0=False X=Ommit from test as it is not needed (e.g. Accounting doc not needed in all tests)

and we would receive e.g. 10 (test2=true, Test1=False)

using this code in a swith we can directly react on the different cases

Extending it with an additional test in the mask is just about adding the new test on left to the mask: Test3,Test2,Test1 -> change to existing mask from above XTest2,Test1

1 Like