Process Direct
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.
Step 3 : Delete the Start event. This is done to add a timer as trigger event.
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.
NOTE: First deploy the second I-Flow then deploy the First I-Flow
MONITORING INTEGRATION FLOWS