Hello
I have a simple scipt, But I can't execute, because I have obtained the error:
javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: message for class: new__Script, cause: groovy.lang.MissingPropertyException: No such property: message for class: new__Script
The script is :
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def map = message.getHeaders();
String getCertExpirydate = map.get("CertExpiryDate");
Date CertExpirydate = new Date().parse('YYYY/MM/DD', getCertExpirydate);
Date dateNow = new Date(System.currentTimeMillis());
long dateDiff = CertExpirydate.getTime() - dateNow.getTime();
def daysToExpire = TimeUnit.DAYS.convert(dateDiff, TimeUnit.MILLISECONDS);
message.setHeader("daysToExpire", daysToExpire);
Thanks
Dear Usuari, hi!
Variable message is not defined and this is a trouble.
Best regards, Vasiliy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.