Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

trigger run if

If I have 2 tOracleConnection to connect to a source DB and a target DB
tRunJob----onSubJobError--->tDie----If(order:1)-->tOracleClose_1
-----If(order:2)-->tOracleClose_2
Is this a good way to making sure both connections are closed when the job Die? Should I use onComponentOK on the tDie?
Thanks.
Labels (2)
17 Replies
Anonymous
Not applicable
Author

Shong,the issue still exists,the mail gets fired even when the code send 'E',actually as i had told in previous post the globalmap.get does not work,it returns null,that is it fail to get the globalmap.set as in the code set comes before get,is there any way to change the code.please guide.S/E or Y/N they are the same s=success & E=Error.
Anonymous
Not applicable
Author

Hi Shong after putting tlogrow the results are printed as 'S' or 'E' depends on the data.
Anonymous
Not applicable
Author

Hi Shong What is wrong with this stupid code (input_row.st gives E/S) ,but the code does not get fired for either if's
if (input_row.st == "E") {
System.out.println("inside if" );
}else if (input_row.st == "S") {
System.out.println("outside if" );
globalMap.put("msg_val","Success for ");
System.out.println(input_row.st);
}
Please guide
Anonymous
Not applicable
Author

Hi
In Java, to check one string is equals to another string, should use the method A.equals(B). In your case, the Java code should be:
input_row.st.equals("E")
Please modify your code!
Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong no success,changed code,still not getting in the if conditions,please guide(this in a tjavarow component)
if (input_row.st.equals("E")) {
globalMap.put("msg_val",input_row.st);
System.out.println("inside if" );
}else if (input_row.st == "S") {
System.out.println("outside if" );
globalMap.put("msg_val","Error" +input_row.st);
System.out.println(input_row.st);
}
Anonymous
Not applicable
Author

Hi Shong thanks for your help, had to take help of a java programmer,actually he put one more line after sysout and we came to see that it(procedure output i e E/S) was taking a new line,so it was returning E along with a new line,after putting trim the code worked.
Anonymous
Not applicable
Author

Hi Shong thanks for your help, had to take help of a java programmer,actually he put one more line after sysout and we came to see that it(procedure output i e E/S) was taking a new line,so it was returning E along with a new line,after putting trim the code worked.

good news!
Glad to see you get it works now!
Best regards
Shong
Anonymous
Not applicable
Author

hi Shong,i have a job which has four components mssqlinput (row)->tjavarow(row)->tjava(row)->tlogrow
in tjavarow the code is globalMap.put("var1","test"); &
in tjava the code is System.out.println("tjava " + globalMap.get("var1"));
when i execute this job i get message " tjava null"
why this is null when the answer should be " tjava test",
I have observed from the code that get comes BEFORE put ,hence null.