Creating and Editing Inline XQuery and XPath Expressions

When you add actions to stages or route nodes on the Edit Stage Configuration Page, a skeleton structure is displayed on the page that prompts for configuration details. Figure 20-1shows an example.

Figure 20-1 Example of Action Configuration Skeleton

Example of Action Configuration Skeleton

Whenever it is appropriate for the context, the skeleton provides links for accessing the XQuery editors, where you can construct expressions that will be executed inline, as required by the context in the action.

Before you begin

These instructions assume you are creating or editing an action in the Edit Stage Configuration Page of a pipeline stage, an error handler stage, or a route node. See Creating, Editing, and Viewing Message Flows and Adding and Editing Actions in Message Flows.

To create or modify an inline expression

  1. On the Edit Stage Configuration page, locate the place in the action where you want to add or edit the expression.
  2. Click the expression link to open the editor that is appropriate for the context. When an expression has not yet been defined, the link tells what kind of expression you can use in that position:
    • Click <Expression> to create an XQuery expression.You can also import an XQuery or XSLT resource created outside AquaLogic Service Bus, then bind it to the inline XQuery.
    • Click <Condition> to create an XQuery conditional expression for an if..then... action.
    • Click <XPath> to create an XPath expression for a message context variable.
    • When an expression has already been defined in a position, the <Expression>, <Condition>, or <XPath> link is replaced by a link that shows expression itself, for example true()Example of Action Configuration Skeleton, or a fragment of the expression it is too long to fit, for example $body/urn:POSta...Example of Action Configuration Skeleton.. Click the expression (or expression fragment) to open the expression in the appropriate editor.

  3. Build the expression, as described in the following topics:
  4. Optionally, do either or both of the following:
  5. Click Save to close the editor and insert the expression in the action.

After you finish

Continue configuring the action, as described in Adding and Editing Actions in Message Flows.