import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import groovy.json.*;
def Message processData(Message message) {
//Get Body
def body = message.getBody(String.class);
def jsonSlurper = new JsonSlurper()
def payload = jsonSlurper.parseText(body)
def error = payload.childInstances.parameter
//Get Properties
def map = message.getProperties();
def if_name = map.get("name")
//prepare message body
body = "<HTML><BODY>"+
"<P>Hi Team<BR><BR>"+
"An Interface is in Error in CPI. Please find the details below.<BR><BR>"+
"<B>IFlow Name: </B>"+ map.get("name") +"<BR>"+ "<B>ErrorMessage: </B>"+error+"<BR><BR>"+"Regards,<BR>"+"SAP CPI Admin <BR><BR>" +
"***This is an autogenerated email for Errors in SAP CPI tenant***"+
"</P></BODY></HTML>";
//set message body
message.setBody(body);
return message;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |