
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to Using variable declared in tJava to next componet
I want to use variable declared in tJava, so I tried "tMap" and tSetGlobalVar.
But It doesn't work
I want to use location variable in tSystem
Thanks in advance
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to call tSystem for each iteration, link tjava to tSystem using a OnComponentOK connector.
tFileList--iterate--tJava--Oncomponentok--tSystem.
If you want to call tSystem after all iterations finishes, link tFileList to tSystem using OnsubjobOK connector.
tFileList--iterate--tJava
|Onsubjobok
tSystem.
To declare a global variable and put value, use this expression:
globalMap.put("key",value);
To get the value, use
(String)globalMap.get("key")
//for String type.
Hope it helps you.
Regards
Shong

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply, but still doesn't work.
I set like your solution except "Iterate" between tFileList_1 and tJava becauseof Path difference
This Error massage

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"String dirName =((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).replace("\\", "/").substring(2);
System.out.println(dirName);
globalMap.put("dirName", dirName);
"
I think they can not call ther tFileList_CURRENT_FILEPATH..
is there another way to recognize it in tSystem?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First
I run this job in linux environment, (.sh file)
but there isn't "D:/FTPTest "(tFileList) things in linux.
Second
as you said.. "Iterate" things between tFileList and tJava could be a problem
but there's a issue if "Iterate" is real problem.
I tested both "Iterate" and "onComponentOK" and Path that I wanted appear when only use "ComponentOK"
ex)
use Iterate
"D:/FTPTest/NAVI"
use onComponentOK
"D:/FTPTest/NAVI/Barnum"
and I want to below path.. so I used onComponentOK.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to iterate each file, you should use Iterate, it depends on your requirement. If you use onComponentOK, it only process the last file.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when I running .sh file on server, I want to check the log.
is it okay if I link each component to tWarn?
like this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks...
Last question
workflow is looks fine but can't insert it.
please let us know if you know

- « Previous Replies
-
- 1
- 2
- Next Replies »