About Automation Message Correlation

Automation plug-ins defined as external event receivers are designed to process JMS messages from external systems. JMS messages are asynchronous, therefore external event receivers provide a method of correlating responses to requests previously delivered to enable you to map OSM orders to external system orders.

To correlate responses, the plug-in sets a property on the outbound JMS message, with the name of the value set for the correlation property in the automationmap.xml file and a value decided by your business logic.

For example, business logic might dictate that you correlate on a reference number. The external system copies the properties that you defined for the correlation on the request and includes that data in the response.

You can use the Message Property Selector field to filter messages placed on the queue and determine which automation to run. You define the Message Property Selector value as a Boolean expression that is a string with a syntax similar to the where clause of an SQL select statement. For example, the syntax may be:

"salary>64000 and dept in ('eng','qa')"

When the condition evaluates to true, the message is picked up and processed by the automation that defined that condition.

In a second example, consider that an external system defines five order types and OSM defines a different automation to process each order type. Each automation defines a different value in the Message Property Selector field, such as orderType=1, orderType=2, and so forth. When a message is sent to the queue by the external system, and the message includes the order type upon which the condition is based, the automation framework evaluates each condition until one evaluates to true. If more than one automation defines the same condition, the first one that evaluates to true is picked up and processed.

Note:

When you define only one automation plug-in external event receiver for each automated task, and you use the Optimized build-and-deploy mode to build and deploy automation plug-ins, you are not required to enter a selector in the Message Property Selector field. (For OSM 7.3 servers and later, Optimized is the only build-and-deploy mode available.) In this case, automated tasks can share the same JMS queue without a message property selector being set. You must set a message property selector when you do any of the following:

  • Define multiple automation plug-in external event receivers for the same automated task.

  • Set up other applications (besides OSM) to share the same queue that an external event receiver is listening on.

  • Use the Legacy build-and-deploy mode to build and deploy cartridges with automation plug-ins.

  • Use both (Allow server preference to decide) build-and-deploy mode to build and deploy cartridges with automation plug-ins and configure the OSM server dispatch mode for the Internal mode.

    See "Defining Build-and-Deploy Modes for Automation Plug-ins" for information on build-and-deploy modes.