Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gadje
Contributor III
Contributor III

Get returned value by tSystem that using .jar

Hi,

I try to get value that is returned by tSystem that using .jar.

I set Standard output of tSystem as console and globlal variable

But my outputs looks like that :

Démarrage du job ParserPdfTest_02 a 13:00 30/11/2020.

[statistics] connecting to socket on port 3784

[statistics] connected

null

AD376_557622

[statistics] disconnected

Job ParserPdfTest_02 terminé à 13:00 30/11/2020. [Code sortie=0]

The console output return the good value but not the context.

I tried to set context variable like that :

context.XXXXXX=((String)globalMap.get(tSystem_1_OUTPUT))

Labels (2)
1 Solution

Accepted Solutions
Gadje
Contributor III
Contributor III
Author

I found how to do.

I added a tSleep component between tSystem and tJava components that attributes value to context (context.fileName=((String)globalMap.get("tSystem_1_OUTPUT"))).

 

View solution in original post

2 Replies
Gadje
Contributor III
Contributor III
Author

I found how to do.

I added a tSleep component between tSystem and tJava components that attributes value to context (context.fileName=((String)globalMap.get("tSystem_1_OUTPUT"))).

 

Anonymous
Not applicable

Hello,

Another way looks like: tSystem - > tJavarow -> tJava.

All components are connected as OnComponentOK connector and you are able to overwrite context variable value with following code in tJavaRow. 

System.out.println("value 1 :----"+((String)globalMap.get("tSystem_1_OUTPUT")));

context.pct = (String)globalMap.get("tSystem_1_OUTPUT");

System.out.println("context value print1... : "+ context.pct);

Best regards

Sabrina