Designer 10.15 | webMethods Service Development Help | Working with webMethods Messaging Triggers | Creating a webMethods Messaging Trigger | Using Multiple Conditions in a webMethods Messaging Trigger
 
Using Multiple Conditions in a webMethods Messaging Trigger
 
Using Multiple Conditions for Ordered Service Execution
Ordering Conditions in a webMethods Messaging Trigger
You can build webMethods messaging triggers that can contain more than one condition. Each condition can associate one or more documents with a service. You can use the same service or different services for each condition. You can create only one join condition in a webMethods messaging trigger, but a webMethods messaging trigger can contain any number of simple conditions.
When a webMethods messaging trigger receives a document, Integration Server determines which service to invoke by evaluating the webMethods messaging trigger conditions. Integration Server evaluates the webMethods messaging trigger conditions in the same order in which the conditions appear in the editor. It is possible that a document could satisfy more than one condition in a webMethods messaging trigger. However, Integration Server executes only the service associated with the first satisfied condition and ignores the remaining conditions. Therefore, the order in which you list conditions is important.
When you build a webMethods messaging trigger with multiple conditions, each condition can specify the same service. However, you should avoid creating conditions that specify the same publishable document type. If the conditions in a webMethods messaging trigger specify the same publishable document type, Integration Server always executes the condition that appears first. For example, if a webMethods messaging trigger contained the following conditions:
Condition Name
Service
Document Types
ConditionAB
serviceAB
documentA or documentB
ConditionA
serviceA
documentA
Integration Server will never execute serviceA. Whenever Integration Server receives documentA, the document satisfies ConditionAB, and Integration Server executes serviceAB.