Summary
Enterprise Integration Patterns (EIP) help in solving recurring problems faced in the integration of enterprise applications. This article introduces the Aggregator – 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
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. One of the message routing patterns – the Aggregator – is a stateful filter that is used to analyze and store input messages until a complete set of (related) messages are received. It can then produce a single refined message from the messages that were received. It is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages. Thus, the Aggregator helps address this question:
“How do we combine the results of individual but related messages so that they can be processed as a whole?”[2] |
Dealing with asynchronous messaging systems presents challenges like correlating the messages, particularly due to the fact that the incoming messages may arrive in any order. While some of the other routing patterns can be stateless, the aggregator needs to store each incoming message until the set of messages is complete for further processing. The aggregation is limited to a completion condition, either time bound or quantity bound.
Let us consider the example of a stationery manufacturer, Krafty. One division of the factories of Krafty manufactures stationery supplies like coloured pencils and graphite writing pencils. Graphite pencils are manufactured and placed into bins on a conveyor belt so that they can be packed by a machine. Each package contains 10 graphite writing pencils. Krafty would like to increase throughput without compromising on quality.
Figure 1. An illustration of the Aggregator pattern
The aggregation is not dependent on the order of messages received, which means the Aggregator may receive related messages at any time (within a reasonable limit) and in any order. Each time the Aggregator receives a new message, it should check if the message is part of an existing aggregate and create a new aggregate if a related aggregate doesn't exist, and then add the message to the appropriate aggregate.
In our example for the graphite writing pencils, we need to aggregate a set of 10 pencils. The pencils are collected into the next bin and once the count reaches 10, the bin is conveyed to the machine that packages them.
Figure 2. An integration scenario for the Aggregator pattern
As depicted in Figure 2, we are dealing with these three integration configurations:
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.
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.
Prerequisites
Figure 4. An aggregator scenario modeled in SAP NetWeaver BPM
The Process Model for a Aggregator scenario is shown in Figure 4. The steps for modeling the process are enumerated below:
Notes:
[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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
10 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 |