0% found this document useful (0 votes)
94 views

Process Direct

This document provides steps to use a static Process Direct adapter in SAP CPI to access one artifact from another located under the same tenant. It outlines setting up two integration flows, with the first flow triggering the second flow using a Process Direct adapter. The key steps are: 1. Create two integration flows and configure the first flow with a timer trigger, content modifier, and Process Direct adapter call to the second flow. 2. Configure the second flow with a content modifier to accept the message from the first flow. 3. Deploy the second flow first, then the first flow, to demonstrate how the first flow can trigger activities in the second flow and return the response.

Uploaded by

NIRMALKUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

Process Direct

This document provides steps to use a static Process Direct adapter in SAP CPI to access one artifact from another located under the same tenant. It outlines setting up two integration flows, with the first flow triggering the second flow using a Process Direct adapter. The key steps are: 1. Create two integration flows and configure the first flow with a timer trigger, content modifier, and Process Direct adapter call to the second flow. 2. Configure the second flow with a content modifier to accept the message from the first flow. 3. Deploy the second flow first, then the first flow, to demonstrate how the first flow can trigger activities in the second flow and return the response.

Uploaded by

NIRMALKUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Process Direct

This ppt shows how to use a static Process Direct adapter in SAP CPI to access one artifact from other
located under the same tenant. This adapter reduces the network latency as this doesn’t go through load
balancer network.

SETTING UP INTEGRATION FLOWS

Step 1 : Create two Artifacts ( Integration Flows) .


Step 2 : Open the First Flow , click on Edit.

Step 3 : Delete the Start event. This is done to add a timer as trigger event.

Step 4:Add a Timer from Pallet.


Step 5 : Include a Content modifier from Pallet to add custom message specific to the flow.
Step 6 : Add an External Call –> Request Reply from Pallet.

Step 7 :Include a Groovy Script to log the payload.


Step 8 :Arrange the above added blocks as shown below.

Configuring the Blocks

Step 9 : Select the Timer and in Scheduler tab, Choose Run Once. This makes sure that the Integration
Flow is triggered as soon as the artifact is deployed.
 Step 10 : Select Content Modifier. In the Message Body tab, Choose Type=Constant and Body= Any
custom Message.
Step 11 : Select Request Reply. Connect it to the Receiver. A pop up will be displayed as below with all
the available Adapter types. Select Process Direct .

Step 12 : Click on the Adapter. In Connection tab, type any address ( /Second ). This same address has to
be used in the other flow which we are going to call ( Covered in further steps ).
Step 13 : Select Groovy Script. Click on the icon highlighted below
Step 14 : Remove the default code that appears and Paste the below given code and click on OK.
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
def body = message.getBody(java.lang.String) as String;
def messageLog = messageLogFactory.getMessageLog(message);
if(messageLog != null){
messageLog.setStringProperty("Logging#1", "Printing Payload As Attachment")
messageLog.addAttachmentAsString("ResponsePayload:", body, "text/plain");
}
return message;
}
Step 15 : The Flow should look as below. Save the flow. DO NOT DEPLOY ( as second flow which we are
going to call is not set up yet ).
Step 16 : Open the Second Flow that you have created.

Step 17 : Add one Content Modifier.


Step 18 : Connect from Sender to Start. From the Pop up window, choose Process Direct adapter.
Step 19 : Select Adapter and in Connection tab, give the address exactly same as given in Step 12 
(/Second).

Step 20 : In Message Body of Content Modifier, Add the body as


${in.body}
this is to include the message body from the previous flow ( Flow triggered).
Additionally, you can add any other Custom message specific to current flow.
Step 21 : The flow should look as below. Save and Deploy.
Step 22 : Go back to the First Flow. Deploy the same.

NOTE: First deploy the second I-Flow then deploy the First I-Flow
MONITORING INTEGRATION FLOWS

Here is the Final payload


It is clear from the above output that the first artifact calls the second artifact and performs the
activities in second artifact and takes the response back to first artifact to give as final output.

You might also like