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 Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "JobChain" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static QueryObjectType<JobChain>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
COPYRIGHT_MESSAGE_BKO, ID_BKO
-
Fields inherited from interface com.redwood.scheduler.api.model.Readable
COPYRIGHT_MESSAGE_E, ID_E
-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JobChainStatusHandler
createDefaultJobChainStatusHandler()
Create a newDefaultJobChainStatusHandler
linked to this object.JobChainStep
createJobChainStep()
Create a newJobChainStep
linked to this object.void
fetchAll()
Fetch all data for the jobchainJobChainStatusHandler
getDefaultJobChainStatusHandlerByStatus(JobStatus status)
Get the JobChainStatusHandler by JobChainStatusHandler.RWIterable<JobChainStatusHandler>
getDefaultJobChainStatusHandlers()
Get anRWIterable
over a collection ofDefaultJobChainStatusHandlers
, the collection will be ordered by SequenceNumber.JobChainStep
getJobChainStepByName(String name)
Get the JobChainStep by NameJobChain.JobChainStep
getJobChainStepBySequenceNumber(Long sequenceNumber)
Get the JobChainStep by SequenceNumberJobChain.RWIterable<JobChainStep>
getJobChainSteps()
Get anRWIterable
over a collection ofJobChainSteps
, the collection will be ordered by SequenceNumber.Long
getRestartCount()
Get the value for RestartCount.Long
getRestartDelayAmount()
Get the value for RestartDelayAmount.TimeUnit
getRestartDelayUnits()
Get the value for RestartDelayUnits.boolean
isRequestRestartByDefault()
Get the value for RequestRestartByDefault.void
setRequestRestartByDefault(boolean newRequestRestartByDefault)
Set the value for RequestRestartByDefault.void
setRestartCount(Long newRestartCount)
Set the value for RestartCount.void
setRestartDelayAmount(Long newRestartDelayAmount)
Set the value for RestartDelayAmount.void
setRestartDelayUnits(TimeUnit newRestartDelayUnits)
Set the value for RestartDelayUnits.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.JobDefinitionRelatedObject
getJobDefinition, setJobDefinition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, 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_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "JobChain" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<JobChain> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getRestartCount
Long 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:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isRequestRestartByDefault
boolean 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:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRestartDelayAmount
Long 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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRestartDelayUnits
TimeUnit 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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRestartCount
void 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:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRequestRestartByDefault
void 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:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRestartDelayAmount
void 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 isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRestartDelayUnits
void 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 isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
fetchAll
void fetchAll()
Fetch all data for the jobchain
-
getDefaultJobChainStatusHandlers
RWIterable<JobChainStatusHandler> getDefaultJobChainStatusHandlers()
Get anRWIterable
over 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:
getDefaultJobChainStatusHandlers
in interfaceJobChainComp
- Returns:
- An
RWIterable
over a collection ofJobChainStatusHandler
objects , the collection will be ordered by SequenceNumber.
-
createDefaultJobChainStatusHandler
JobChainStatusHandler createDefaultJobChainStatusHandler()
Create a newDefaultJobChainStatusHandler
linked to this object.- Returns:
- a new
DefaultJobChainStatusHandler
.
-
getDefaultJobChainStatusHandlerByStatus
JobChainStatusHandler getDefaultJobChainStatusHandlerByStatus(JobStatus status)
Get the JobChainStatusHandler by JobChainStatusHandler.- Parameters:
status
-- Returns:
- the JobChainStatusHandler, or
null
if it could not be found
-
getJobChainSteps
RWIterable<JobChainStep> getJobChainSteps()
Get anRWIterable
over 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:
getJobChainSteps
in interfaceJobChainComp
- Returns:
- An
RWIterable
over a collection ofJobChainStep
objects , the collection will be ordered by SequenceNumber.
-
createJobChainStep
JobChainStep createJobChainStep()
Create a newJobChainStep
linked to this object.- Returns:
- a new
JobChainStep
.
-
getJobChainStepByName
JobChainStep getJobChainStepByName(String name)
Get the JobChainStep by NameJobChain.- Parameters:
name
-- Returns:
- the JobChainStep, or
null
if it could not be found
-
getJobChainStepBySequenceNumber
JobChainStep getJobChainStepBySequenceNumber(Long sequenceNumber)
Get the JobChainStep by SequenceNumberJobChain.- Parameters:
sequenceNumber
-- Returns:
- the JobChainStep, or
null
if it could not be found
-
-