How to compare three values and use only one Output based on comparison and value selected

1
0
-1

Hi

I plan to implement a process where in a certain task , the user will have three choices.

Based on his choice , the process flow will be different.

Currently The user has to choose between archive , Planned or Unplanned .

I am using a Text variable to store the users selection and then use that to compare with the XOR output lanes.

If the User chooses archive , the case will end
If the User chooses Unplanned, the task will go to Employer
If the user Chooses Planned, the task will go to next Level of Approval.

I am using a XOR gateway. On all the Three points, i have mapped different tasks.
I have also added the Condition/value to check on each arm of the XOR outputs.
But I am getting an error, all outputs from XOR must be conditional or default.

Is there any way to implement such a scenario.

Comments

Submitted by Dibyajit.Roy on Wed, 12/28/2016 - 10:02

Hi Sean and Lionel

Thanks for the comments.I appreciate the effort.
I was able to solve my problem.
I used -
go to Script -> If(variable == "Value")
{ return true}

Its a bit novice in approach.
I was looking in to Decision table. It seemed like a better approach .
Could not figure it out.

1 answer

1
+1
-1
This one is the BEST answer!

Hi,

I think you're on the right track.

However, the Studio will still require to choose one of the XOR gateway output flow as the default one. In your case, it could be the "Archive" one by example. The reason behind that is to avoid a situation where there is no valid option to continue. Let's say, for a unanticipated reason the Text variable that contains the user choice is NULL, you need to define a path where the flow will go through.

So either, you decide that one of the three output is the "default" one or you create a fourth output for the non planned scenarios.

Cheers

Comments

Submitted by Sean McP on Mon, 12/19/2016 - 23:51

Completely agree with Lionel, there is always Choice + 1. No Choice.

We usually define our gates as based on truth only, false are always default...:

If Choice = 1 (truth) then follow process steps for 1
else is default (false) must go to If Choice = 2 (truth) then follow process steps for 2
else is default (false) must go to If Choice = 3 (truth) then follow process steps for 3
else is default (false) must be handled as an error condition

regards
Seán

Notifications