Router Configuration
The Content-based router in OMS allows routing of the order to the correct destination based on the contents of the order message.
Content-based routing schedules the order of the messages that are based on the actual content of the message itself, rather than by a destination specified by the message. Content-based routing works by opening a message and applying a set of rules to its content to determine the destination of a message . By freeing the sending application from where an order should be routed for fulfillment, content-based routing provides a high degree of flexibility to configure multiple types of Orchestration engines.
OMS supports two types of routers:
To select router type, you must be at the Order management System level configuration:
A pass-through does not apply any condition on the incoming order message and passes the message to the default Orchestrator.
The following table shows configurable parameters for Filter based Router.
Parameters | Description |
---|---|
Router Condition | XPath filter condition to be applied on the incoming order message. If the XPath condition is not satisfied, the message is routed to the default AF Orchestrator or else the message is routed to the IPC destination. |
AF Orchestrator Submit Order Queue | Destination queue name of Orchestrator for submit order request. |
AF Orchestrator Amend Order Queue | Destination queue name of Orchestrator for amend order request. |
AF Orchestrator Suspend Order Queue | Destination queue name of Orchestrator for suspend order request. |
AF Orchestrator Activate Order Queue | Destination queue name of Orchestrator for activate order request. |
iPC Orchestrator Submit Order Queue | Destination queue name of iPC for submit order request. |
iPC Orchestrator Amend Order Queue | Destination queue name of iPC for amend order request. |
iPC Orchestrator Suspend Order Queue | Destination queue name of iPC for suspend order request. |
iPC Orchestrator Activate Order Queue | Destination queue name of iPC for activate order request. |
Filtering Router
A filter condition for a router is applied only for a submit order request. Any subsequent request related to the order is always routed through the same orchestrator where the original submit order request was submitted. The XPath condition specified must be based on Order schema.
For example, XPath /SubmitOrderRequest/orderRequest/header/udf[name='Orchestrator']/value/text() specified for a filter condition results in sending all the orders containing User Defined Field (UDF) with name value pair 'Orchestrator' and IPC' to TIBCO iProcess Conductor. It is not required to be based on the UDF element. The only requirement is that it should be a valid XPath condition on the order schema. Fulfillment Order Management supports specifying a filter condition but it does not perform any validation on the XPath condition. It must be validated before specifying it in the Fulfillment Order Management Configurator.
The router uses an XML configuration to configure the routing and mediation rules which are added to a router-context.xml of the OMS component. This file is available inside $AF_HOME/roles/omsServer/standalone/services/omsServer/omsServer-4.0.0-SNAPSHOT.jar.
The following example shows a router configuration to route the order message to Business Events (BE) Orchestrator based on the User Defined Field (UDF) value in the order message:
/SubmitOrderRequest/orderRequest/header/udf[name='Orchestrator']/value/text()