The following blog illustrates how we could call a Local Integration Process from the Main Integration Process. i.e. Performing a second Process from the Parent ( First ) Process. The focus is to make use of the Integration Elements without using any Scripting.
Requirement: When a Customer is created or Changed in C4C system, it sends a SOAP Message to ECC. The replication of the Customer to ECC should only happen for Create and all other mutations ( Change/Delete) on the Customer in C4C should not be sent to ECC System.
Sender System: C4C System
Receiver: ERP System
Parent Integration Process: Replicate Customer to ECC
Local Integration Process: Check if the Customer exists in ECC
The first step that’s executed in the iflow for the incoming request is the Multicast ( Sequential).
There are ideally two types of multicast that you could choose : Parallel multicast or Sequential multicast.
* Parallel multicast initiates message transfer to all the receiver nodes in parallel.
* Sequential multicast provides an option to define the sequence in which the message transfer is initiated to the receiver nodes.
As shown below the first sequence is to check , if the customer already exists in ECC. we achieve using a process call (
Local Integration Process ) which makes a call to the ECC system using a SOAP Query . If the result of the SOAP call returns the Customer then , we terminate the whole process using “Terminate Message” event.
Second Sequence is to replicate the message to ECC. This will only happen, if the Terminate Message event is not triggered in Sequence 1.
Local Integration Process:
Scroll below to the empty space in the Model Configuration Editor. To add a local integration process to the integration flow, choose Others => Local Integration Process from the palette. On the Properties tab, provide a name.
Add elements between the start event and end event of the process. Point to note here is that , a local integration process does not support multicast and splitter elements. In this scenario, I use a request-reply step using SOAP adapter to call query ECC_CustomerERPSimpleByElementsQuery in ECC which returns Customer ID in response.
The next step is to create a router to determine the message path and define the routing conditions.
The Order in which the Condition is defined in the role plays an important role. E.g. If the outcome of one or more conditions defined in the router is same, then the first condition defined in order is executed first and the rest of the conditions will not be executed.
the xpath expression count(//ID) determines if there are any customers in the response. count(//ID) = 0, implies that the customer is not found on the ECC system and the path is routed back to the parent process.
When the expression count(//ID) = 0 fails, which implies the customer exists in the ECC, the router takes the default route where we define a “Terminate Message” event. which completely stops the processing of the Iflow further.
Before the “Terminate Message”, we could define Content Modifier and define an error message like the below.
Finally, to the Invoke the local integration process. Select the process call element in integration flow editor which is defined in the Parent Process. In Local Integration Process field, choose Select. In Select Local Integration Process window, select the local integration process (second Process) you want to assign to the process call.
Thus, if the Terminate Message event is not triggered, the process continues with the second sequence defined in the Sequential Multicast.
Developer’s Guide: Managing Integration Content Developing Integration Content Using the Integration Designer P U B L I C © 2016 SAP SE