Interface JobManager

  • All Known Implementing Classes:
    DefaultJobManager

    @Internal
    public interface JobManager
    Contains methods that are not tied to any specific job type (async, timer, suspended or deadletter), but which are generally applicable or are about going from one type to another.
    • Method Detail

      • execute

        void execute​(Job job)
        Execute a job, which means that the logic (async logic, timer that fires, etc) is executed, typically by a background thread of an executor.
      • unacquire

        void unacquire​(Job job)
        Unacquires a job, meaning that this job was previously locked, and it is now freed to be acquired by other executor nodes.
      • createAsyncJob

        JobEntity createAsyncJob​(ExecutionEntity execution,
                                 boolean exclusive)
        Creates an async job for the provided ExecutionEntity, so that it can be continued later in a background thread.
      • scheduleAsyncJob

        void scheduleAsyncJob​(JobEntity job)
        Schedules and async job. If the AsyncExecutor is running, it can be executed immediately after the transaction. Otherwise it can be picked up by other executors.
      • createTimerJob

        TimerJobEntity createTimerJob​(org.activiti.bpmn.model.TimerEventDefinition timerEventDefinition,
                                      boolean interrupting,
                                      ExecutionEntity execution,
                                      java.lang.String timerEventType,
                                      java.lang.String jobHandlerConfiguration)
        Creates a TimerJobEntity based on the current ExecutionEntity and the configuration in the TimerEventDefinition.
      • scheduleTimerJob

        void scheduleTimerJob​(TimerJobEntity timerJob)
        Schedules a timer, meaning it will be inserted in the datastore.
      • moveTimerJobToExecutableJob

        JobEntity moveTimerJobToExecutableJob​(TimerJobEntity timerJob)
        Moves a TimerJobEntity to become an async JobEntity. This happens for example when the due date of a timer is reached, the timer entity then becomes a 'regular' async job that can be picked up by the AsyncExecutor.
      • moveDeadLetterJobToExecutableJob

        JobEntity moveDeadLetterJobToExecutableJob​(DeadLetterJobEntity deadLetterJobEntity,
                                                   int retries)
        Transforms a DeadLetterJobEntity to a JobEntity, thus making it executable again. Note that a 'retries' parameter needs to be passed, as the job got into the deadletter table because of it failed and retries became 0.
      • setProcessEngineConfiguration

        void setProcessEngineConfiguration​(ProcessEngineConfigurationImpl processEngineConfiguration)
        The ProcessEngineCongiguration instance will be passed when the ProcessEngine is built.