Package com.flowable.agent.engine.impl
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
commandExecutorFields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbulkMoveDeadLetterJobs(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.DeadLetterJobQueryReturns a new DeadLetterJobQuery implementation, that can be used to query the dead letter jobs.org.flowable.job.api.JobQueryReturns a new JobQuery implementation, that can be used to query the jobs.org.flowable.job.api.TimerJobQueryReturns a new TimerJobQuery implementation, that can be used to query the timer jobs.voiddeleteDeadLetterJob(String jobId) Delete the dead letter job with the provided id.voidDelete the job with the provided id.voiddeleteTimerJob(String jobId) Delete the timer job with the provided id.voidexecuteJob(String jobId) 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.getJobExceptionStacktrace(String jobId) 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.JobmoveDeadLetterJobToExecutableJob(String jobId, int retries) 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.JobmoveJobToDeadLetterJob(String jobId) Moves a job to the dead letter job table (eg. for administration or testing).org.flowable.job.api.JobmoveTimerToExecutableJob(String jobId) Moves a timer job to the executable job table (eg. for administration or testing).org.flowable.job.api.JobrescheduleTimeDateJob(String jobId, Date timeDate) Reschedule a timer job with a new date value.org.flowable.job.api.JobrescheduleTimeDateValueJob(String jobId, String timeDateValue) Reschedule a timer job with a time date value.voidsetJobRetries(String jobId, int retries) Sets the number of retries that a job has left.voidsetTimerJobRetries(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, setCommandExecutorMethods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
Constructor Details
-
AgentManagementServiceImpl
-
-
Method Details
-
createJobQuery
public org.flowable.job.api.JobQuery createJobQuery()Description copied from interface:AgentManagementServiceReturns a new JobQuery implementation, that can be used to query the jobs.- Specified by:
createJobQueryin interfaceAgentManagementService
-
createTimerJobQuery
public org.flowable.job.api.TimerJobQuery createTimerJobQuery()Description copied from interface:AgentManagementServiceReturns a new TimerJobQuery implementation, that can be used to query the timer jobs.- Specified by:
createTimerJobQueryin interfaceAgentManagementService
-
createDeadLetterJobQuery
public org.flowable.job.api.DeadLetterJobQuery createDeadLetterJobQuery()Description copied from interface:AgentManagementServiceReturns a new DeadLetterJobQuery implementation, that can be used to query the dead letter jobs.- Specified by:
createDeadLetterJobQueryin interfaceAgentManagementService
-
executeJob
Description copied from interface:AgentManagementServiceForced synchronous execution of a job (eg. for administration or testing). The job will be executed, even if the case instance is suspended.- Specified by:
executeJobin interfaceAgentManagementService- Parameters:
jobId- id of the job to execute, cannot be null.
-
moveTimerToExecutableJob
Description copied from interface:AgentManagementServiceMoves 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:
moveTimerToExecutableJobin interfaceAgentManagementService- Parameters:
jobId- id of the timer job to move, cannot be null.
-
moveJobToDeadLetterJob
Description copied from interface:AgentManagementServiceMoves 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:
moveJobToDeadLetterJobin interfaceAgentManagementService- Parameters:
jobId- id of the job to move, cannot be null.
-
bulkMoveDeadLetterJobs
Description copied from interface:AgentManagementServiceMoves 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:
bulkMoveDeadLetterJobsin interfaceAgentManagementService- 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
Description copied from interface:AgentManagementServiceMoves 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:
moveDeadLetterJobToExecutableJobin interfaceAgentManagementService- 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
Description copied from interface:AgentManagementServiceDelete the job with the provided id.- Specified by:
deleteJobin interfaceAgentManagementService- Parameters:
jobId- id of the job to delete, cannot be null.
-
deleteTimerJob
Description copied from interface:AgentManagementServiceDelete the timer job with the provided id.- Specified by:
deleteTimerJobin interfaceAgentManagementService- Parameters:
jobId- id of the timer job to delete, cannot be null.
-
deleteDeadLetterJob
Description copied from interface:AgentManagementServiceDelete the dead letter job with the provided id.- Specified by:
deleteDeadLetterJobin interfaceAgentManagementService- Parameters:
jobId- id of the dead letter job to delete, cannot be null.
-
setJobRetries
Description copied from interface:AgentManagementServiceSets 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:
setJobRetriesin interfaceAgentManagementService- Parameters:
jobId- id of the job to modify, cannot be null.retries- number of retries.
-
setTimerJobRetries
Description copied from interface:AgentManagementServiceSets 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:
setTimerJobRetriesin interfaceAgentManagementService- Parameters:
jobId- id of the timer job to modify, cannot be null.retries- number of retries.
-
rescheduleTimeDateJob
Description copied from interface:AgentManagementServiceReschedule a timer job with a new date value.- Specified by:
rescheduleTimeDateJobin interfaceAgentManagementService- Parameters:
jobId- id of the timer job to reschedule, cannot be null.timeDate- A fixed date
-
rescheduleTimeDateValueJob
Description copied from interface:AgentManagementServiceReschedule a timer job with a time date value.- Specified by:
rescheduleTimeDateValueJobin interfaceAgentManagementService- 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
Description copied from interface:AgentManagementServiceReturns 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:
getJobExceptionStacktracein interfaceAgentManagementService- Parameters:
jobId- id of the job, cannot be null.
-
getTimerJobExceptionStacktrace
Description copied from interface:AgentManagementServiceReturns 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:
getTimerJobExceptionStacktracein interfaceAgentManagementService- Parameters:
jobId- id of the job, cannot be null.
-
getDeadLetterJobExceptionStacktrace
Description copied from interface:AgentManagementServiceReturns 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:
getDeadLetterJobExceptionStacktracein interfaceAgentManagementService- Parameters:
jobId- id of the job, cannot be null.
-