Four Stars

Can I use value from a context variable or a global variable in setHeader component?

Hi,

 

I am new to Talend. I am writing a route to encrypt plain file in a directory.

I am using CJavaDSLprocessor (.mashal(pgpSignAndEncrypt)  encrypt and sign the file in the directory.

Before cJavaDSLprocessor, does sign and encryption,  I will need to setHeader component to have all following header value set 

"CamelPGPDataFormatSignatureKeyRing"

"CamelPGPDataFormatKeyPassword"

"CamelPGPDataFormatEncryptionKeyRing"

"CamelPGPDataFormatKeyUserids"

"CamelPGPDataFormatNumberOfEncryptionKeys"

"CamelPGPDataFormatSignatureKeyUserid"

 

The values were retrieved from database dynamically in a sub-route ( direct from multicast, I could not set header in there since it is different message) .   I am thinking to set them in the globallMap or context variable,  and then set in cSetHeader component before sign and encrypt the file.  

 

Do anyone know how to do that? any suggestion?

 

Thanks!

1 REPLY
Moderator

Re: Can I use value from a context variable or a global variable in setHeader component?

Hello,

Sorry for delay.

We have redirected your issue to ESB experts and then come back to you as soon as we can.

Thanks for your time.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.