Integration Server 11.1 | Publish-Subscribe Developer’s Guide | Working with IBM webMethods Messaging Triggers | Creating IBM webMethods Messaging Trigger | Using Multiple Conditions in IBM webMethods Messaging Trigger
 
Using Multiple Conditions in IBM webMethods Messaging Trigger
 
Using Multiple Conditions for Ordered Service Execution
Ordering Conditions in IBM webMethods Messaging Trigger
You can build IBM 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 IBM webMethods messaging trigger, but IBM webMethods messaging trigger can contain any number of simple conditions.
When IBM webMethods messaging trigger receives a document, Integration Server determines which service to invoke by evaluating the IBM webMethods messaging trigger conditions. Integration Server evaluates the IBM 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 IBM 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 IBM 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 IBM webMethods messaging trigger specify the same publishable document type, Integration Server always executes the condition that appears first. For example, if IBM 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.