Start of Content Area

This graphic is explained in the accompanying text Example: Collecting and Bundling Msgs from Multiple Interfaces  Locate the document in its SAP Library structure

You have the option of collecting and bundling messages from different interfaces. To do so, define the corresponding receive step in a fork.

You can define the collecting of messages in different ways. The following table shows the various options. You can find the examples in the Enterprise Services Repository underSAP Basis SAP Basis <release number>, namespace http://sap.com/xi/XI/System/Patterns.

 

Collect

Description

Example

Collect all messages

Collects all messages

BpmPatternCollectMultiIf

Collect particular messages only

Ends collecting when a specified condition is fulfilled

BpmPatternCollectMultiIfCondition

Example Processes

The example processes receive three messages from different interfaces in the container elements FirstMessage, SecondMessage and ThirdMessage. Three receive steps have been defined correspondingly within a fork. Any of the receive steps can start the process. For this reason, the Start Process indicator has been set for each of the receive steps. The first message received starts the process and activates the correlation Correlation. Each receive step uses this correlation. Once the messages have been received, a transformation step bundles the messages together and from them creates a message in the container element NewMessage. This message is then sent by a subsequent send step.

The processes use three of the abstract interfaces as inbound interfaces, and one as an outbound interface (see also: Process Signature)

Collect all messages

To collect all messages, define that the fork is complete once all branches have been processed.

The following graphic illustrates the process definition:

This graphic is explained in the accompanying text

Collect Messages By Using a Condition

You can also specify that the collecting of messages stops when a particular condition is fulfilled. Define a relevant end condition for the fork for this purpose. In the following example, the fork is complete once one of the following conditions returns true:

      All necessary branches were executed: three messages were received.

      The end condition is satisfied: The relevant messages have been received in the container elements FirstMessage and SecondMessage and the OverallNumber element in message FirstMessage has the value 42. To check whether the messages were received, both container elements are compared with an empty container element (EmptyFirst, EmptySecond).

The system checks the conditions in the sequence that you specified.

The following graphic illustrates the process definition:

This graphic is explained in the accompanying text

More Information:

Receive Step

Fork

Transformation Step

Send Step

Correlation: Defining Assignment of Messages to Process Instances

 

 

End of Content Area