Conditions for XPath Route Tasks

XPath Route tasks allow more complex comparisons for each case than does a Route task. You can specify an XPath expression for each case that examines the value of one or more of the variables that you have defined.

For example, you can create an expression that specifies a range of time (such as 9AM to 5PM), or you can create an expression that compares two or more variables. Your expressions are not limited to simple comparisons, and you do not need to use any of the variables you have defined in the expressions.

XPath Route tasks are more flexible than Route tasks, but specifying the expression is more complex. You must type the XPath expression in the condition field next to each routing case.

Variables are referenced in the XPath expressions for each routing case by their names. Unlike XPath expressions in the Transform task, you do not need to use a dollar sign to specify the root of the path to the variable. For example, the expression to determine if the city variable is equal to Palo Alto would be:

city = "Palo Alto"

The Transform task has a graphical XPath editor that you can use as a reference for creating XPath functions for the route task. See Using XPath and Data Function Tabs for more information about XPath.

Note: As noted in Mapping Data to Variables, data type-dependent comparisons and operations should use constructor functions to typecast the data.