Class AgentManagementServiceImpl

java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<AgentEngineConfiguration>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<AgentEngineConfiguration>
com.flowable.agent.engine.impl.AgentManagementServiceImpl
All Implemented Interfaces:
AgentManagementService

public class AgentManagementServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<AgentEngineConfiguration> implements AgentManagementService
  • Field Summary

    Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl

    commandExecutor

    Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl

    configuration
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bulkMoveDeadLetterJobs(Collection<String> jobIds, int retries)
    Moves a bulk of jobs that are in the dead letter job table back to the executable job table, and resets the retries (as the retries was 0 when it was put into the dead letter job table).
    org.flowable.job.api.DeadLetterJobQuery
    Returns a new DeadLetterJobQuery implementation, that can be used to query the dead letter jobs.
    org.flowable.job.api.JobQuery
    Returns a new JobQuery implementation, that can be used to query the jobs.
    org.flowable.job.api.TimerJobQuery
    Returns a new TimerJobQuery implementation, that can be used to query the timer jobs.
    void
    Delete the dead letter job with the provided id.
    void
    Delete the job with the provided id.
    void
    Delete the timer job with the provided id.
    void
    Forced synchronous execution of a job (eg. for administration or testing).
    Returns the full stacktrace of the exception that occurs when the deadletter job with the given id was last executed.
    Returns the full stacktrace of the exception that occurs when the job with the given id was last executed.
    Returns the full stacktrace of the exception that occurs when the timer job with the given id was last executed.
    org.flowable.job.api.Job
    Moves a job that is in the dead letter job table back to be an executable job, and resetting the retries (as the retries were probably 0 when it was put into the dead letter job table).
    org.flowable.job.api.Job
    Moves a job to the dead letter job table (eg. for administration or testing).
    org.flowable.job.api.Job
    Moves a timer job to the executable job table (eg. for administration or testing).
    org.flowable.job.api.Job
    rescheduleTimeDateJob(String jobId, Date timeDate)
    Reschedule a timer job with a new date value.
    org.flowable.job.api.Job
    rescheduleTimeDateValueJob(String jobId, String timeDateValue)
    Reschedule a timer job with a time date value.
    void
    setJobRetries(String jobId, int retries)
    Sets the number of retries that a job has left.
    void
    setTimerJobRetries(String jobId, int retries)
    Sets the number of retries that a timer job has left.

    Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl

    getCommandExecutor, setCommandExecutor

    Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl

    getConfiguration

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createJobQuery

      public org.flowable.job.api.JobQuery createJobQuery()
      Description copied from interface: AgentManagementService
      Returns a new JobQuery implementation, that can be used to query the jobs.
      Specified by:
      createJobQuery in interface AgentManagementService
    • createTimerJobQuery

      public org.flowable.job.api.TimerJobQuery createTimerJobQuery()
      Description copied from interface: AgentManagementService
      Returns a new TimerJobQuery implementation, that can be used to query the timer jobs.
      Specified by:
      createTimerJobQuery in interface AgentManagementService
    • createDeadLetterJobQuery

      public org.flowable.job.api.DeadLetterJobQuery createDeadLetterJobQuery()
      Description copied from interface: AgentManagementService
      Returns a new DeadLetterJobQuery implementation, that can be used to query the dead letter jobs.
      Specified by:
      createDeadLetterJobQuery in interface AgentManagementService
    • executeJob

      public void executeJob(String jobId)
      Description copied from interface: AgentManagementService
      Forced synchronous execution of a job (eg. for administration or testing). The job will be executed, even if the case instance is suspended.
      Specified by:
      executeJob in interface AgentManagementService
      Parameters:
      jobId - id of the job to execute, cannot be null.
    • moveTimerToExecutableJob

      public org.flowable.job.api.Job moveTimerToExecutableJob(String jobId)
      Description copied from interface: AgentManagementService
      Moves a timer job to the executable job table (eg. for administration or testing). The timer job will be moved, even if the case instance is suspended.
      Specified by:
      moveTimerToExecutableJob in interface AgentManagementService
      Parameters:
      jobId - id of the timer job to move, cannot be null.
    • moveJobToDeadLetterJob

      public org.flowable.job.api.Job moveJobToDeadLetterJob(String jobId)
      Description copied from interface: AgentManagementService
      Moves a job to the dead letter job table (eg. for administration or testing). The job will be moved, even if the case instance is suspended or there are retries left.
      Specified by:
      moveJobToDeadLetterJob in interface AgentManagementService
      Parameters:
      jobId - id of the job to move, cannot be null.
    • bulkMoveDeadLetterJobs

      public void bulkMoveDeadLetterJobs(Collection<String> jobIds, int retries)
      Description copied from interface: AgentManagementService
      Moves a bulk of jobs that are in the dead letter job table back to the executable job table, and resets the retries (as the retries was 0 when it was put into the dead letter job table).
      Specified by:
      bulkMoveDeadLetterJobs in interface AgentManagementService
      Parameters:
      jobIds - ids of the jobs to move, cannot be null.
      retries - the number of retries (value greater than 0) which will be set on the jobs.
    • moveDeadLetterJobToExecutableJob

      public org.flowable.job.api.Job moveDeadLetterJobToExecutableJob(String jobId, int retries)
      Description copied from interface: AgentManagementService
      Moves a job that is in the dead letter job table back to be an executable job, and resetting the retries (as the retries were probably 0 when it was put into the dead letter job table).
      Specified by:
      moveDeadLetterJobToExecutableJob in interface AgentManagementService
      Parameters:
      jobId - id of the job to move, cannot be null.
      retries - the number of retries (value greater than 0) which will be set on the job.
    • deleteJob

      public void deleteJob(String jobId)
      Description copied from interface: AgentManagementService
      Delete the job with the provided id.
      Specified by:
      deleteJob in interface AgentManagementService
      Parameters:
      jobId - id of the job to delete, cannot be null.
    • deleteTimerJob

      public void deleteTimerJob(String jobId)
      Description copied from interface: AgentManagementService
      Delete the timer job with the provided id.
      Specified by:
      deleteTimerJob in interface AgentManagementService
      Parameters:
      jobId - id of the timer job to delete, cannot be null.
    • deleteDeadLetterJob

      public void deleteDeadLetterJob(String jobId)
      Description copied from interface: AgentManagementService
      Delete the dead letter job with the provided id.
      Specified by:
      deleteDeadLetterJob in interface AgentManagementService
      Parameters:
      jobId - id of the dead letter job to delete, cannot be null.
    • setJobRetries

      public void setJobRetries(String jobId, int retries)
      Description copied from interface: AgentManagementService
      Sets the number of retries that a job has left. Whenever the JobExecutor fails to execute a job, this value is decremented. When it hits zero, the job is supposed to be dead and not retried again. In that case, this method can be used to increase the number of retries.
      Specified by:
      setJobRetries in interface AgentManagementService
      Parameters:
      jobId - id of the job to modify, cannot be null.
      retries - number of retries.
    • setTimerJobRetries

      public void setTimerJobRetries(String jobId, int retries)
      Description copied from interface: AgentManagementService
      Sets the number of retries that a timer job has left. Whenever the JobExecutor fails to execute a timer job, this value is decremented. When it hits zero, the job is supposed to be dead and not retried again. In that case, this method can be used to increase the number of retries.
      Specified by:
      setTimerJobRetries in interface AgentManagementService
      Parameters:
      jobId - id of the timer job to modify, cannot be null.
      retries - number of retries.
    • rescheduleTimeDateJob

      public org.flowable.job.api.Job rescheduleTimeDateJob(String jobId, Date timeDate)
      Description copied from interface: AgentManagementService
      Reschedule a timer job with a new date value.
      Specified by:
      rescheduleTimeDateJob in interface AgentManagementService
      Parameters:
      jobId - id of the timer job to reschedule, cannot be null.
      timeDate - A fixed date
    • rescheduleTimeDateValueJob

      public org.flowable.job.api.Job rescheduleTimeDateValueJob(String jobId, String timeDateValue)
      Description copied from interface: AgentManagementService
      Reschedule a timer job with a time date value.
      Specified by:
      rescheduleTimeDateValueJob in interface AgentManagementService
      Parameters:
      jobId - id of the timer job to reschedule, cannot be null.
      timeDateValue - A fixed date in ISO 8601 format, when job will be fired
    • getJobExceptionStacktrace

      public String getJobExceptionStacktrace(String jobId)
      Description copied from interface: AgentManagementService
      Returns the full stacktrace of the exception that occurs when the job with the given id was last executed. Returns null when the job has no exception stacktrace.
      Specified by:
      getJobExceptionStacktrace in interface AgentManagementService
      Parameters:
      jobId - id of the job, cannot be null.
    • getTimerJobExceptionStacktrace

      public String getTimerJobExceptionStacktrace(String jobId)
      Description copied from interface: AgentManagementService
      Returns the full stacktrace of the exception that occurs when the timer job with the given id was last executed. Returns null when the job has no exception stacktrace.
      Specified by:
      getTimerJobExceptionStacktrace in interface AgentManagementService
      Parameters:
      jobId - id of the job, cannot be null.
    • getDeadLetterJobExceptionStacktrace

      public String getDeadLetterJobExceptionStacktrace(String jobId)
      Description copied from interface: AgentManagementService
      Returns the full stacktrace of the exception that occurs when the deadletter job with the given id was last executed. Returns null when the job has no exception stacktrace.
      Specified by:
      getDeadLetterJobExceptionStacktrace in interface AgentManagementService
      Parameters:
      jobId - id of the job, cannot be null.