Groovy Script:
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import groovy.json.JsonSlurper
import groovy.json.JsonException
import groovy.json.JsonOutput
import javax.xml.*;
import groovy.xml.*
def Message processData(Message message)
{
import java.util.HashMap;
import groovy.json.JsonSlurper
import groovy.json.JsonException
import groovy.json.JsonOutput
import javax.xml.*;
import groovy.xml.*
def Message processData(Message message)
{
def propertyMap = message.getProperties()
String date2 = propertyMap.get("ExectutionDate");
String date3 = propertyMap.get("ExectutionDate1");
String date4 = propertyMap.get("ExectutionDate2");
def date1 = new Date()
String day = date1.getDate()
if (day == date2 || day == date3 || day == date4 )
{
String date2 = propertyMap.get("ExectutionDate");
String date3 = propertyMap.get("ExectutionDate1");
String date4 = propertyMap.get("ExectutionDate2");
def date1 = new Date()
String day = date1.getDate()
if (day == date2 || day == date3 || day == date4 )
{
Flag = "true";
}
else {
else {
Flag = "false"
}
message.setProperty("Flag1", Flag)
message.setProperty("day1", day)
return message;
message.setProperty("Flag1", Flag)
message.setProperty("day1", day)
return message;
}
No comments:
Post a Comment