Both SAP XI and Oracle BPEL provide support for Java language. The blog is a step by step procedure for moving a java embedding found in Oracle’s BPEL to modules in SAP XI.
Introduction
There is a previous blog by me regarding migration from BIE translations to XI mappings. Please take a look at Migrate from BIE translations to SAP-XI mappings with ease . Here we shall see about migrating from Oracle’s Java embeddings to SAP-XI modules.
The similarity between both bpelx:exec (Java bindings) and a XI module is that both are Java based and both can modify data and both are used for the same purpose.
Java Embedding
The above image is a sample screen shot of Oracle’s Java bindings.
How to Migrate?
- To identify entry and exit points.
- To identify oracle specific functions
In XI, every module is an EJB extends Module class and having the function signature,
ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData);
But in Oracle’s Process Manager, it is like a code snippet and no parameter kind of stuffs. But two important functions are provided which can be compared to similar functions in XI module.
Oracle’s Java Embedding
//Input
Element ssn = (Element)getVariableData("<root-node>","<element-name>","<xpath>");
//Trace
addAuditTrailEntry("This is audit trail");
//Output
setVariableData("<root-node>", "<element-name>","<xpath>", "<value>");
SAP’s XI Module
//Input
Object obj = inputModuleData.getPrincipalData();
Message msg = (Message) obj;
XMLPayload xmlpayload = msg.getDocument();
byte xmldata[]= xmlpayload.getContent();
//Trace
TRACE.debugT(SIGNATURE, "This is trace");
//Output
xmlpayload.setContent(xmldata);
inputModuleData.setPrincipalData(msg);
Apart from the above mentioned most of the other codings are in Java and can be readily used without any problem.
addAuditTrailEntry in Oracle BPELConsole
TRACE.debugT function replicates the same in SAP-XI.
With this procedure, the entire Oracle’s Java embeddings can be easily converted to SAP-XI modules.