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: 
Anonymous
Not applicable

Trigger another job, when tSystem output has certain text?.

Hello,

 

I want to trigger a stored procedure, when I run in tSystems an external perl script, which finishes successfully.
This is the output of the perl script in the tSystem component:

Start loading data at: 2008-04-17 10:46:23
Preparing load of data in /path/to/file/file.TXT:

Records inserted: 672
Finished loading data at: 2008-04-17 10:46:24


So I used an If-Trigger connection and I tried this:

((String)globalMap.get("tSystem_1_OUTPUT")) =="Finished loading data"


But nothing happens .
I guess you will suggest me to use regex, but I couldn't figure out how to use it.

 

thanks

iosman

Labels (5)
2 Replies
fdenis
Master
Master

you have to use string1.equals(string2) in java

but ((String)globalMap.get("tSystem_1_OUTPUT")) contain all the output
so you want to fount the position of your string.
https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#contains(java.lang.CharSequence)

your if condition must be:
((String)globalMap.get("tSystem_1_OUTPUT")).contains("Finished loading data")

regards
fdenis
Master
Master

can you tag it as solved or/and explain the solution.