Force complete an application or job with Alert in DE (dSeries)
book
Article ID: 96482
calendar_today
Updated On:
Products
DSERIES- SERVER
CA Workload Automation DE - System Agent (dSeries)
Issue/Introduction
An Alert can be used to either force complete a job or the entire application.
Environment
Workload Automation DE 12.x
Resolution
Steps:
- Login to the DE via Desktop Client.
- Setup an Alert under Services -> Alert.
- In the "Run this JavaScript", add the following script;
To force complete a job say MY_JOB1, use the following script:
execCommand('MY_JOB1','%(APPL._name).%APPL._gen','ACTION COMPLETE REASON("MY_JOB1 had issues")');
To force complete the entire application, use the following script:
execCommand('ALL','%(APPL._name).%APPL._gen','ACTION COMPLETE REASON("Force Completed the application")');
Note: Put the APPL._name in parenthesis (). Otherwise, the variable will get changed to uppercase resulting in unresolvable variable.
- Add the Alert to the Notifications in the job or in the application. Define the state(s) for the Alert to trigger on.
Additional Information
The JavaScript can also be defined in Repository and added from the 'Run a JavaScript from Repository'.
Feedback
thumb_up
Yes
thumb_down
No