Skip to Content
Author's profile photo Abdul-Gafoor Mohamed

Enterprise Patterns in Process Orchestration – Scatter Gather


Enterprise Integration Patterns (EIP) help in solving recurring problems faced in the integration of enterprise applications.  This article introduces the Scatter-Gather – 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


Abdul-Gafoor Mohamed & Prashant Gautam

Product Management, SAP NetWeaver BPM, SAP Labs

The Scatter-Gather Pattern in Process Orchestration

Enterprise Integration Patterns – Scatter-Gather

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 Scatter-Gather helps address this question:

“How do you maintain the overall message flow when a message must be sent to multiple recipients, each of which may send a reply?”[2]

Let us consider the example of a university celebrating its golden jubilee this year.  As part of the celebrations, about 15 buildings in the university campus need to be repainted.  The University requests vendors to submit their quotes for this task and hopes to choose a vendor that strikes a balance between economical pricing and efficiency of timeline in the completion of the painting task.  The quote request is broadcast to all the preferred vendors, but it is not necessary that each vendor responds to the request. 


Figure 1. An example illustrating the Scatter-Gather pattern

An Integration Scenario for the Scatter-Gather

You may notice the similarities with the Composed Message Pattern, but instead of a splitter sending a sub-message (smaller message) to the recipients, the whole message needs to be broadcast to all the recipients.  The Scatter-Gather then aggregates the responses based on certain well defined parameters.  Here, we may choose the best vendor that can complete the task of painting all the campus buildings in 90 days or less.

SAP NetWeaver Process Orchestration Solution Outline


Figure 2. An integration scenario for the Scatter-Gather pattern

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

  • Integration Configuration1 (ICO1) – The SAP NetWeaver BPM system broadcasts the message to FolderRx on the Filesystem via SAP NetWeaver PI (AEX).
  • Integration Configuration2 (ICO2) – The quotes from various vendors will be consumed from FolderTx on the Filesystem by SAP NetWeaver BPM using the SAP NetWeaver PI (AEX).

SAP Process Orchestration Scenario


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


  • 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


Figure 4. A Scatter-Gather scenario modeled in SAP NetWeaver BPM

The Process Model for a Scatter-Gather scenario is shown in Figure 4.  The steps for modeling the process are enumerated below:

  • The Pattern starts with a service interface.
  • The quote request is broadcast to all the vendors.
  • A timer event starts at this point to keep track of the deadline to receive quotes.
  • Each vendor quote is processed by an aggregator in a loop.
  • An automated activity uses the input mapping to determine and send the best quote to SAP NetWeaver PI.


  • 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.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Abdul,

      Great blog series!

      I have one question though.

      Immediately after the receive step, is it an exclusive choice where you check for XPATH with less than 90 days and exit? If no one send that kind of estimate, it would send what ever is received within that time period. If some one sends estimate with 90 days or less, that first such occurrence would exit the bottom branch and go to the automated step to send it, and it might not be the best one as it has not waited for the timer to finish before exiting (You have used Uncontrolled merge to join both the branches).

      Even if you use Parallel Join, instead of Uncontrolled Merge, the Data Object would contain the first occurrence of matching XPATH value as that is the when the token reached parallel join and waits for timer to finish.

      If that was not exclusive choice, please elaborate more.


      Anirudh Vyas