
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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))
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"))).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"))).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
