public class CmmnManagementServiceImpl extends CommonEngineServiceImpl<CmmnEngineConfiguration> implements CmmnManagementService
commandExecutorconfiguration| Constructor and Description |
|---|
CmmnManagementServiceImpl(CmmnEngineConfiguration engineConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
CmmnExternalWorkerTransitionBuilder |
createCmmnExternalWorkerTransitionBuilder(String externalJobId,
String workerId)
Create a
CmmnExternalWorkerTransitionBuilder that can be used to transition the status of the external worker job. |
DeadLetterJobQuery |
createDeadLetterJobQuery()
Returns a new DeadLetterJobQuery implementation, that can be used to query the dead letter jobs.
|
ExternalWorkerJobAcquireBuilder |
createExternalWorkerJobAcquireBuilder()
Create an
ExternalWorkerJobAcquireBuilder that can be used to acquire jobs for an external worker. |
ExternalWorkerJobFailureBuilder |
createExternalWorkerJobFailureBuilder(String externalJobId,
String workerId)
Create an
ExternalWorkerJobFailureBuilder that can be used to fail an external worker job. |
ExternalWorkerJobQuery |
createExternalWorkerJobQuery()
Returns a new ExternalWorkerJobQuery implementation, that can be used to dynamically query the external worker jobs.
|
HistoryJobQuery |
createHistoryJobQuery()
Returns a new HistoryJobQuery implementation, that can be used to dynamically query the history jobs.
|
JobQuery |
createJobQuery()
Returns a new JobQuery implementation, that can be used to query the jobs.
|
SuspendedJobQuery |
createSuspendedJobQuery()
Returns a new SuspendedJobQuery implementation, that can be used to query the suspended jobs.
|
TimerJobQuery |
createTimerJobQuery()
Returns a new TimerJobQuery implementation, that can be used to query the timer jobs.
|
void |
deleteDeadLetterJob(String jobId)
Delete the dead letter job with the provided id.
|
void |
deleteHistoryJob(String jobId)
Delete the history job with the provided id.
|
void |
deleteJob(String jobId)
Delete the job with the provided id.
|
void |
deleteSuspendedJob(String jobId)
Delete the suspended job with the provided id.
|
void |
deleteTimerJob(String jobId)
Delete the timer job with the provided id.
|
<T> T |
executeCommand(Command<T> command) |
<T> T |
executeCommand(CommandConfig config,
Command<T> command) |
void |
executeHistoryJob(String historyJobId)
Forced synchronous execution of a historyJob (eg.
|
void |
executeJob(String jobId)
Forced synchronous execution of a job (eg.
|
String |
getDeadLetterJobExceptionStacktrace(String jobId)
Returns the full stacktrace of the exception that occurs when the deadletter job with the given id was last executed.
|
String |
getExternalWorkerJobErrorDetails(String jobId)
Returns the full error details that were passed to the External worker
Job when the job was last failed. |
String |
getHistoryJobHistoryJson(String historyJobId)
Get the advanced configuration (storing the history json data) of a
HistoryJob. |
String |
getJobExceptionStacktrace(String jobId)
Returns the full stacktrace of the exception that occurs when the job with the given id was last executed.
|
String |
getSuspendedJobExceptionStacktrace(String jobId)
Returns the full stacktrace of the exception that occurs when the suspended with the given id was last executed.
|
Map<String,Long> |
getTableCounts()
Returns a map containing {tableName, rowCount} values.
|
Collection<String> |
getTableNames()
Returns all relational database tables of the engine.
|
String |
getTimerJobExceptionStacktrace(String jobId)
Returns the full stacktrace of the exception that occurs when the timer job with the given id was last executed.
|
void |
handleHistoryCleanupTimerJob() |
Job |
moveDeadLetterJobToExecutableJob(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).
|
HistoryJob |
moveDeadLetterJobToHistoryJob(String jobId,
int retries)
Moves a job that is in the dead letter job table back to be a history job,
and resetting the retries (as the retries was 0 when it was put into the dead letter job table).
|
Job |
moveJobToDeadLetterJob(String jobId)
Moves a job to the dead letter job table (eg.
|
Job |
moveSuspendedJobToExecutableJob(String jobId)
Moves a suspended job from the suspended letter job table back to be an executable job.
|
Job |
moveTimerToExecutableJob(String jobId)
Moves a timer job to the executable job table (eg.
|
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.
|
getCommandExecutor, setCommandExecutorgetConfigurationpublic CmmnManagementServiceImpl(CmmnEngineConfiguration engineConfiguration)
public Map<String,Long> getTableCounts()
CmmnManagementServicegetTableCounts in interface CmmnManagementServicepublic Collection<String> getTableNames()
CmmnManagementServicegetTableNames in interface CmmnManagementServicepublic void executeJob(String jobId)
CmmnManagementServiceexecuteJob in interface CmmnManagementServicejobId - id of the job to execute, cannot be null.public void executeHistoryJob(String historyJobId)
CmmnManagementServiceexecuteHistoryJob in interface CmmnManagementServicehistoryJobId - id of the historyjob to execute, cannot be null.public String getHistoryJobHistoryJson(String historyJobId)
CmmnManagementServiceHistoryJob.getHistoryJobHistoryJson in interface CmmnManagementServicehistoryJobId - id of the history job to execute, cannot be null.public void deleteHistoryJob(String jobId)
CmmnManagementServicedeleteHistoryJob in interface CmmnManagementServicejobId - id of the history job to delete, cannot be null.public Job moveTimerToExecutableJob(String jobId)
CmmnManagementServicemoveTimerToExecutableJob in interface CmmnManagementServicejobId - id of the timer job to move, cannot be null.public Job moveJobToDeadLetterJob(String jobId)
CmmnManagementServicemoveJobToDeadLetterJob in interface CmmnManagementServicejobId - id of the job to move, cannot be null.public Job moveDeadLetterJobToExecutableJob(String jobId, int retries)
CmmnManagementServicemoveDeadLetterJobToExecutableJob in interface CmmnManagementServicejobId - 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.public HistoryJob moveDeadLetterJobToHistoryJob(String jobId, int retries)
CmmnManagementServicemoveDeadLetterJobToHistoryJob in interface CmmnManagementServicejobId - 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.public Job moveSuspendedJobToExecutableJob(String jobId)
CmmnManagementServicemoveSuspendedJobToExecutableJob in interface CmmnManagementServicejobId - id of the job to move, cannot be null.public void deleteJob(String jobId)
CmmnManagementServicedeleteJob in interface CmmnManagementServicejobId - id of the job to delete, cannot be null.public void deleteTimerJob(String jobId)
CmmnManagementServicedeleteTimerJob in interface CmmnManagementServicejobId - id of the timer job to delete, cannot be null.public void deleteSuspendedJob(String jobId)
CmmnManagementServicedeleteSuspendedJob in interface CmmnManagementServicejobId - id of the suspended job to delete, cannot be null.public void deleteDeadLetterJob(String jobId)
CmmnManagementServicedeleteDeadLetterJob in interface CmmnManagementServicejobId - id of the dead letter job to delete, cannot be null.public void setJobRetries(String jobId, int retries)
CmmnManagementServicesetJobRetries in interface CmmnManagementServicejobId - id of the job to modify, cannot be null.retries - number of retries.public void setTimerJobRetries(String jobId, int retries)
CmmnManagementServicesetTimerJobRetries in interface CmmnManagementServicejobId - id of the timer job to modify, cannot be null.retries - number of retries.public JobQuery createJobQuery()
CmmnManagementServicecreateJobQuery in interface CmmnManagementServicepublic ExternalWorkerJobQuery createExternalWorkerJobQuery()
CmmnManagementServicecreateExternalWorkerJobQuery in interface CmmnManagementServicepublic TimerJobQuery createTimerJobQuery()
CmmnManagementServicecreateTimerJobQuery in interface CmmnManagementServicepublic SuspendedJobQuery createSuspendedJobQuery()
CmmnManagementServicecreateSuspendedJobQuery in interface CmmnManagementServicepublic DeadLetterJobQuery createDeadLetterJobQuery()
CmmnManagementServicecreateDeadLetterJobQuery in interface CmmnManagementServicepublic String getJobExceptionStacktrace(String jobId)
CmmnManagementServicegetJobExceptionStacktrace in interface CmmnManagementServicejobId - id of the job, cannot be null.public String getTimerJobExceptionStacktrace(String jobId)
CmmnManagementServicegetTimerJobExceptionStacktrace in interface CmmnManagementServicejobId - id of the job, cannot be null.public String getSuspendedJobExceptionStacktrace(String jobId)
CmmnManagementServicegetSuspendedJobExceptionStacktrace in interface CmmnManagementServicejobId - id of the job, cannot be null.public String getDeadLetterJobExceptionStacktrace(String jobId)
CmmnManagementServicegetDeadLetterJobExceptionStacktrace in interface CmmnManagementServicejobId - id of the job, cannot be null.public String getExternalWorkerJobErrorDetails(String jobId)
CmmnManagementServiceJob when the job was last failed.
Returns null when the job has no error details.getExternalWorkerJobErrorDetails in interface CmmnManagementServicejobId - id of the job, cannot be null.public void handleHistoryCleanupTimerJob()
handleHistoryCleanupTimerJob in interface CmmnManagementServicepublic HistoryJobQuery createHistoryJobQuery()
CmmnManagementServicecreateHistoryJobQuery in interface CmmnManagementServicepublic ExternalWorkerJobAcquireBuilder createExternalWorkerJobAcquireBuilder()
CmmnManagementServiceExternalWorkerJobAcquireBuilder that can be used to acquire jobs for an external worker.createExternalWorkerJobAcquireBuilder in interface CmmnManagementServicepublic ExternalWorkerJobFailureBuilder createExternalWorkerJobFailureBuilder(String externalJobId, String workerId)
CmmnManagementServiceExternalWorkerJobFailureBuilder that can be used to fail an external worker job.createExternalWorkerJobFailureBuilder in interface CmmnManagementServiceexternalJobId - the id of the external worker jobworkerId - the id of the worker doing the actionpublic CmmnExternalWorkerTransitionBuilder createCmmnExternalWorkerTransitionBuilder(String externalJobId, String workerId)
CmmnManagementServiceCmmnExternalWorkerTransitionBuilder that can be used to transition the status of the external worker job.createCmmnExternalWorkerTransitionBuilder in interface CmmnManagementServicepublic <T> T executeCommand(Command<T> command)
public <T> T executeCommand(CommandConfig config, Command<T> command)
Copyright © 2023 Flowable. All rights reserved.