cancel
Showing results for 
Search instead for 
Did you mean: 

Content Modifier Message Header types in HCI

0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

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

0 Kudos

Hi Pravesh Shukla,

In this scenario, Please see the first content modifier is creating type header with value txn, name SAP_ApplicationID. Since there is no other content modifier is present previously from where the txn value is taken? Can you please help me with the this scenario.

Sriprasadsbhat
Active Contributor

Hello Janaki Ram,

This might be coming from your HTTP sender and please check whether you have any entry in Run time Configuration of your iflow.

Regards,

Sriprasad S Bhat

Hi Sriprasad,

Thanks for your comment. Now the issue has been resolved and can able to understand the things.

Answers (2)

Answers (2)

MortenWittrock
Active Contributor

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

0 Kudos

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