Processing delay of 8s for every messages sent to the end system.
1. Replace xml node
2. delay code of 8 secs
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import java.lang.*
def Message processData(Message message) {
def body = message.getBody(java.lang.String) as String;
body = body.replaceAll("\\<\\?xml(.+?)\\?\\>", "").trim(); //Replace xml node
message.setBody(body);
sleep(8000) // wait for 8 secs
return message;
}
Groovy Script
import java.util.HashMap;
import java.lang.*
def Message processData(Message message) {
def body = message.getBody(java.lang.String) as String;
body = body.replaceAll("\\<\\?xml(.+?)\\?\\>", "").trim(); //Replace xml node
message.setBody(body);
sleep(8000) // wait for 8 secs
return message;
}
No comments:
Post a Comment