Connecting to a Cluster Database (RAC) in Suite: A Challenge and Solution
The limitations of direct connections to RAC databases in Suite by leveraging HTTP calls through PI to CPI. This innovative approach provides a flexible and reliable solution for integrating with clustered databases.
Prerequisites:
Process:
IFlow:
Fetch the table data: Content modifier property details
Content Modifier Message Body
${property.Http_Select}
Http_Select: REST calls support both JSON and XML, so the HTTP input format for this integration should be XML. The table and query information should be included in the REST input as XML elements.
The SELECT query should be defined in the access element, while the table name should be specified in the action element.
<root>
<stmt>
<TableName action="SQL_QUERY">
<access>Select fieldnames from tablename and rownum = 1</access>
</TableName>
</stmt>
</root>
Http Adapter:
HttpAddress: http://<PIHost>:<PIPort>/RESTAdapter/Call_PI/Send_JDBC
To establish a connection between the Cloud Connector and the on-premises PI system, the following information must be configured:
Pass through ICO in PI:
REST Call:
JDBC Call: A service-based connection to an Oracle DB running on Oracle RAC (cluster).
Groovy Script: replace root node
To align the structure of the CPI response with the JDBC response.
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
//Read Input as String
def body = message.getBody(String);
//Replace XML Root and Sub Node
String output = body.replace("root_response", "ROOT").replace("stmt_response", "select_response");
//Set Output
message.setBody(output);
return message;
}
Payload difference before and after groovy
Before groovy:
After groovy:
Following the Groovy script, the integration flow can proceed to the next step based on the script's output and the defined requirements.
NOTE:SAP has recommended the Edge Integration Cell as the ideal solution for this requirement within SAP Integration Suite. However, due to our tight timeline, we're exploring a more immediate option using SAP PO, which already has established connections.
Bhavani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |