Interface PreExecutingActionScriptObject
-
- All Superinterfaces:
RestartableScriptObject
public interface PreExecutingActionScriptObject extends RestartableScriptObject
This class provides methods to get the old values of Job attributes, and to control restarts of the trigger/action. Triggers and actions may fail if another user or the system updates the object. To ensure that they always run triggers and actions may be restarted. SeeRestartableScriptObject
for more information. The old values of the following properties of the Job are available:- Old job status (true or false)- using
getOldStatus()
- New job status (true or false)- using
getNewStatus()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JobStatus
getNewStatus()
Get the new status of the job, the status that this job will go into once this action completes (assuming that the action doesn't change the job).JobStatus
getOldStatus()
Get the old status of the job, the status that this job was in before the action started.void
setFailJobOnError(boolean newValue)
Fail the job on error (default: true).-
Methods inherited from interface com.redwood.scheduler.api.scripting.variables.RestartableScriptObject
getFailJobOnError, getForceRestart, getMaximumRestarts, getPersistentMap, getRestartCount, getRestartReason, logRestarts, setForceRestart, setLogRestarts, setMaximumRestarts
-
-
-
-
Method Detail
-
getOldStatus
JobStatus getOldStatus()
Get the old status of the job, the status that this job was in before the action started.- Returns:
- the old status.
-
getNewStatus
JobStatus getNewStatus()
Get the new status of the job, the status that this job will go into once this action completes (assuming that the action doesn't change the job).- Returns:
- the new status.
-
setFailJobOnError
void setFailJobOnError(boolean newValue)
Fail the job on error (default: true).- Specified by:
setFailJobOnError
in interfaceRestartableScriptObject
- Parameters:
newValue
- new value.
-
-