AnsweredAssumed Answered

Problem in Groovy Script execution

Question asked by rakesh.dulam491832 on Nov 30, 2017
Latest reply on Nov 30, 2017 by trey.yeager826393

Hi folks,

 

I am using the below script for adding or subtracting the date and  time from the specified date.

 

It is working fine in the Eclipse but when coming to Boomi environment it is throwing error called

"No such property groovy class at the line mentioned below in the red colour."

 

 

import java.util.Properties;
import java.io.InputStream;
import groovy.time.*;
import java.util.Properties;
import java.text.SimpleDateFormat;
import java.util.Date;
// Import the ExecutionUtil class
import com.boomi.execution.ExecutionUtil;
//Retrieve a handle to the Logger
logger = ExecutionUtil.getBaseLogger();

String Date = ExecutionUtil.getDynamicProcessProperty("Isrun");
logger.info("this is the input " + Date)
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd HHmmss.SSS");
Date dateFormat = format.parse(Date);
logger.info("parsed date "+ dateFormat);
use (groovy.time.TimeCategory) {

dateFormat = dateFormat-3.hours;

}

blogger.info(dateFormat + "       Date before three hours")

 

Could you please suggest me the where actually am I doing wrong.

 

Regards,

Rakesh

Outcomes