Groovy - How to get all properties ( Property, Header), edit in script and use output as ${header.newHeader} or ${property.newProperty} in SAP CPI Integration Flow (Iflow) Code Example

The code for How to get all properties ( Property, Header), edit in script and use output as ${header.newHeader} or ${property.newProperty} in SAP CPI Integration Flow (Iflow)

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;

def Message processData(Message message) {
    map = message.getProperties();
    def zID = map.get("ID");
    def indicator;
    if(zID == '')
    {
        indicator = 'false';
    }
    else
    {
        indicator = 'true';
    }
    message.setProperty("Result", indicator);
    return message;
}
Code by Reddy MS, on February 7, 2023 13:30

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.