Skip to Content

Content Modifier Message Header types in HCI

There are various types in Content modifier of HCI like expression,xpath,constant,Header.

When and where to use this type? Especially the type Header and property of message header where to use? I am asking about Header and property type in message header of content modifier not Header and property of content modifier.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 06, 2018 at 10:08 AM

    Hi Janaki,

    The purpose to introduce header type and property type in Content modifier is for Reusability.

    Example: You maintained some entries in Header and Exchange parameter respectively and you need to reuse that values in anywhere in the integration flow ,so you can use this header type and property type and can give reference to the value that you want to use.

    PFB the screenshots for better understanding:

    1) Header (I am using type constant for an example)

    2) Exchange Property (I am using type constant for an example)

    3) Now we are reusing this value in another content modifier:

    Hope it helps! :)

    Cheers!

    Regards,

    Pravesh Shukla

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04, 2018 at 01:12 PM

    Hi Janaki

    The type determines where the value, that goes into your header, comes from. With the Header and Property types, the value comes from an existing header and an existing property, respectively.

    Regards,

    Morten

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 05, 2018 at 05:33 PM

    Hello

    I have a problem with an iflow with content Modifier and script.

    I have two header and one varible. I have defined:

    But when I executed the iflow, I have obtained the error:

    Error Details

    javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: message for class: Selec__Script, cause: groovy.lang.MissingPropertyException: No such property: message for class: Selec__Script

    The script is:

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

    import java.util.HashMap; import com.sap.it.api.mapping.*;

    import com.sap.it.api.mapping.MappingContext;

    def map = message.getHeaders();

    def CertExpiryDate = map.get('CertExpiryDate');

    Date CertExpirydate = new Date('yyyy-MM-dd').parse(CertExpirydate);

    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

    Best regards

    Add comment
    10|10000 characters needed characters exceeded