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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tDie after RunIf condition

Hi,
I'm using TOS 5.0.1 with AS400 SGBD.
I would like to create a parent job to transmit by integer variable (context) asked "STOP_TO_ERROR" an argument to child job.
My child job execute an tAS400Row and testing the variable "STOP_TO_ERROR" and if equals 1 then execute tDie component to stop process:
tAS400Row --> RunIf --> tDie
If condition : ((Integer)globalMap.get("STOP_SI_ERREUR")).equals(1)
When I'm executing the parent job I have an error message :
connecting to socket on port 3569
connected
Exception in component tAS400Row_1
java.lang.NullPointerException
at shlmr.alim_maj_statut_0_1.alim_maj_statut.tAS400Row_1Process(alim_maj_statut.java:895)
at shlmr.alim_maj_statut_0_1.alim_maj_statut.runJobInTOS(alim_maj_statut.java:3625)
at shlmr.alim_maj_statut_0_1.alim_maj_statut.runJob(alim_maj_statut.java:3312)
at shlmr.aaa_0_1.aaa.tRunJob_3Process(aaa.java:1246)
at shlmr.aaa_0_1.aaa.tAS400Input_1Process(aaa.java:1116)
at shlmr.aaa_0_1.aaa.runJobInTOS(aaa.java:3997)
at shlmr.aaa_0_1.aaa.main(aaa.java:3646)
Exception in component tRunJob_3
java.lang.RuntimeException: Child job running failed
at shlmr.aaa_0_1.aaa.tRunJob_3Process(aaa.java:1264)
at shlmr.aaa_0_1.aaa.tAS400Input_1Process(aaa.java:1116)
at shlmr.aaa_0_1.aaa.runJobInTOS(aaa.java:3997)
at shlmr.aaa_0_1.aaa.main(aaa.java:3646)
disconnected
I think i should be used tJava or tJavaRow component...
How to create RunIf condition to testing my parameter after execute the tAS400Row ?
See a screenshot.
Regards,
Olivier
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
Here is the expression of Run-if trigger in this child job.
context.STOP_SI_ERREUR==1

I think you don't understand how to pass value with tRunjob.
Regards,
Pedro

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Hi Olivier
According to your description, now the problem is how to pass the value of "STOP_TO_ERROR" from main job to child job, for which you need to configure 'Context param' on tRunjob.
Here is a previous topic 21855.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro,
It's ok for this part.
My problem is to testing my variable after executing tAS00Row (from my screenshot).
If I using Run If condition after tAS400Row I have this error
. I don't know if it's an obligation to use tJava component for loading «STOP_TO_ERROR» before testing this parameter on If condition.
In another job, I'm using this condition after tJavaRow :
tAS400Input --main--> tJavaRow --If-->tRunJob
And it's ok, I can replicate the result of tAS400Input on my variable by the tJavaRow and testing my variable on If condition...
But, how to create this job :
tAS400Row --?--> tDie.
tDie not depending of tAs400Row, is executing after this.
tDie depending of my ParentParameter «STOP_TO_ERROR».
Thanks
Anonymous
Not applicable
Author

Hi
Please show me the screenshot about tRunjob in your main job.
The reason you got NPE exception is that global value "STOP_TO_ERROR" wasn't passed from main job to child job.
Solution: Add a context variable called new1 in the child job.
Configure tRunJob component of the main job as the following image.
Modify the expression of Run-if trigger in the child job with context.new1.
Regards,
Pedro
Anonymous
Not applicable
Author

See my screenshot from parentjob and childrenjob.
To resum, I'll would like to stop process (all jobs) when asking childjob and "STOP_TO_ERROR" parameters = 1.
Parent Job in order process :
ParentSearch.jpg
JavaRowParent.jpg
If2Parent.jpg
ParentJob.jpg
If1Parent.jpg
ParentJobOK.jpg

Children Job in order :
contextchildjob.jpg
ChildJobUpdate.jpg
IfChildJob.jpg
Anonymous
Not applicable
Author

Hi
Here is the expression of Run-if trigger in this child job.
context.STOP_SI_ERREUR==1

I think you don't understand how to pass value with tRunjob.
Regards,
Pedro
Anonymous
Not applicable
Author

Ok...
Many thanks for your reply 0683p000009MA9p.png

Regards,
Olivier