Adding If... Then... Actions

Use an if...then... action to perform an action or set of actions conditionally, based on the Boolean result of an XQuery expression.

Before you begin

These instructions assume you are already editing a message flow in the Edit Message Flow page, as explained in Creating, Editing, and Viewing Message Flows.

To add an If...Then action

  1. Navigate to where you want to add the action, as described in Adding and Editing Actions in Message Flows.
  2. Click the appropriate icon, then select Add an Action > Flow Control > If...Then.
  3. Click <Condition> to display the XQuery Condition Editor page.
  4. The condition you create is used as the test that is executed before the then() clause is entered, per standard if...then logic. See Creating and Editing Inline XQuery and XPath Expressions.

  5. When you finish editing the XQuery condition, click Add an Action, then select an action that you want to associate with the condition. To learn more about the type of action you want to add, see Adding and Editing Actions in Message Flows.
  6. In the route node, you can select only the routing, dynamic routing, or routing table actions. However, these actions can contain request and response actions inside of them.

  7. As your logic requires, click the  If...Then... icon, then click Add else-if Condition or Add else Condition to add else-if conditions or else conditions. Click Add an Action to associate actions with these conditions.
  8. Condition actions can be nested. However, there is a nesting limit of four cumulative levels in the stage editor. If you attempt to add a fifth level, this nesting action is not displayed. Cumulative levels include all branching actions:if...then... conditions, publish tables, and route tables. For example, you can have two levels of conditionals, then a publish table with a route table inside of it, bringing the total to four levels. If you attempt to add another conditional action (to the last publish table), it is not displayed.

After you finish

When you complete the configuration of this action, continue by configuring other actions or by saving your configuration, as described in Adding and Editing Actions in Message Flows.