Skip to Content

Summary

Enterprise Integration Patterns (EIP) help in solving recurring problems faced in the integration of enterprise applications.  This article introduces the Composed Message Processor – one of the Enterprise Integration patterns in the context of SAP NetWeaver Process Orchestration.

Applies to

SAP NetWeaver Process Orchestration EhP1 for SAP NetWeaver 7.3 SP5

Authors

Abdul-Gafoor Mohamed & Prashant Gautam

Product Management, SAP NetWeaver BPM, SAP Labs

The Composed Message Processor Pattern in Process Orchestration

Enterprise Integration Patterns – The Composed Message Processor

Enterprise Application Integration (EAI) is an integration framework composed of a collection of technologies and services that form a middleware, enabling the integration of systems and applications across an enterprise.[1] A twenty-first century enterprise typically consists of tons of distributed applications, varying percentages of which may be homegrown, acquired, legacy or even a combination of these.

Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications.  The Composed Message Processor helps address this question:

“How can you maintain the overall message flow when processing a message consisting of multiple elements, each of which may require different processing?”[2]

Let us consider an example.  AceCamz is a major online retailer for Cameras and accessories, including some of the high-end SLR(Single Lens Reflex)  cameras.  AceCamz customers are able to order the camera body, an advanced lens and any accessories in a single order.  The versatility of SLR cameras allows most manufacturers to provide a wide range of accessories for the customers.  Accessories include, but are not limited to these items hot shoe flash, neck strap, cleaning cloth, flash diffuser, lens pen, blower, light reflector, polarizer filter, speedlight flash, UV filter, tripod.  AceCamz allows customers to order the camera and accessories in a single invoice, even though they have two different inventory systems, one for Cameras and the other for accessories.

/wp-content/uploads/2013/01/cmp_aggregate_165629.jpg
Figure 1. An example illustrating the Composed Message Processor pattern


An Integration Scenario for the Composed Message Processor

The Composed Message Processor is a message routing pattern that helps in processing a composite message by using a splitter, routing the split messages to certain destinations, and finally aggregates the responses into a consolidated message. 

In the example we have considered, a customer orders one or more items from the camera inventory and one or more items from the accessory inventory.  Each of these inventory systems can independently process items.  The prices and promotional offers are still applicable to the main order, which consists of the multiple items on a single invoice.  The single message that comes in (the customer order) is split and processed as multiple messages by the different (inventory) subsystems – whose outputs are finally aggregated and delivered to the destination.


SAP NetWeaver Process Orchestration Solution Outline

/wp-content/uploads/2013/01/pattern_ico_169490.jpg

Figure 2. An integration scenario for the Composed Message Processor pattern

As depicted in Figure 2, we are dealing with these two integration configurations:

  • Integration Configuration1 (ICO1) – A message flow can be triggered in Business System S1 that flows through SAP NetWeaver PI (AEX) to SAP NetWeaver BPM.
  • Integration Configuration2 (ICO2) To send the aggregated message back to SAP NetWeaver PI (AEX) from SAP NetWeaver BPM.

Note: The message flow from Business System S1 could also be simulated by using the Web Services Navigator, details of which can be found in the SAP NetWeaver Web Services Navigator documentation.


SAP Process Orchestration Scenario

/wp-content/uploads/2013/01/patternscenario_165630.jpg

Figure 3. A generic SAP Process Orchestration scenario sequence


The Integration Flows have to be created and activated using the same interfaces that were used in the Business Process.  The generic scenario referenced above applies to most Enterprise Integration patterns.

Note: Only XI 3.0 compatible stateless interfaces are supported.


Process Modeling in SAP NetWeaver BPM

Prerequisites

  • The service interfaces to be used in the process model – Starting Interface and Automated activity – should be created first and then imported from the SAP NetWeaver PI Enterprise Service Repository.
  • For testing the BPM Process from the BPM Process repository, the UME action SAP_BPM_TRIGGER_EVENT should be assigned to the specific user role.

Process Model

/wp-content/uploads/2013/01/cmp_model_169693.jpg

Figure 4. A Composed Message Processor scenario modeled in SAP NetWeaver BPM

The Process Model for a Composed Message Processor scenario is shown in Figure 4.  The steps for modeling the process are enumerated below:

  • The Pattern starts with a service interface.
  • A Webservice call retrieves the Order IDs. Each Order ID has multiple Item IDs.
  • A decision box delegates each Item ID to be processed by Inventory System A (Cameras) or by Inventory System B (Accessories).  WebService calls to the inventory systems return success if the items are available.
  • The outputs from the two Inventory systems are then aggregated and a combined invoice is generated with the details.

Notes:

  • Use the ‘XI’ service reference instead of ‘WS’ in the configuration settings of the automated activity. The Sender Component also needs to be specified.
  • Use the SAP NetWeaver PI Integration Flow Designer to create the configuration objects in SAP NetWeaver PI
  • Please refer to detailed information on Process Modeling using SAP NetWeaver BPM.

[1] Enterprise Application Integration, Wikipedia

[2] Gregor Hohpe & Bobby Woolf, Enterprise Integration Patterns. 2003

[3] Inbound and Outbound are terms used with reference to the application, in this case SAP NetWeaver BPM.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply