Class ProcessSetRemovalTimeJobHandler
- java.lang.Object
-
- org.camunda.bpm.engine.impl.batch.AbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
- org.camunda.bpm.engine.impl.batch.removaltime.ProcessSetRemovalTimeJobHandler
-
- All Implemented Interfaces:
BatchJobHandler<SetRemovalTimeBatchConfiguration>
,JobHandler<BatchJobConfiguration>
public class ProcessSetRemovalTimeJobHandler extends AbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description static BatchJobDeclaration
JOB_DECLARATION
-
Constructor Summary
Constructors Constructor Description ProcessSetRemovalTimeJobHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addRemovalTime(java.lang.String instanceId, java.util.Date removalTime, CommandContext commandContext)
protected void
addRemovalTimeToHierarchy(java.lang.String rootProcessInstanceId, java.util.Date removalTime, CommandContext commandContext)
protected java.util.Date
calculateRemovalTime(HistoricProcessInstanceEntity processInstance, CommandContext commandContext)
protected SetRemovalTimeBatchConfiguration
createJobConfiguration(SetRemovalTimeBatchConfiguration configuration, java.util.List<java.lang.String> processInstanceIds)
void
execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, java.lang.String tenantId)
protected ByteArrayEntity
findByteArrayById(java.lang.String byteArrayId, CommandContext commandContext)
protected ProcessDefinition
findProcessDefinitionById(java.lang.String processDefinitionId, CommandContext commandContext)
protected HistoricProcessInstanceEntity
findProcessInstanceById(java.lang.String instanceId, CommandContext commandContext)
protected java.lang.String
getHistoryRemovalTimeStrategy(CommandContext commandContext)
JobDeclaration<BatchJobContext,MessageEntity>
getJobDeclaration()
Get the job declaration for batch jobs.protected JsonObjectConverter<SetRemovalTimeBatchConfiguration>
getJsonConverterInstance()
protected java.util.Date
getOrCalculateRemovalTime(SetRemovalTimeBatchConfiguration batchConfiguration, HistoricProcessInstanceEntity instance, CommandContext commandContext)
java.lang.String
getType()
protected boolean
hasBaseTime(HistoricProcessInstanceEntity instance, CommandContext commandContext)
protected boolean
hasHierarchy(HistoricProcessInstanceEntity instance)
protected boolean
isDmnEnabled(CommandContext commandContext)
protected boolean
isEnded(HistoricProcessInstanceEntity instance)
protected boolean
isStrategyEnd(CommandContext commandContext)
protected boolean
isStrategyStart(CommandContext commandContext)
-
Methods inherited from class org.camunda.bpm.engine.impl.batch.AbstractBatchJobHandler
createBatchJob, createJobEntities, createJobs, deleteJobs, newConfiguration, onDelete, postProcessJob, readConfiguration, sanitizeMappings, saveConfiguration, writeConfiguration
-
-
-
-
Field Detail
-
JOB_DECLARATION
public static final BatchJobDeclaration JOB_DECLARATION
-
-
Method Detail
-
execute
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, java.lang.String tenantId)
-
getOrCalculateRemovalTime
protected java.util.Date getOrCalculateRemovalTime(SetRemovalTimeBatchConfiguration batchConfiguration, HistoricProcessInstanceEntity instance, CommandContext commandContext)
-
addRemovalTimeToHierarchy
protected void addRemovalTimeToHierarchy(java.lang.String rootProcessInstanceId, java.util.Date removalTime, CommandContext commandContext)
-
addRemovalTime
protected void addRemovalTime(java.lang.String instanceId, java.util.Date removalTime, CommandContext commandContext)
-
hasBaseTime
protected boolean hasBaseTime(HistoricProcessInstanceEntity instance, CommandContext commandContext)
-
isEnded
protected boolean isEnded(HistoricProcessInstanceEntity instance)
-
isStrategyStart
protected boolean isStrategyStart(CommandContext commandContext)
-
isStrategyEnd
protected boolean isStrategyEnd(CommandContext commandContext)
-
hasHierarchy
protected boolean hasHierarchy(HistoricProcessInstanceEntity instance)
-
getHistoryRemovalTimeStrategy
protected java.lang.String getHistoryRemovalTimeStrategy(CommandContext commandContext)
-
findProcessDefinitionById
protected ProcessDefinition findProcessDefinitionById(java.lang.String processDefinitionId, CommandContext commandContext)
-
isDmnEnabled
protected boolean isDmnEnabled(CommandContext commandContext)
-
calculateRemovalTime
protected java.util.Date calculateRemovalTime(HistoricProcessInstanceEntity processInstance, CommandContext commandContext)
-
findByteArrayById
protected ByteArrayEntity findByteArrayById(java.lang.String byteArrayId, CommandContext commandContext)
-
findProcessInstanceById
protected HistoricProcessInstanceEntity findProcessInstanceById(java.lang.String instanceId, CommandContext commandContext)
-
getJobDeclaration
public JobDeclaration<BatchJobContext,MessageEntity> getJobDeclaration()
Description copied from interface:BatchJobHandler
Get the job declaration for batch jobs.- Specified by:
getJobDeclaration
in interfaceBatchJobHandler<SetRemovalTimeBatchConfiguration>
- Specified by:
getJobDeclaration
in classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
- Returns:
- the batch job declaration
-
createJobConfiguration
protected SetRemovalTimeBatchConfiguration createJobConfiguration(SetRemovalTimeBatchConfiguration configuration, java.util.List<java.lang.String> processInstanceIds)
- Specified by:
createJobConfiguration
in classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
getJsonConverterInstance
protected JsonObjectConverter<SetRemovalTimeBatchConfiguration> getJsonConverterInstance()
- Specified by:
getJsonConverterInstance
in classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
getType
public java.lang.String getType()
-
-