Skip to Content

SCPI Groovy Script to Read Header Parameters


I am writing Grrovy script in iFlow. I want to know how I can read Message Header * Properties in script & update values.

Thank you in advance,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 24, 2018 at 01:41 PM

    Hello Mahantesh,

    Please find the below.

    import java.util.HashMap;
    def Message processData(Message message) {
    	def body = message.getBody();
    	message.setBody(body + "Body is modified");
    	//Get Headers 
    	def map = message.getHeaders();
    	def value = map.get("oldHeader");
    	//Set Headers
    	message.setHeader("oldHeader", value + "modified");
    	message.setHeader("newHeader", "newHeader");
    	//Get Properties  
    	map = message.getProperties();
    	value = map.get("oldProperty");
    	//Set Properties 
    	message.setProperty("oldProperty", value + "modified");
    	message.setProperty("newProperty", "newProperty");
    	return message;


    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded