cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Gateways

matteo_zanardo
Champ on-the-rise
Champ on-the-rise

Hi, I'm using Activiti 6 and I would like to understand how you choose the direction of a gateway.
In particular I would like to know if through a radio button inside a form, I can condition this choice.

1 ACCEPTED ANSWER

On the arrow "Yes" write flow condition as follows

${agree == "Yes"}  

to "No"

${agree == "No"}

View answer in original post

5 REPLIES 5

amruta_w
Star Collaborator
Star Collaborator

Hi You can use as follows(it's just an example). Refer any tutorial(https://www.omg.org/news/meetings/workshops/SOA-HC/presentations-2011/14_MT-2_Brookshier.pdf )

Hi, I tried to download the file and to create the form as you told me, only that going to create the app to test the whole, give me an error.

How can I do to solve this problem?

On the arrow "Yes" write flow condition as follows

${agree == "Yes"}  

to "No"

${agree == "No"}

Seems to work! Thanks a lot, I leave the question open for a couple of days in case I need anything, then I close it.  Friendly.

Salmen11
Champ in-the-making
Champ in-the-making

n Activiti 6, the direction of an exclusive gateway is not normally chosen directly from a form element like a radio button. The gateway evaluates the conditions defined on the outgoing sequence flows, usually based on process variables.

You can absolutely use a form field to influence the decision, though. For example, store the selected radio button value as a process variable, then define expressions/conditions on the outgoing flows that check that variable and route the execution accordingly.

Something like: user selects option A → variable gets value A → gateway condition ${choice == 'A'} sends the process down that path.

The same idea applies to other workflow decisions too — the UI collects data, and the process engine handles the routing logic. If you’re also dealing with payment or external workflow integrations, understanding the underlying provider flow can help; this useful guide on acquiring banks gives a good overview of how transaction routing works on the payment side.

Hope that helps. The key point is: don’t try to make the form control the gateway directly; make the form set variables and let the BPMN logic decide.