Package org.camunda.bpm.engine.batch
Interface Batch
-
- All Known Subinterfaces:
BatchStatistics
- All Known Implementing Classes:
BatchEntity
,BatchStatisticsEntity
public interface Batch
A batch represents a number of jobs which execute a number of commands asynchronously.
Batches have three types of jobs:
- Seed jobs: Create execution jobs
- Execution jobs: Execute the actual action
- Monitor jobs: Manage the batch once all execution jobs have been created (e.g. responsible for deletion of the Batch after completion).
All three job types have independent job definitions. They can be controlled individually (e.g. suspension) and are independently represented in the historic job log.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TYPE_BATCH_SET_REMOVAL_TIME
static java.lang.String
TYPE_CORRELATE_MESSAGE
static java.lang.String
TYPE_DECISION_SET_REMOVAL_TIME
static java.lang.String
TYPE_HISTORIC_DECISION_INSTANCE_DELETION
static java.lang.String
TYPE_HISTORIC_PROCESS_INSTANCE_DELETION
static java.lang.String
TYPE_PROCESS_INSTANCE_DELETION
static java.lang.String
TYPE_PROCESS_INSTANCE_MIGRATION
static java.lang.String
TYPE_PROCESS_INSTANCE_MODIFICATION
static java.lang.String
TYPE_PROCESS_INSTANCE_RESTART
static java.lang.String
TYPE_PROCESS_INSTANCE_UPDATE_SUSPENSION_STATE
static java.lang.String
TYPE_PROCESS_SET_REMOVAL_TIME
static java.lang.String
TYPE_SET_EXTERNAL_TASK_RETRIES
static java.lang.String
TYPE_SET_JOB_RETRIES
static java.lang.String
TYPE_SET_VARIABLES
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getBatchJobDefinitionId()
int
getBatchJobsPerSeed()
java.lang.String
getCreateUserId()
java.lang.String
getId()
int
getInvocationsPerBatchJob()
int
getJobsCreated()
java.lang.String
getMonitorJobDefinitionId()
java.lang.String
getSeedJobDefinitionId()
java.lang.String
getTenantId()
int
getTotalJobs()
java.lang.String
getType()
boolean
isSuspended()
Indicates whether this batch is suspended.
-
-
-
Field Detail
-
TYPE_PROCESS_INSTANCE_MIGRATION
static final java.lang.String TYPE_PROCESS_INSTANCE_MIGRATION
- See Also:
- Constant Field Values
-
TYPE_PROCESS_INSTANCE_MODIFICATION
static final java.lang.String TYPE_PROCESS_INSTANCE_MODIFICATION
- See Also:
- Constant Field Values
-
TYPE_PROCESS_INSTANCE_RESTART
static final java.lang.String TYPE_PROCESS_INSTANCE_RESTART
- See Also:
- Constant Field Values
-
TYPE_PROCESS_INSTANCE_DELETION
static final java.lang.String TYPE_PROCESS_INSTANCE_DELETION
- See Also:
- Constant Field Values
-
TYPE_PROCESS_INSTANCE_UPDATE_SUSPENSION_STATE
static final java.lang.String TYPE_PROCESS_INSTANCE_UPDATE_SUSPENSION_STATE
- See Also:
- Constant Field Values
-
TYPE_HISTORIC_PROCESS_INSTANCE_DELETION
static final java.lang.String TYPE_HISTORIC_PROCESS_INSTANCE_DELETION
- See Also:
- Constant Field Values
-
TYPE_HISTORIC_DECISION_INSTANCE_DELETION
static final java.lang.String TYPE_HISTORIC_DECISION_INSTANCE_DELETION
- See Also:
- Constant Field Values
-
TYPE_SET_JOB_RETRIES
static final java.lang.String TYPE_SET_JOB_RETRIES
- See Also:
- Constant Field Values
-
TYPE_SET_EXTERNAL_TASK_RETRIES
static final java.lang.String TYPE_SET_EXTERNAL_TASK_RETRIES
- See Also:
- Constant Field Values
-
TYPE_PROCESS_SET_REMOVAL_TIME
static final java.lang.String TYPE_PROCESS_SET_REMOVAL_TIME
- See Also:
- Constant Field Values
-
TYPE_DECISION_SET_REMOVAL_TIME
static final java.lang.String TYPE_DECISION_SET_REMOVAL_TIME
- See Also:
- Constant Field Values
-
TYPE_BATCH_SET_REMOVAL_TIME
static final java.lang.String TYPE_BATCH_SET_REMOVAL_TIME
- See Also:
- Constant Field Values
-
TYPE_SET_VARIABLES
static final java.lang.String TYPE_SET_VARIABLES
- See Also:
- Constant Field Values
-
TYPE_CORRELATE_MESSAGE
static final java.lang.String TYPE_CORRELATE_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
java.lang.String getId()
- Returns:
- the id of the batch
-
getType
java.lang.String getType()
- Returns:
- the type of the batch
-
getTotalJobs
int getTotalJobs()
- Returns:
- the number of batch execution jobs required to complete the batch
-
getJobsCreated
int getJobsCreated()
- Returns:
- the number of batch execution jobs already created by the seed job
-
getBatchJobsPerSeed
int getBatchJobsPerSeed()
- Returns:
- number of batch jobs created per batch seed job invocation
-
getInvocationsPerBatchJob
int getInvocationsPerBatchJob()
- Returns:
- the number of invocations executed per batch job
-
getSeedJobDefinitionId
java.lang.String getSeedJobDefinitionId()
- Returns:
- the id of the batch seed job definition
-
getMonitorJobDefinitionId
java.lang.String getMonitorJobDefinitionId()
- Returns:
- the id of the batch monitor job definition
-
getBatchJobDefinitionId
java.lang.String getBatchJobDefinitionId()
- Returns:
- the id of the batch job definition
-
getTenantId
java.lang.String getTenantId()
- Returns:
- the batch's tenant id or null
-
getCreateUserId
java.lang.String getCreateUserId()
- Returns:
- the batch creator's user id
-
isSuspended
boolean isSuspended()
Indicates whether this batch is suspended. If a batch is suspended, the batch jobs will not be acquired by the job executor.
Note: It is still possible to manually suspend and activate jobs and job definitions using the
ManagementService
, which will not change the suspension state of the batch.- Returns:
- true if this batch is currently suspended, false otherwise
- See Also:
ManagementService.suspendBatchById(String)
,ManagementService.activateBatchById(String)
-
-