[resolved] Access exchange / context object from cMap

Four Stars

[resolved] Access exchange / context object from cMap

Hi Team,
I've come across a scenario where i have to access the context parameters in the cMap component. 
I've used bean class using the parameterised constructor to set the values in instance variable and the same i accessed from java static method. 
Is there any other way to access the same? The problem with this method i ESB container needs to be restarted completely to initialize these variables.
Jeeva

Accepted Solutions
Employee

Re: [resolved] Access exchange / context object from cMap

Hello Jeeva ,
You would need to set context variable as exchange property like a header before you pass to cMap . And in actual map in TDM , you would use GetMapProperty function and just give your context variable name. See attached screenshots.

All Replies
Employee

Re: [resolved] Access exchange / context object from cMap

Hello Jeeva ,
You would need to set context variable as exchange property like a header before you pass to cMap . And in actual map in TDM , you would use GetMapProperty function and just give your context variable name. See attached screenshots.
Four Stars

Re: [resolved] Access exchange / context object from cMap

Thank you so much for your reply. It works.

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read