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.
    • 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 be null 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 be null 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 is null, 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 is null, 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
      • 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 an RWIterable over a collection of JobChainSteps, the collection will be ordered by SequenceNumber. If the collection is empty, an empty iterator will be returned, that is, this method will never return null. The steps that make up a job chain.
        Specified by:
        getJobChainSteps in interface JobChainComp
        Returns:
        An RWIterable over a collection of JobChainStep objects , the collection will be ordered by SequenceNumber.
      • 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