Package com.redwood.scheduler.api.model
Interface JobChain
- 
- All Superinterfaces:
- BusinessKeyObject,- JobChainComp,- JobDefinitionRelatedObject,- Readable,- Root,- SchedulerEntity,- SchedulerEntityComp
 
 public interface JobChain extends JobChainComp, JobDefinitionRelatedObject, Readable Chain definition. A chain definition is a special type of definition, grouping processes that are submitted when the chain is submitted. The chain consists of a number of steps, with each step calling a number of processes to be executed. Only one step is executed at a time, calls in a step are executed simultaneously, by default. Time windows, queue limits, locks, events, and preconditions can be used to control the execution of a call. When all calls of a step have finished successfully, processing continues to the next step, by default; when at least one call fails, the step and chain fail, by default. Status Handlers are used to control what happens after a step has finished. Calls and steps can be skipped using preconditions. Additionally, steps can be skipped using the "Start At Step" scheduling parameter or the "Go to Step" Status Handler action. Steps of a prepared chain can be disabled; submitted steps can be disabled as long as they have not started.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "JobChain" objects.static StringSEC_RANK_ALLThis rank is made of the following privileges:static StringSEC_RANK_NONEThis rank has no privileges assigned to it.static QueryObjectType<JobChain>TYPEType that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).- 
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntityACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description JobChainStatusHandlercreateDefaultJobChainStatusHandler()Create a newDefaultJobChainStatusHandlerlinked to this object.JobChainStepcreateJobChainStep()Create a newJobChainSteplinked to this object.voidfetchAll()Fetch all data for the jobchain editor.JobChainStatusHandlergetDefaultJobChainStatusHandlerByStatus(JobStatus status)Get the JobChainStatusHandler by JobChainStatusHandler.RWIterable<JobChainStatusHandler>getDefaultJobChainStatusHandlers()Get anRWIterableover a collection ofDefaultJobChainStatusHandlers, the collection will be ordered by SequenceNumber.JobChainStepgetJobChainStepByName(String name)Get the JobChainStep by NameJobChain.JobChainStepgetJobChainStepBySequenceNumber(Long sequenceNumber)Get the JobChainStep by SequenceNumberJobChain.RWIterable<JobChainStep>getJobChainSteps()Get anRWIterableover a collection ofJobChainSteps, the collection will be ordered by SequenceNumber.LonggetRestartCount()Get the value for RestartCount.LonggetRestartDelayAmount()Get the value for RestartDelayAmount.TimeUnitgetRestartDelayUnits()Get the value for RestartDelayUnits.booleanisRequestRestartByDefault()Get the value for RequestRestartByDefault.voidsetRequestRestartByDefault(boolean newRequestRestartByDefault)Set the value for RequestRestartByDefault.voidsetRestartCount(Long newRestartCount)Set the value for RestartCount.voidsetRestartDelayAmount(Long newRestartDelayAmount)Set the value for RestartDelayAmount.voidsetRestartDelayUnits(TimeUnit newRestartDelayUnits)Set the value for RestartDelayUnits.- 
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObjectgetBusinessKey
 - 
Methods inherited from interface com.redwood.scheduler.api.model.JobDefinitionRelatedObjectgetJobDefinition, setJobDefinition
 - 
Methods inherited from interface com.redwood.scheduler.api.model.RootgetCreationTime, getLastModificationTime, getLastModifierSubject
 - 
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntitycanPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
 
- 
 
- 
- 
- 
Field Detail- 
OBJECT_TYPEstatic final String OBJECT_TYPE String that will be returned fromSchedulerEntity.getObjectType()for "JobChain" objects.- See Also:
- Constant Field Values
 
 - 
TYPEstatic final QueryObjectType<JobChain> TYPE Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
 - 
SEC_RANK_NONEstatic final String SEC_RANK_NONE This rank has no privileges assigned to it.- See Also:
- Constant Field Values
 
 - 
SEC_RANK_ALLstatic final String SEC_RANK_ALL This rank is made of the following privileges:- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getRestartCountLong getRestartCount() Get the value for RestartCount. (Maximum number of automatic restarts (default for all steps when this field and RestartDelayAmount !=0))- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
isRequestRestartByDefaultboolean isRequestRestartByDefault() Get the value for RequestRestartByDefault. (When true, the chain will act as if its canceled, error, killed and unknown default status handlers are set to request restart)- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getRestartDelayAmountLong getRestartDelayAmount() Get the value for RestartDelayAmount. (Number of 'restart delay time units' after the finish time of the original step to submit the restart at (default for all steps when RestartCount and this field !=0)) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
getRestartDelayUnitsTimeUnit getRestartDelayUnits() Get the value for RestartDelayUnits. (Time units for 'restart delay amount' - seconds, minutes, hours, days. May not be null, defaults to minutes (default for all steps when RestartCount and RestartDelayAmount !=0)) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setRestartCountvoid setRestartCount(Long newRestartCount) Set the value for RestartCount. (Maximum number of automatic restarts (default for all steps when this field and RestartDelayAmount !=0)) This value is optional.- Parameters:
- newRestartCount- the new value for RestartCount.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setRequestRestartByDefaultvoid setRequestRestartByDefault(boolean newRequestRestartByDefault) Set the value for RequestRestartByDefault. (When true, the chain will act as if its canceled, error, killed and unknown default status handlers are set to request restart)- Parameters:
- newRequestRestartByDefault- the new value for RequestRestartByDefault.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setRestartDelayAmountvoid setRestartDelayAmount(Long newRestartDelayAmount) Set the value for RestartDelayAmount. (Number of 'restart delay time units' after the finish time of the original step to submit the restart at (default for all steps when RestartCount and this field !=0)) This value is mandatory.- Parameters:
- newRestartDelayAmount- the new value for RestartDelayAmount. If this is- null, then the object cannot be persisted.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
setRestartDelayUnitsvoid setRestartDelayUnits(TimeUnit newRestartDelayUnits) Set the value for RestartDelayUnits. (Time units for 'restart delay amount' - seconds, minutes, hours, days. May not be null, defaults to minutes (default for all steps when RestartCount and RestartDelayAmount !=0)) This value is mandatory.- Parameters:
- newRestartDelayUnits- the new value for RestartDelayUnits. If this is- null, then the object cannot be persisted.
- Throws:
- com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
 
 - 
fetchAllvoid fetchAll() Fetch all data for the jobchain editor. Note, this method is not generally useful, and is only present to speed up the loading of a chain in the editor.
 - 
getDefaultJobChainStatusHandlersRWIterable<JobChainStatusHandler> getDefaultJobChainStatusHandlers() Get anRWIterableover a collection ofDefaultJobChainStatusHandlers, the collection will be ordered by SequenceNumber. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. A job chain status handler, the defaults for step status handlers.- Specified by:
- getDefaultJobChainStatusHandlersin interface- JobChainComp
- Returns:
- An RWIterableover a collection ofJobChainStatusHandlerobjects , the collection will be ordered by SequenceNumber.
 
 - 
createDefaultJobChainStatusHandlerJobChainStatusHandler createDefaultJobChainStatusHandler() Create a newDefaultJobChainStatusHandlerlinked to this object.- Returns:
- a new DefaultJobChainStatusHandler.
 
 - 
getDefaultJobChainStatusHandlerByStatusJobChainStatusHandler getDefaultJobChainStatusHandlerByStatus(JobStatus status) Get the JobChainStatusHandler by JobChainStatusHandler.- Parameters:
- status-
- Returns:
- the JobChainStatusHandler, or nullif it could not be found
 
 - 
getJobChainStepsRWIterable<JobChainStep> getJobChainSteps() Get anRWIterableover a collection ofJobChainSteps, the collection will be ordered by SequenceNumber. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The steps that make up a job chain.- Specified by:
- getJobChainStepsin interface- JobChainComp
- Returns:
- An RWIterableover a collection ofJobChainStepobjects , the collection will be ordered by SequenceNumber.
 
 - 
createJobChainStepJobChainStep createJobChainStep() Create a newJobChainSteplinked to this object.- Returns:
- a new JobChainStep.
 
 - 
getJobChainStepByNameJobChainStep getJobChainStepByName(String name) Get the JobChainStep by NameJobChain.- Parameters:
- name-
- Returns:
- the JobChainStep, or nullif it could not be found
 
 - 
getJobChainStepBySequenceNumberJobChainStep getJobChainStepBySequenceNumber(Long sequenceNumber) Get the JobChainStep by SequenceNumberJobChain.- Parameters:
- sequenceNumber-
- Returns:
- the JobChainStep, or nullif it could not be found
 
 
- 
 
-