Basic Administration > Supporting Collaboration > Workflow Administration > Workflow Tools > Workflow Template Administration > Workflow Template Editor > Workflow Editor Nodes > Connector Nodes > Connector Node Routing
  
Connector Node Routing
You can specify custom routing events for any of the connector nodes. Custom routing events map an event to an action in links coming from the connector, to control the flow of the template. Routing in a connector must be automatic, which means that it needs an event firing expression to launch it. This expression is a fragment of Java code that sets the special variable result to one of the custom routing events.
Specify custom routing on the Routing tab of the connector node properties window. You can access this by clicking any of the connector properties links.
For more information about control flow and mapping events to actions, see Workflow Template Links.
1. Select Conditional from the Routing Type drop-down menu to activate routing.
2. Enter the name of one or more custom events in the Routing Events field. If you enter more than one event, enter each one on a separate line.
3. Enter a fragment of Java code in the Routing Expression field to set the variable result to one of the custom routing events. The expression can reference any variable defined in the parent process of the connector.
4. Click Check Syntax to verify that the Java code you entered is correct.
Routing Example
You could enter the following in the Routing Events field:
>1000
<1000
And you could enter the following in the Routing Expression field:
if (cost > 1000)
result = ">1000";
else
result = "<1000";
The following would be the result:
If the cost was greater than $1000, the >1000 event will be emitted.
If the cost was less than or equal to $1000, the <1000 event will be emitted.
One link coming from the assigned activity node could be configured to start an activity that is assigned to a person reviewing costs if the >1000 event is emitted, and another link could be configured to simply continue with the sequence if the <1000 event is emitted.