Script for XOR gateway with 3 outputs.

1
0
-1

Hi,

I have a (human) task in my BPMN where one of three options need to be selected on a form. I have used an XOR gate in the BPMN connecting the input to the outputs. In the forms I am using radio buttons to enable the selection of one of the three options, and have defined the returned key as 0, 1, 2.

How can I put this is in the script if the individual flows of the outputs of my XOR gateway.

1 answer

1
0
-1
This one is the BEST answer!

Hello,

please follow these steps:

  1. In the process create a global process variable (i.e. optionVar) (I consider you don't use business variables to simplify)
  2. In the human task (ht) create a contract input, let's call it optionInput (choose the same type you defined in the variable)
  3. Go back to the process variable declaration and in the "Default value" field map the value to the optionInput.
  4. In the ht create a form. Replace the input widget with a radio button, but be careful, the form variable formOutput should respect the contract
  5. Go back to the process, on each transition after the gateway put a condition using the variable optionVar. Remember to leave one transition as default

If this looks unclear I'd recommend to follow a Bonita Camp (for free).

Kind regards

Notifications