Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Working with JMS Triggers | Building Standard JMS Triggers with Multiple Routing Rules
 
Building Standard JMS Triggers with Multiple Routing Rules
 
Guidelines for Building a JMS Trigger that Performs Ordered Service Execution
A JMS trigger can contain more than one routing rule. Each routing rule can specify a different local filter and a different service to invoke.
You might create multiple routing rules so that a JMS trigger processes a group of messages in a specific order. Each routing rule might execute a different trigger service based on the contents or type of message received. When a JMS trigger receives a message, Integration Server determines which service to invoke by evaluating the local filters for each routing rule.
Integration Server evaluates the routing rules in the same order in which the rules appear in the editor. It is possible that a message could satisfy more than one routing rule. However, Integration Server executes only the service associated with the first satisfied routing rule and ignores the remaining routing rules. Therefore, the order in which you list routing rules on the editor is important.
You might want to use multiple routing rules to control service execution when a service that processes a message depends on successful execution of another service. For example, to process a purchase order, you might create one service that adds a new customer record to a database, another that adds a customer order, and a third that bills the customer. The service that adds a customer order can only execute successfully if the new customer record has been added to the database. Likewise, the service that bills the customer can only execute successfully if the order has been added. You can ensure that the services execute in the necessary order by creating a trigger that contains one routing rule for each expected message.
Note:
SOAP-JMS triggers do not have routing rules.