This scenario is a simple Job that prints out the value of a global variable defined in the tSetGlobalVar component.
Drop the following components from the Palette onto the design workspace: tSetGlobalVar and tJava.
Connect the tSetGlobalVar component to the tJava component using a Trigger > OnSubjobOk connection.
Double-click the tSetGlobalVar component to display its Basic settings view.
Click the plus button to add a line in the Variables table, and fill the Key and Value fields with K1 and 20 respectively.
Then double-click the tJava component to display its Basic settings view.
In the Code area, type in the following lines:
String foo = "bar"; String K1; String Result = "The value is:";
Result = Result + globalMap.get("K1");
In this use case, we use the Result variable. To access the global variable list, press Ctrl + Space bar on your keyboard and select the relevant global parameter.