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

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!

Highlighted
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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now