Interface RestartableScriptObject
- 
- All Known Subinterfaces:
- PostRunningActionScriptObject,- PreExecutingActionScriptObject
 - All Known Implementing Classes:
- ActionScriptObject
 
 public interface RestartableScriptObjectTriggers 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. The trigger/action must callsetMaximumRestarts(int)and pass in a number greater than zero to be restarted. For example, if you call setMaximumRestarts(5) then the maximum number of times this trigger/action will be restarted for a given modification to a job is 5 times. In general you should call setMaximumRestarts() as the first line in your trigger/action if you want it to be restarted.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleangetFailJobOnError()Get the current value of the fail job on error flag.booleangetForceRestart()Get the value of the Force restart flag for this trigger/action.intgetMaximumRestarts()Get the maximum number of restarts allowed for this trigger/action.Map<Object,Object>getPersistentMap()Get the persistent map.intgetRestartCount()Get the number of restarts for this trigger/action.StringgetRestartReason()Get the restart reason for this trigger/action.booleanlogRestarts()Should restarts of this trigger/action be logged?voidsetFailJobOnError(boolean newValue)Set the 'fail job on error' flag.voidsetForceRestart(boolean newValue, String newReason)Set the value of the force restart flag for this trigger/action.voidsetLogRestarts(boolean newValue)Set if restarts of this trigger/action should be logged.voidsetMaximumRestarts(int newValue)Set the maximum number of restarts of allowed for this trigger/action.
 
- 
- 
- 
Method Detail- 
setFailJobOnErrorvoid setFailJobOnError(boolean newValue) Set the 'fail job on error' flag. This flag determines if the job should be failed if the action fails. Set to true to fail the job if the action fails, and false to ignore action failures. The default value is true.- Parameters:
- newValue- new value.
 
 - 
getFailJobOnErrorboolean getFailJobOnError() Get the current value of the fail job on error flag.- Returns:
- the current value.
- See Also:
- .
 
 - 
getMaximumRestartsint getMaximumRestarts() Get the maximum number of restarts allowed for this trigger/action.- Returns:
- the maximum number of restarts allowed.
- See Also:
- .
 
 - 
logRestartsboolean logRestarts() Should restarts of this trigger/action be logged?- Returns:
- true if restarts should be logged, false otherwise.
 
 - 
setLogRestartsvoid setLogRestarts(boolean newValue) Set if restarts of this trigger/action should be logged.- Parameters:
- newValue- true if restarts should be logged, false otherwise.
 
 - 
setMaximumRestartsvoid setMaximumRestarts(int newValue) Set the maximum number of restarts of allowed for this trigger/action. This is a total count for a given modification.- Parameters:
- newValue- the maximum number of restarts allowed.
 
 - 
getRestartCountint getRestartCount() Get the number of restarts for this trigger/action.- Returns:
- the number of restarts so far.
 
 - 
getPersistentMapMap<Object,Object> getPersistentMap() Get the persistent map. This can be used to store data across restarts of the trigger/action.- Returns:
- the persistent map.
 
 - 
setForceRestartvoid setForceRestart(boolean newValue, String newReason)Set the value of the force restart flag for this trigger/action. Forced restarts do not effect the restart count.- Parameters:
- newValue- true to force a restart, false to suppress a previous request to force a restart.
- newReason- the reason for the restart, will be logged.
 
 - 
getForceRestartboolean getForceRestart() Get the value of the Force restart flag for this trigger/action.- Returns:
- the value of the force restart flag.
 
 - 
getRestartReasonString getRestartReason() Get the restart reason for this trigger/action.- Returns:
- the restart reason.
 
 
- 
 
-