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 Details

    • 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, String timerEventType, 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.
    • moveJobToTimerJob

      TimerJobEntity moveJobToTimerJob(AbstractJobEntity job)
      Moves an AbstractJobEntity to become a TimerJobEntity. This happens for example when an async job is executed and fails. It then becomes a timer, as it needs to be retried later.
    • moveJobToSuspendedJob

      SuspendedJobEntity moveJobToSuspendedJob(AbstractJobEntity job)
      Moves an AbstractJobEntity to become a SuspendedJobEntity, such that the AsyncExecutor won't pick it up anymore for execution.
    • activateSuspendedJob

      AbstractJobEntity activateSuspendedJob(SuspendedJobEntity job)
      Transforms a SuspendedJobEntity back to an AbstractJobEntity (i.e. to what it was originally). The job will now again be able to picked up by the AsyncExecutor.
    • moveJobToDeadLetterJob

      DeadLetterJobEntity moveJobToDeadLetterJob(AbstractJobEntity job)
      Transforms an AbstractJobEntity to a DeadLetterJobEntity. This means that the job has been tried a configurable amount of times, but kept failing.
    • 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.