Adding Dynamic Routing to Route Nodes
Assign a route for a message based on routing information available in an XQuery resource.
This is a terminal action, which means you cannot add another action after this one. However, this action can contain request and response actions.
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 Dynamic Routing to a Route Node
- Navigate to where you want to add the action, as described in
Adding and Editing Actions in Message Flows.
- Click the
Route Node icon, then click Edit Route. The Edit Stage Configuration page is displayed.
- Click the
Add an Action icon, then select Communication > Dynamic Routing.
- Click <Expression>. The XQuery Expression Editor is displayed.
- In the XQuery Expression Editor, enter an Xquery expression, the result of which is similar to:
<ctx:route>
<ctx:service isProxy='true'>{$service}</ctx:service>
<ctx:operation>{$operation}
</ctx:operation>
</ctx:route>
Note: |
If a proxy service is being invoked, isProxy attribute should be set to true. |
Note: |
- The service name is the fully qualified service name. |
Note: |
- The operation element is optional |
- Click Save.
- In the Request Actions field, click Add an Action to add an action, then select an action that you want to associate with the service. You can add more than one action. To learn more about the type of actions you want to add, see the table of actions in
Adding and Editing Actions in Message Flows.
- In the Response Actions field, click Add an Action to add an action, then select an action that you want to associate with the service. You can add more than one action. To learn more about the type of actions you want to add, see the table of actions in
Adding and Editing Actions in Message Flows.
- Click Save.
- On the Edit Message Flow page, continue to construct the message flow, as described in
Creating, Editing, and Viewing Message Flows.
- Click Save to commit the updates in the current session.
- To end the session and deploy the configuration to the run time, click Activate under Change Center.