To specify a filter expression on a message payload:

  1. To the right of the Filter Expression field in the Routing Rules section, click the Invoke Expression Builder icon.

    The Expression Builder dialog is displayed.

  2. In the Variables field, expand the message definition and select the message element on which you want to base the expression.

    For example, the CustomerId element is shown selected in Figure 20-14.

    Figure 20-14 Expression Builder Dialog – Variables Element Selected

    Description of Figure 20-14 follows
    Description of "Figure 20-14 Expression Builder Dialog – Variables Element Selected"
  3. Click Insert Into Expression.

    The expression is added in the Expression field, as shown in Figure 20-15.

    Figure 20-15 Expression Builder Dialog – Variables Element Inserted

    Description of Figure 20-15 follows
    Description of "Figure 20-15 Expression Builder Dialog – Variables Element Inserted"
  4. From the Functions list, select the function to apply to the message payload. For example, equals.

    Functions are grouped in categories that are listed when you click the down arrow in the Functions list. For example, if you click the down arrow and select Logical Functions, the list appears as shown in Figure 20-15.

  5. Click Insert Into Expression.

    The XPath expression for the selected function is inserted into the Expression field.

  6. Complete the expression.

    In this example, the Customer ID must equal1001 to evaluate to true, as shown in Figure 20-16.

    Figure 20-16 Sample Expression Builder Dialog – Value Entered

    Description of Figure 20-16 follows
    Description of "Figure 20-16 Sample Expression Builder Dialog – Value Entered"
  7. If there are any errors, you can edit the expression manually, or use the expression editing icons, which are summarized in Figure 20-17.

    Figure 20-17 Expression Editing Icons

    Description of Figure 20-17 follows
    Description of "Figure 20-17 Expression Editing Icons"
  8. Click OK.

    The expression is added to the Routing Rules section.

To modify or delete a filter expression, double-click the Add Filter Expression icon, and then modify or delete the expression in the Expression field of the Expression Builder.