on 01-20-2015 5:19 AM
Dear All,
We are using Build: M33.92 CPS version.
Could you please advise on the below scenario with final status handlers
I have job chain created with 3 steps
Step 1- (ON ERROR : GOTO: STEP 3)
Step 2- ON ERROR: Continue
Step 3
If all the steps in the chain executes completely then the final status of the chain is "Completed" (which is normal)
However if step 1 and step 2 got errored and step 3 is successful, the final status of the chain shows as "Completed" .How can we make the chain as errored, if any step of the job chain errors?
In Default status Handlers I defined with and with out the below condition but still same issue.
On Error: Raise error
Can anyone please advise, the appropriate conditions maintained in the default and final status handler or any other configurations.
Thank you in advance.
Regards,
Ramana
You have to write a post-running action to check the child jobs' status and then set the Job Chain status.
thanks
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so so much Nanda. I used the below post running action from the admin guide.
{
//Check if the first step failed, if it did,
//throw an exception to put the Jobchain job into Error
String stepName = "Step 1";
String statusName = "Error";
// Get an iterator over the child jobs of the job chain job
for (Iterator it = jcsJob.getChildJobs(); it.hasNext();)
{
Job myJob = (Job)it.next();
String realStepName = (String) myJob.getDescription();
String realStatus = (String) myJob.getStatus().name();
if (stepName.equals(realStepName) && statusName.equals(realStatus))
{
throw new RuntimeException();
}
}
}
Regards,
Ramana
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.