Job status within a sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 22
- Joined: Tue May 09, 2017 8:46 am
Job status within a sequence
Is there a way we can call the job status of the previous job, in a later job at the sequence.
Job 1---> Job2 -- Sequencer---> Job3
I would like Job1.status to be given as a parameter in Job 3.
Job 1---> Job2 -- Sequencer---> Job3
I would like Job1.status to be given as a parameter in Job 3.
I don't recall having to do anything special for this. Any information from previously executed stages should be available to the current one. Is it not listed if you open up the "parameter helper" widget (the ... ellipsis) inside the Job3 parameter you want to set?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
While the metadata is available through calls to DSGetJobStatus(), the Status of any predecessor of "Job3" might not have been updated at the Point in time when it is called - These are not always synchronous calls. You might write a Loop that waits until the Job is no longer running accoording to DSGetJobInfo() before returning the final Status.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I recall having done exactly this call of DSGetJobInfo() in a project in the past and gotten an invalid status back; the assumption at the time was that the status wasn't committed. But I just recalled that you can use the Status of a predecessor directly within the sequence with no issues, if the Job is called "Job1" in sequence, then the activity variable "Job1.$JobStatus" will contain the correct Status upon completion.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 22
- Joined: Tue May 09, 2017 8:46 am
-
- Participant
- Posts: 22
- Joined: Tue May 09, 2017 8:46 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
BTW, if in an after-job subroutine, you can request the job's interim status - that is, the status that it will have provided that the after-job subroutine completes without setting the ErrorFlag return value to non-zero.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.