on 04-15-2016 7:44 PM
Currently processing a job which fails via a CPS System kill for each run. CPS/Redwood Guides states that the Error status can be change to Completed in the Job Definition Actions Tab with the Post Running Option via a Redwood Script. Looking for a layout or a working example of the script.
Hi Larry,
I would be curious to know where in the documentation it is mentioned that you can set the final status of a job that has been killed. This should not be possible. Killing a job should be something out-of-the-ordinary, not something you do regularly. The real solution to your problem is improving the code that is run when your job is running (the code in the job definition) to exit early if something goes wrong.
When you kill a job, you interrupt all processing, even the post-running action.
If this job is in a chain, you can use status handlers there to mark the chain Completed, even if you killed the job inside the chain.
As for setting the final status in a post running action, you could use something like this, however (!), this will not work for killed jobs:
{
if (<myCondition>)
{
jcsPostRunningContext.setFinalStatus(JobStatus.Completed);
}
}
Where myCondition is some condition, for example:
JobStatus.Error.equals(jcsJob.getStatus())
Regards,
HP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.