You are not logged in.
Hello Admins .
I am using TIS 4.2 .
I am creating a new "Routine" in order to use it in my tjava Component , but I have a problem while using the context in my class !!
the "context.variableName" cause a compilation error .
How to use the context in my class ? Advice Plz
Thanks in advance
First, you need to add this context variable in the Talend job.
Switch to the "Contexts" tag below the job design area. And click on "+" button to add it.
Thanks for your help !
That works only when using a context in a job m but I want to use the context in a class created by myself
like TalendString , TalendDate ,...
How to use it inside my class ? that is my question .
The context variable needs to be based on a Talend job. No job, no context.
So you have to use a parameter in your custom routine.
In short, you cannot use context variable in routine directly. The only way is to pass it as a parameter of a Java method.