21 Proxy Services: Message Flow

This chapter describes how to create and configure message flows using the Oracle Service Bus Administration Console. Sections include adding and configuring pipeline pairs, conditional branches, stages, operational branches, and route nodes. For more detailed information on message flows, see Chapter 37, "Modeling Message Flow in Oracle Service Bus."

Click the Edit Message Flow icon in the row of the proxy service whose message flow you want to view or edit.

If no message flow has yet been created for the selected proxy service, the Edit Message Flow page is displayed with a single icon on the page, the Proxy Service icon. This is the starting node for the proxy service. Click this icon to begin constructing the message flow.

If the proxy service already has a message flow, the page contains a graphic representation of the flow. Click the icons to view or edit the parts of the message flow.

To end the session and deploy the configuration to the run time, click Activate under Change Center.

21.2 Edit Message Flow Page

Use the Edit Message Flow page to construct a message flow for a proxy service.

The left navigation pane of the Edit Message Flow page shows a tree view of the nodes and objects in the message flow. When the details of an object are defined on a separate page, you can click the name of the object to display the associated page.

The right pane provides a field upon which to construct the message flow. When a message flow has not yet been defined, the pane includes a single Proxy Service icon that signifies the starting node for the service. Click the icon to add pipeline pair nodes, route nodes, conditional branches, operational branches, and error handling for the service.

When you add objects to the page, icons are displayed on the page to represent the objects. The relationships among the objects are shown with lines and bounding boxes. Click an icon on the Edit Message Flow page to display a menu of the actions you can perform on that object. The options available on the menu may differ, depending on context. See Table 21-1 for a complete list of icons and options.

21.3 Edit Stage Configuration Page

Use the Edit Stage Configuration page to add actions to pipeline stages, error handler stages, and route nodes in a message flow.

When nothing has yet been defined on the Edit Stage Configuration page, the only object displayed is the Add an Action icon. Click that icon to get started.

When a stage or a route node has already been configured, the actions and objects defined for that stage or route node appear on the page. Edit the existing actions, as appropriate, or click any of the icons representing actions to add more actions to the stage.

21.4 Adding Pipeline Pair Nodes to Message Flows

Message flows can include zero or more pipeline pair nodes: request and response pipelines for the proxy service (or for the operations on the service), and error handler pipelines that can be defined for stages, pipelines, and proxy services. pipelines can include one or more stages, which in turn include actions.

To change the default name and add a description for the pipeline pair node, do the following:

Click the Pipeline Pair Node icon, then click Edit Name and Annotation.

Change the name and description, as desired.

Click Save.

Note:

When you rename a pipeline or a route node, the number of messages displayed on the Dashboard page in the Monitoring module may not correlate with those of other components due to the pipeline counters being reset to zero. This is because Oracle Service Bus treats the rename as a delete and recreate action. The numbers should correlate again after a time period equal to the service's monitoring interval has elapsed.

To end the session and deploy the configuration to the run time, click Activate under Change Center.

21.5 Adding Conditional Branches to Message Flows

A branch node allows processing to proceed along exactly one of several possible paths. Branching is driven by an XPath-based switch table. Each branch in the table specifies a condition (for example, <500) that is evaluated in order down the message flow against a single XPath expression (for example, ./ns: PurchaseOrder/ns:totalCost on $body). Whichever condition is satisfied first determines which branch is followed. If no branch condition is satisfied, then the default branch is followed. A branch node may have several descendants in the message flow: one for each branch, including the default branch.

If the proxy service is not based on a WSDL and receives multiple document types as input, consider using a conditional branch node.

Conditional branching is driven by a lookup table with each branch tagged with a simple, but unique, string value. A variable in the message context is designated as the lookup variable for that node, and at run time, its value is used to determine which branch to follow. If no branch matches the value of the lookup variable, the default branch is followed. You should design the proxy service in such a way that the value of the lookup variable is set before reaching the branch node.

Click a Pipeline Pair Node icon or a Branch Node icon, then click Create Conditional Branch. The conditional branch node is added, and any existing nodes after the inserted branch node are moved to the default branch of the new conditional branch node.

To change the default name and add a description for the branch node, do the following:

Click the Conditional Branch icon, then click Edit Name and Annotation.

To end the session and deploy the configuration to the run time, click Activate under Change Center.

21.6 Adding Operational Branches to Message Flows

When message flows define Web Services Description Language (WSDL)-based proxy services, operation-specific processing is required. Instead of configuring a branching node based on operations manually, Oracle Service Bus provides a minimal configuration branching node that automatically branches based on operations. In other words, when you create an operational branch node in a message flow, you can quickly build your branching logic based on the operations defined in the WSDL because the Oracle Service Bus Administration Console presents those operations in the branch node configuration page.

A branch node allows processing to proceed along exactly one of several possible paths. Branching is driven by an XPath-based switch table. Each branch in the table specifies a condition (for example, <500) that is evaluated in order down the message flow against a single XPath expression (for example, ./ns: PurchaseOrder/ns:totalCost on $body). Whichever condition is satisfied first determines which branch is followed. If no branch condition is satisfied, then the default branch is followed. A branch node may have several descendants in the message flow: one for each branch, including the default branch.

Click a Pipeline Pair Node icon or a Branch Node icon, then click Create Operational Branch. The operational branch node is added, and any existing nodes after the inserted branch node are moved to the default branch of the new operational branch node.

To change the default name and add a description for the branch node, do the following:

Click the Operational Branch icon, then click Edit Name and Annotation.

To change the default name and add a description for the route node, click the Route Node icon, then click Edit Name and Annotation. Change the name and description, as desired, then click Save.

Note:

When you rename a pipeline or a route node, the number of messages displayed on the Dashboard page in the Monitoring module may not correlate with those of other components due to the pipeline counters being reset to zero. This is because Oracle Service Bus treats the rename as a delete and recreate action. The numbers should correlate again after a time period equal to the service's monitoring interval has elapsed.

To add actions to the route node, click the Route Node icon, then click Edit Route. The Edit Message Flow page is displayed. See the following sections for information about the actions you can add to route nodes: