How to get the current active context name ?

One Star

How to get the current active context name ?

Hi guys,
I need to make a distinction depending on the active context.
In "Default" i need to run a special job whereas in "Production" and "Test" context i don't have to.
Is there a way to deal with that, a way to retrieve the current or active context name ?
Thanks in advance,
One Star

Re: How to get the current active context name ?

Hi gavelin,
In Java, try contextStr.equals("Default").
Cheers,
c0utta
Community Manager

Re: How to get the current active context name ?

Hello
Is there a way to deal with that, a way to retrieve the current or active context name ?

Yes, there is a variable store the currnet context name
System.out.println(contextStr);

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to get the current active context name ?

Does anyone know how to access contextStr in e.g. the properties for a component such as tFileCopy?