Route Task

The Route task sends messages to a specific destination based on specified conditions. Data from the mediation flow context, such as the security information or message body, can be used to specify the conditions of the route.

You can only introduce the route in the input path. The response (output or fault) always returns to the original requester—that is, to the same mediation operation.

Route tasks send each incoming message to a single destination based on which route case evaluates to true, or to a single destination designated as otherwise if none of the cases evaluate to true.

You can use multiple, nested Route tasks to send a single message to a target in several different ways, based on the routing cases, conditions, and variables you set for each task in the Decision tab.

You can configure multiple routes in an input flow, nesting them to any depth, and you can place mediation tasks on flow paths before or after any route task. This enables users to decide which tasks are executed in common and which are executed only for specific route cases.

See Routing Messages in a Mediation Flow for more information about the Route task.

General Tab

Use the General tab to specify a name and description for the task. This tab is useful for providing documentation for tasks in your mediation flows.

Field Description
Name Assign a name to the task, to identify the task in the mediation flow. This name appears in the tooltip that opens when you hover the cursor over the task icon in the mediation flow.
Description Describe the task briefly. This description appears in the tooltip that opens when you hover the cursor over the task icon in the mediation flow.

Decision Tab

Use the Decision tab to create routing cases, routing conditions, and variables to hold data that will be evaluated in the routing conditions. The Decision tab has a toolbar for adding and deleting cases and conditions.

Toolbar Icon Description

Add Case

Adds a routing case to the table on this tab. A new case appears in the table on this tab with a default name, and the case is drawn in the mediation flow diagram.

By default, new cases created with this icon point to an error icon until a Target Service/Operation is specified for the case.

Delete Case

Deletes the selected routing case.

Add Variable

Adds a variable to use in routing conditions. Clicking this icon opens a dialog that enables you to specify the name and data type of the variable. These datatypes are available:
  • string
  • integer
  • boolean
  • date
  • time
  • float

Each variable appears as a column between the Case column and the Target Service/Operation column.

Delete Variable

Opens a dialog for you to select the variable to delete.

The Decision tab includes a table containing all of the routing cases.

Column Description
Case Name of the routing case. Click in the cell to edit the name.
Variable List Variables created with the Add Variable icon appear as columns in this table. You must specify a comparison operator and a constant to compare for each variable. Click the cell to select the comparison operator from a drop-down list and edit the value of the constant in the text field.

You can specify comparison operators:

  • = (equal)
  • != (not equal)
  • < (less than)
  • <= (less than or equal)
  • > (greater than)
  • >= (greater than or equal)

All variable conditions that you specify for each case must evaluate to true for the case to evaluate to true.

Target Service/Operation The name of the Target Service and target operation that is the destination for this case. If you drag the path for the case to a target operation in the mediation flow, this field is automatically set to the correct value. You can also click this field to either type or select the target operation.

At the bottom of the Decision tab is the configuration for the Otherwise case for the route. The Otherwise case is taken when all other cases evaluate to false. You can specify the target operation for this case in the Target Service/Operation field.

Also at the bottom of the Decision tab is a drop-down list of choices for setting the case target to a specific type of mediation task. For example, selecting Throw Fault sets the target to a new Throw Fault task.

Targets you can specify are:

  • Targeted operations that are not already targeted
  • Generate Reply, Throw Fault for mediation tasks
  • End Mediation for one-way (in-only) operations.
  • Route tasks and XPath Route tasks, which enables you to build nested routing structures.
Note: Any change you make to a nested routing structure replaces the entire nested structure.

Input Tab

Use the Input tab to map data from the mediation exchange into the list of variables that you have created for the Route task. See Transform Tasks for a complete description of how to perform mapping.