Class HistoryServiceImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.ServiceImpl
-
- org.camunda.bpm.engine.impl.HistoryServiceImpl
-
- All Implemented Interfaces:
HistoryService
public class HistoryServiceImpl extends ServiceImpl implements HistoryService
- Author:
- Tom Baeyens, Bernd Ruecker (camunda), Christian Stettler
-
-
Field Summary
-
Fields inherited from class org.camunda.bpm.engine.impl.ServiceImpl
commandExecutor
-
-
Constructor Summary
Constructors Constructor Description HistoryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Job
cleanUpHistoryAsync()
Schedules history cleanup job at batch window start time.Job
cleanUpHistoryAsync(boolean immediatelyDue)
Schedules history cleanup job at batch window start time.void
clearAnnotationForOperationLogById(String operationId)
Clear the annotation for user operation log entries.CleanableHistoricBatchReport
createCleanableHistoricBatchReport()
Creates a new programmatic query to create a cleanable historic batch report.CleanableHistoricCaseInstanceReport
createCleanableHistoricCaseInstanceReport()
Creates a new programmatic query to create a cleanable historic case instance report.CleanableHistoricDecisionInstanceReport
createCleanableHistoricDecisionInstanceReport()
Creates a new programmatic query to create a cleanable historic decision instance report.CleanableHistoricProcessInstanceReport
createCleanableHistoricProcessInstanceReport()
Creates a new programmatic query to create a cleanable historic process instance report.HistoricActivityInstanceQuery
createHistoricActivityInstanceQuery()
Creates a new programmatic query to search forHistoricActivityInstance
s.HistoricActivityStatisticsQuery
createHistoricActivityStatisticsQuery(String processDefinitionId)
Query for the number of historic activity instances aggregated by activities of a single process definition.HistoricBatchQuery
createHistoricBatchQuery()
Creates a query to search forHistoricBatch
instances.HistoricCaseActivityInstanceQuery
createHistoricCaseActivityInstanceQuery()
Creates a new programmatic query to search forHistoricCaseActivityInstance
s.HistoricCaseActivityStatisticsQuery
createHistoricCaseActivityStatisticsQuery(String caseDefinitionId)
Query for the number of historic case activity instances aggregated by case activities of a single case definition.HistoricCaseInstanceQuery
createHistoricCaseInstanceQuery()
Creates a new programmatic query to search forHistoricCaseInstance
s.HistoricDecisionInstanceQuery
createHistoricDecisionInstanceQuery()
Creates a new programmatic query to search forHistoricDecisionInstance
s.HistoricDecisionInstanceStatisticsQuery
createHistoricDecisionInstanceStatisticsQuery(String decisionRequirementsDefinitionId)
Query for the statistics of DRD evaluation.HistoricDetailQuery
createHistoricDetailQuery()
Creates a new programmatic query to search forHistoricDetail
s.HistoricExternalTaskLogQuery
createHistoricExternalTaskLogQuery()
Creates a new programmatic query to search forhistoric external task logs
.HistoricIdentityLinkLogQueryImpl
createHistoricIdentityLinkLogQuery()
Creates a new programmatic query to search forhistoric identity links
.HistoricIncidentQuery
createHistoricIncidentQuery()
Creates a new programmatic query to search forhistoric incidents
.HistoricJobLogQuery
createHistoricJobLogQuery()
Creates a new programmatic query to search forhistoric job logs
.HistoricProcessInstanceQuery
createHistoricProcessInstanceQuery()
Creates a new programmatic query to search forHistoricProcessInstance
s.HistoricProcessInstanceReport
createHistoricProcessInstanceReport()
Creates a new programmatic query to create a historic process instance report.HistoricTaskInstanceQuery
createHistoricTaskInstanceQuery()
Creates a new programmatic query to search forHistoricTaskInstance
s.HistoricTaskInstanceReport
createHistoricTaskInstanceReport()
Creates a new programmatic query to create a historic task instance report.HistoricVariableInstanceQuery
createHistoricVariableInstanceQuery()
Creates a new programmatic query to search forHistoricVariableInstance
s.NativeHistoricActivityInstanceQuery
createNativeHistoricActivityInstanceQuery()
creates a native query to search forHistoricActivityInstance
s via SQLNativeHistoricCaseActivityInstanceQuery
createNativeHistoricCaseActivityInstanceQuery()
creates a native query to search forHistoricCaseActivityInstance
s via SQLNativeHistoricCaseInstanceQuery
createNativeHistoricCaseInstanceQuery()
creates a native query to search forHistoricCaseInstance
s via SQLNativeHistoricDecisionInstanceQuery
createNativeHistoricDecisionInstanceQuery()
creates a native query to search forHistoricDecisionInstance
s via SQLNativeHistoricProcessInstanceQuery
createNativeHistoricProcessInstanceQuery()
creates a native query to search forHistoricProcessInstance
s via SQLNativeHistoricTaskInstanceQuery
createNativeHistoricTaskInstanceQuery()
creates a native query to search forHistoricTaskInstance
s via SQLNativeHistoricVariableInstanceQuery
createNativeHistoricVariableInstanceQuery()
creates a native query to search forHistoricVariableInstance
s via SQLUserOperationLogQuery
createUserOperationLogQuery()
Creates a new programmatic query to search forUserOperationLogEntry
instances.void
deleteHistoricBatch(String batchId)
Deletes a historic batch instance.void
deleteHistoricCaseInstance(String caseInstanceId)
Deletes historic case instance.void
deleteHistoricCaseInstancesBulk(List<String> caseInstanceIds)
Deletes historic case instances and all related historic data in bulk manner.void
deleteHistoricDecisionInstance(String decisionDefinitionId)
Deletes historic decision instances of a decision definition.void
deleteHistoricDecisionInstanceByDefinitionId(String decisionDefinitionId)
Deletes historic decision instances of a decision definition.void
deleteHistoricDecisionInstanceByInstanceId(String historicDecisionInstanceId)
Deletes historic decision instances by its id.Batch
deleteHistoricDecisionInstancesAsync(List<String> decisionInstanceIds, String deleteReason)
Deletes historic decision instances asynchronously based on a list of decision instances.Batch
deleteHistoricDecisionInstancesAsync(List<String> decisionInstanceIds, HistoricDecisionInstanceQuery query, String deleteReason)
Deletes historic decision instances asynchronously based on query and a list of decision instances, whereby query result and list of ids will be merged.Batch
deleteHistoricDecisionInstancesAsync(HistoricDecisionInstanceQuery query, String deleteReason)
Deletes historic decision instances asynchronously based on query of decision instances.void
deleteHistoricDecisionInstancesBulk(List<String> decisionInstanceIds)
Deletes decision instances and all related historic data in bulk manner.void
deleteHistoricProcessInstance(String processInstanceId)
Deletes historic process instance.void
deleteHistoricProcessInstanceIfExists(String processInstanceId)
Deletes historic process instance.void
deleteHistoricProcessInstances(List<String> processInstanceIds)
Deletes historic process instances.Batch
deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, String deleteReason)
Deletes historic process instances asynchronously.Batch
deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, HistoricProcessInstanceQuery query, String deleteReason)
Deletes historic process instances asynchronously based on query and a list of process instances.Batch
deleteHistoricProcessInstancesAsync(HistoricProcessInstanceQuery query, String deleteReason)
Deletes historic process instances asynchronously based on query.void
deleteHistoricProcessInstancesBulk(List<String> processInstanceIds)
Deletes historic process instances and all related historic data in bulk manner.void
deleteHistoricProcessInstancesIfExists(List<String> processInstanceIds)
Deletes historic process instances.void
deleteHistoricTaskInstance(String taskId)
Deletes historic task instance.void
deleteHistoricVariableInstance(String variableInstanceId)
Deletes a historic variable instance by its id.void
deleteHistoricVariableInstancesByProcessInstanceId(String processInstanceId)
Deletes all historic variables and historic details (variable updates, form properties) of a process instance.void
deleteUserOperationLogEntry(String entryId)
Deletes a user operation log entry.Job
findHistoryCleanupJob()
Finds history cleanup job, if present.List<Job>
findHistoryCleanupJobs()
Finds history cleanup jobs if present.String
getHistoricExternalTaskLogErrorDetails(String historicExternalTaskLogId)
Returns the full error details that occurs when the historic external task log with the given id was last executed.String
getHistoricJobLogExceptionStacktrace(String historicJobLogId)
Returns the full stacktrace of the exception that occurs when the historic job log with the given id was last executed.void
setAnnotationForOperationLogById(String operationId, String annotation)
Set an annotation to user operation log entries.SetRemovalTimeSelectModeForHistoricBatchesBuilder
setRemovalTimeToHistoricBatches()
Set a removal time to historic batches and all associated historic entities using a fluent builder.SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder
setRemovalTimeToHistoricDecisionInstances()
Set a removal time to historic decision instances and all associated historic entities using a fluent builder.SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
setRemovalTimeToHistoricProcessInstances()
Set a removal time to historic process instances and all associated historic entities using a fluent builder.-
Methods inherited from class org.camunda.bpm.engine.impl.ServiceImpl
getCommandExecutor, setCommandExecutor
-
-
-
-
Method Detail
-
createHistoricProcessInstanceQuery
public HistoricProcessInstanceQuery createHistoricProcessInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
HistoricProcessInstance
s.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricProcessInstanceQuery
in interfaceHistoryService
- The user has no
-
createHistoricActivityInstanceQuery
public HistoricActivityInstanceQuery createHistoricActivityInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
HistoricActivityInstance
s.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricActivityInstanceQuery
in interfaceHistoryService
- The user has no
-
createHistoricActivityStatisticsQuery
public HistoricActivityStatisticsQuery createHistoricActivityStatisticsQuery(String processDefinitionId)
Description copied from interface:HistoryService
Query for the number of historic activity instances aggregated by activities of a single process definition.
The result of the query is empty when the user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
- Specified by:
createHistoricActivityStatisticsQuery
in interfaceHistoryService
-
createHistoricCaseActivityStatisticsQuery
public HistoricCaseActivityStatisticsQuery createHistoricCaseActivityStatisticsQuery(String caseDefinitionId)
Description copied from interface:HistoryService
Query for the number of historic case activity instances aggregated by case activities of a single case definition.- Specified by:
createHistoricCaseActivityStatisticsQuery
in interfaceHistoryService
-
createHistoricTaskInstanceQuery
public HistoricTaskInstanceQuery createHistoricTaskInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
HistoricTaskInstance
s.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
) OR - The user has no
HistoricTaskPermissions.READ
permission onResources.HISTORIC_TASK
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricTaskInstanceQuery
in interfaceHistoryService
- The user has no
-
createHistoricDetailQuery
public HistoricDetailQuery createHistoricDetailQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
HistoricDetail
s.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricTaskPermissions.READ
permission onResources.HISTORIC_TASK
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
) OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
) OR - The user has no
ProcessDefinitionPermissions.READ_HISTORY_VARIABLE
permission onResources.PROCESS_DEFINITION
(ProcessEngineConfiguration.enforceSpecificVariablePermission
must be set totrue
) OR - The user has no
HistoricTaskPermissions.READ_VARIABLE
permission onResources.HISTORIC_TASK
(enforceSpecificVariablePermission
andenableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricDetailQuery
in interfaceHistoryService
- The user has no
-
createUserOperationLogQuery
public UserOperationLogQuery createUserOperationLogQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
UserOperationLogEntry
instances.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
) OR - The user has no
HistoricTaskPermissions.READ
permission onResources.HISTORIC_TASK
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createUserOperationLogQuery
in interfaceHistoryService
- The user has no
-
createHistoricVariableInstanceQuery
public HistoricVariableInstanceQuery createHistoricVariableInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
HistoricVariableInstance
s.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricTaskPermissions.READ
permission onResources.HISTORIC_TASK
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
) OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
) OR - The user has no
ProcessDefinitionPermissions.READ_HISTORY_VARIABLE
permission onResources.PROCESS_DEFINITION
(ProcessEngineConfiguration.enforceSpecificVariablePermission
must be set totrue
) OR - The user has no
HistoricTaskPermissions.READ_VARIABLE
permission onResources.HISTORIC_TASK
(enforceSpecificVariablePermission
andenableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricVariableInstanceQuery
in interfaceHistoryService
- The user has no
-
createHistoricIncidentQuery
public HistoricIncidentQuery createHistoricIncidentQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
historic incidents
.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricIncidentQuery
in interfaceHistoryService
- The user has no
-
createHistoricIdentityLinkLogQuery
public HistoricIdentityLinkLogQueryImpl createHistoricIdentityLinkLogQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
historic identity links
.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricTaskPermissions.READ
permission onResources.HISTORIC_TASK
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricIdentityLinkLogQuery
in interfaceHistoryService
- The user has no
-
createHistoricCaseInstanceQuery
public HistoricCaseInstanceQuery createHistoricCaseInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricCaseInstance
s.- Specified by:
createHistoricCaseInstanceQuery
in interfaceHistoryService
-
createHistoricCaseActivityInstanceQuery
public HistoricCaseActivityInstanceQuery createHistoricCaseActivityInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricCaseActivityInstance
s.- Specified by:
createHistoricCaseActivityInstanceQuery
in interfaceHistoryService
-
createHistoricDecisionInstanceQuery
public HistoricDecisionInstanceQuery createHistoricDecisionInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricDecisionInstance
s. If the user has noPermissions.READ_HISTORY
permission onResources.DECISION_DEFINITION
then the result of the query is empty.- Specified by:
createHistoricDecisionInstanceQuery
in interfaceHistoryService
-
deleteHistoricTaskInstance
public void deleteHistoricTaskInstance(String taskId)
Description copied from interface:HistoryService
Deletes historic task instance. This might be useful for tasks that aredynamically created
and thencompleted
. If the historic task instance doesn't exist, no exception is thrown and the method returns normal.- Specified by:
deleteHistoricTaskInstance
in interfaceHistoryService
-
deleteHistoricProcessInstance
public void deleteHistoricProcessInstance(String processInstanceId)
Description copied from interface:HistoryService
Deletes historic process instance. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstance
in interfaceHistoryService
-
deleteHistoricProcessInstanceIfExists
public void deleteHistoricProcessInstanceIfExists(String processInstanceId)
Description copied from interface:HistoryService
Deletes historic process instance. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well. Does not fail if a process instance was not found.- Specified by:
deleteHistoricProcessInstanceIfExists
in interfaceHistoryService
-
deleteHistoricProcessInstances
public void deleteHistoricProcessInstances(List<String> processInstanceIds)
Description copied from interface:HistoryService
Deletes historic process instances. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstances
in interfaceHistoryService
-
deleteHistoricProcessInstancesIfExists
public void deleteHistoricProcessInstancesIfExists(List<String> processInstanceIds)
Description copied from interface:HistoryService
Deletes historic process instances. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well. Does not fail if a process instance was not found.- Specified by:
deleteHistoricProcessInstancesIfExists
in interfaceHistoryService
-
deleteHistoricProcessInstancesBulk
public void deleteHistoricProcessInstancesBulk(List<String> processInstanceIds)
Description copied from interface:HistoryService
Deletes historic process instances and all related historic data in bulk manner. DELETE SQL statement will be created for each entity type. They will have list of given process instance ids in IN clause. Therefore, DB limitation for number of values in IN clause must be taken into account.- Specified by:
deleteHistoricProcessInstancesBulk
in interfaceHistoryService
- Parameters:
processInstanceIds
- list of process instance ids for removal
-
cleanUpHistoryAsync
public Job cleanUpHistoryAsync()
Description copied from interface:HistoryService
Schedules history cleanup job at batch window start time. The job will delete historic data for finished process, decision and case instances, and batch operations taking into accountResourceDefinition.getHistoryTimeToLive()
,DecisionDefinition#getHistoryTimeToLive()
,CaseDefinition#getHistoryTimeToLive()
,ProcessEngineConfigurationImpl.getBatchOperationHistoryTimeToLive()
andProcessEngineConfigurationImpl.getBatchOperationsForHistoryCleanup()
values.- Specified by:
cleanUpHistoryAsync
in interfaceHistoryService
- Returns:
- history cleanup job. NB! As of v. 7.9.0, method does not guarantee to return a job. Use
HistoryService.findHistoryCleanupJobs()
instead.
-
cleanUpHistoryAsync
public Job cleanUpHistoryAsync(boolean immediatelyDue)
Description copied from interface:HistoryService
Schedules history cleanup job at batch window start time. The job will delete historic data for finished process, decision and case instances, and batch operations taking into accountResourceDefinition.getHistoryTimeToLive()
,DecisionDefinition#getHistoryTimeToLive()
,CaseDefinition#getHistoryTimeToLive()
,ProcessEngineConfigurationImpl.getBatchOperationHistoryTimeToLive()
andProcessEngineConfigurationImpl.getBatchOperationsForHistoryCleanup()
values.- Specified by:
cleanUpHistoryAsync
in interfaceHistoryService
- Parameters:
immediatelyDue
- must be true if cleanup must be scheduled at once, otherwise is will be scheduled according to configured batch window- Returns:
- history cleanup job. Job id can be used to check job logs, incident etc.
-
findHistoryCleanupJob
public Job findHistoryCleanupJob()
Description copied from interface:HistoryService
Finds history cleanup job, if present.- Specified by:
findHistoryCleanupJob
in interfaceHistoryService
- Returns:
- history cleanup job entity
-
findHistoryCleanupJobs
public List<Job> findHistoryCleanupJobs()
Description copied from interface:HistoryService
Finds history cleanup jobs if present.- Specified by:
findHistoryCleanupJobs
in interfaceHistoryService
- Returns:
- history cleanup job entities
-
deleteHistoricProcessInstancesAsync
public Batch deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, String deleteReason)
Description copied from interface:HistoryService
Deletes historic process instances asynchronously. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstancesAsync
in interfaceHistoryService
-
deleteHistoricProcessInstancesAsync
public Batch deleteHistoricProcessInstancesAsync(HistoricProcessInstanceQuery query, String deleteReason)
Description copied from interface:HistoryService
Deletes historic process instances asynchronously based on query. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstancesAsync
in interfaceHistoryService
-
deleteHistoricProcessInstancesAsync
public Batch deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, HistoricProcessInstanceQuery query, String deleteReason)
Description copied from interface:HistoryService
Deletes historic process instances asynchronously based on query and a list of process instances. Query result and list of ids will be merged. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstancesAsync
in interfaceHistoryService
-
deleteUserOperationLogEntry
public void deleteUserOperationLogEntry(String entryId)
Description copied from interface:HistoryService
Deletes a user operation log entry. Does not cascade to any related entities.- Specified by:
deleteUserOperationLogEntry
in interfaceHistoryService
-
deleteHistoricCaseInstance
public void deleteHistoricCaseInstance(String caseInstanceId)
Description copied from interface:HistoryService
Deletes historic case instance. All historic case activities, historic task and historic details are deleted as well.- Specified by:
deleteHistoricCaseInstance
in interfaceHistoryService
-
deleteHistoricCaseInstancesBulk
public void deleteHistoricCaseInstancesBulk(List<String> caseInstanceIds)
Description copied from interface:HistoryService
Deletes historic case instances and all related historic data in bulk manner. DELETE SQL statement will be created for each entity type. They will have list of given case instance ids in IN clause. Therefore, DB limitation for number of values in IN clause must be taken into account.- Specified by:
deleteHistoricCaseInstancesBulk
in interfaceHistoryService
- Parameters:
caseInstanceIds
- list of case instance ids for removal
-
deleteHistoricDecisionInstance
public void deleteHistoricDecisionInstance(String decisionDefinitionId)
Description copied from interface:HistoryService
Deletes historic decision instances of a decision definition. All historic decision inputs and outputs are deleted as well.- Specified by:
deleteHistoricDecisionInstance
in interfaceHistoryService
- Parameters:
decisionDefinitionId
- the id of the decision definition
-
deleteHistoricDecisionInstancesBulk
public void deleteHistoricDecisionInstancesBulk(List<String> decisionInstanceIds)
Description copied from interface:HistoryService
Deletes decision instances and all related historic data in bulk manner. DELETE SQL statement will be created for each entity type. They will have list of given decision instance ids in IN clause. Therefore, DB limitation for number of values in IN clause must be taken into account.- Specified by:
deleteHistoricDecisionInstancesBulk
in interfaceHistoryService
- Parameters:
decisionInstanceIds
- list of decision instance ids for removal.
-
deleteHistoricDecisionInstanceByDefinitionId
public void deleteHistoricDecisionInstanceByDefinitionId(String decisionDefinitionId)
Description copied from interface:HistoryService
Deletes historic decision instances of a decision definition. All historic decision inputs and outputs are deleted as well.- Specified by:
deleteHistoricDecisionInstanceByDefinitionId
in interfaceHistoryService
- Parameters:
decisionDefinitionId
- the id of the decision definition
-
deleteHistoricDecisionInstanceByInstanceId
public void deleteHistoricDecisionInstanceByInstanceId(String historicDecisionInstanceId)
Description copied from interface:HistoryService
Deletes historic decision instances by its id. All historic decision inputs and outputs are deleted as well.- Specified by:
deleteHistoricDecisionInstanceByInstanceId
in interfaceHistoryService
- Parameters:
historicDecisionInstanceId
- the id of the historic decision instance
-
deleteHistoricDecisionInstancesAsync
public Batch deleteHistoricDecisionInstancesAsync(List<String> decisionInstanceIds, String deleteReason)
Description copied from interface:HistoryService
Deletes historic decision instances asynchronously based on a list of decision instances.- Specified by:
deleteHistoricDecisionInstancesAsync
in interfaceHistoryService
-
deleteHistoricDecisionInstancesAsync
public Batch deleteHistoricDecisionInstancesAsync(HistoricDecisionInstanceQuery query, String deleteReason)
Description copied from interface:HistoryService
Deletes historic decision instances asynchronously based on query of decision instances.- Specified by:
deleteHistoricDecisionInstancesAsync
in interfaceHistoryService
-
deleteHistoricDecisionInstancesAsync
public Batch deleteHistoricDecisionInstancesAsync(List<String> decisionInstanceIds, HistoricDecisionInstanceQuery query, String deleteReason)
Description copied from interface:HistoryService
Deletes historic decision instances asynchronously based on query and a list of decision instances, whereby query result and list of ids will be merged.- Specified by:
deleteHistoricDecisionInstancesAsync
in interfaceHistoryService
-
deleteHistoricVariableInstance
public void deleteHistoricVariableInstance(String variableInstanceId)
Description copied from interface:HistoryService
Deletes a historic variable instance by its id. All related historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricVariableInstance
in interfaceHistoryService
- Parameters:
variableInstanceId
- the id of the variable instance
-
deleteHistoricVariableInstancesByProcessInstanceId
public void deleteHistoricVariableInstancesByProcessInstanceId(String processInstanceId)
Description copied from interface:HistoryService
Deletes all historic variables and historic details (variable updates, form properties) of a process instance.- Specified by:
deleteHistoricVariableInstancesByProcessInstanceId
in interfaceHistoryService
- Parameters:
processInstanceId
- the id of the process instance
-
createNativeHistoricProcessInstanceQuery
public NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricProcessInstance
s via SQL- Specified by:
createNativeHistoricProcessInstanceQuery
in interfaceHistoryService
-
createNativeHistoricTaskInstanceQuery
public NativeHistoricTaskInstanceQuery createNativeHistoricTaskInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricTaskInstance
s via SQL- Specified by:
createNativeHistoricTaskInstanceQuery
in interfaceHistoryService
-
createNativeHistoricActivityInstanceQuery
public NativeHistoricActivityInstanceQuery createNativeHistoricActivityInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricActivityInstance
s via SQL- Specified by:
createNativeHistoricActivityInstanceQuery
in interfaceHistoryService
-
createNativeHistoricCaseInstanceQuery
public NativeHistoricCaseInstanceQuery createNativeHistoricCaseInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricCaseInstance
s via SQL- Specified by:
createNativeHistoricCaseInstanceQuery
in interfaceHistoryService
-
createNativeHistoricCaseActivityInstanceQuery
public NativeHistoricCaseActivityInstanceQuery createNativeHistoricCaseActivityInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricCaseActivityInstance
s via SQL- Specified by:
createNativeHistoricCaseActivityInstanceQuery
in interfaceHistoryService
-
createNativeHistoricDecisionInstanceQuery
public NativeHistoricDecisionInstanceQuery createNativeHistoricDecisionInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricDecisionInstance
s via SQL- Specified by:
createNativeHistoricDecisionInstanceQuery
in interfaceHistoryService
-
createNativeHistoricVariableInstanceQuery
public NativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery()
Description copied from interface:HistoryService
creates a native query to search forHistoricVariableInstance
s via SQL- Specified by:
createNativeHistoricVariableInstanceQuery
in interfaceHistoryService
-
createHistoricJobLogQuery
public HistoricJobLogQuery createHistoricJobLogQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
historic job logs
.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricJobLogQuery
in interfaceHistoryService
- The user has no
-
getHistoricJobLogExceptionStacktrace
public String getHistoricJobLogExceptionStacktrace(String historicJobLogId)
Description copied from interface:HistoryService
Returns the full stacktrace of the exception that occurs when the historic job log with the given id was last executed. Returns null when the historic job log has no exception stacktrace.- Specified by:
getHistoricJobLogExceptionStacktrace
in interfaceHistoryService
- Parameters:
historicJobLogId
- id of the historic job log, cannot be null.
-
createHistoricProcessInstanceReport
public HistoricProcessInstanceReport createHistoricProcessInstanceReport()
Description copied from interface:HistoryService
Creates a new programmatic query to create a historic process instance report.- Specified by:
createHistoricProcessInstanceReport
in interfaceHistoryService
-
createHistoricTaskInstanceReport
public HistoricTaskInstanceReport createHistoricTaskInstanceReport()
Description copied from interface:HistoryService
Creates a new programmatic query to create a historic task instance report.
Subsequent builder methods throw
AuthorizationException
when the user has noPermissions.READ_HISTORY
permission on anyResources.PROCESS_DEFINITION
.- Specified by:
createHistoricTaskInstanceReport
in interfaceHistoryService
-
createCleanableHistoricProcessInstanceReport
public CleanableHistoricProcessInstanceReport createCleanableHistoricProcessInstanceReport()
Description copied from interface:HistoryService
Creates a new programmatic query to create a cleanable historic process instance report.- Specified by:
createCleanableHistoricProcessInstanceReport
in interfaceHistoryService
-
createCleanableHistoricDecisionInstanceReport
public CleanableHistoricDecisionInstanceReport createCleanableHistoricDecisionInstanceReport()
Description copied from interface:HistoryService
Creates a new programmatic query to create a cleanable historic decision instance report.- Specified by:
createCleanableHistoricDecisionInstanceReport
in interfaceHistoryService
-
createCleanableHistoricCaseInstanceReport
public CleanableHistoricCaseInstanceReport createCleanableHistoricCaseInstanceReport()
Description copied from interface:HistoryService
Creates a new programmatic query to create a cleanable historic case instance report.- Specified by:
createCleanableHistoricCaseInstanceReport
in interfaceHistoryService
-
createCleanableHistoricBatchReport
public CleanableHistoricBatchReport createCleanableHistoricBatchReport()
Description copied from interface:HistoryService
Creates a new programmatic query to create a cleanable historic batch report.- Specified by:
createCleanableHistoricBatchReport
in interfaceHistoryService
-
createHistoricBatchQuery
public HistoricBatchQuery createHistoricBatchQuery()
Description copied from interface:HistoryService
Creates a query to search forHistoricBatch
instances.- Specified by:
createHistoricBatchQuery
in interfaceHistoryService
-
deleteHistoricBatch
public void deleteHistoricBatch(String batchId)
Description copied from interface:HistoryService
Deletes a historic batch instance. All corresponding historic job logs are deleted as well;- Specified by:
deleteHistoricBatch
in interfaceHistoryService
-
createHistoricDecisionInstanceStatisticsQuery
public HistoricDecisionInstanceStatisticsQuery createHistoricDecisionInstanceStatisticsQuery(String decisionRequirementsDefinitionId)
Description copied from interface:HistoryService
Query for the statistics of DRD evaluation.- Specified by:
createHistoricDecisionInstanceStatisticsQuery
in interfaceHistoryService
- Parameters:
decisionRequirementsDefinitionId
- - id of decision requirement definition
-
createHistoricExternalTaskLogQuery
public HistoricExternalTaskLogQuery createHistoricExternalTaskLogQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search for
historic external task logs
.The result of the query is empty in the following cases:
- The user has no
Permissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
OR - The user has no
HistoricProcessInstancePermissions.READ
permission onResources.HISTORIC_PROCESS_INSTANCE
(enableHistoricInstancePermissions
inProcessEngineConfigurationImpl
must be set totrue
)
- Specified by:
createHistoricExternalTaskLogQuery
in interfaceHistoryService
- The user has no
-
getHistoricExternalTaskLogErrorDetails
public String getHistoricExternalTaskLogErrorDetails(String historicExternalTaskLogId)
Description copied from interface:HistoryService
Returns the full error details that occurs when the historic external task log with the given id was last executed. Returns null when the historic external task log contains no error details.- Specified by:
getHistoricExternalTaskLogErrorDetails
in interfaceHistoryService
- Parameters:
historicExternalTaskLogId
- id of the historic external task log, cannot be null.
-
setRemovalTimeToHistoricProcessInstances
public SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder setRemovalTimeToHistoricProcessInstances()
Description copied from interface:HistoryService
Set a removal time to historic process instances and all associated historic entities using a fluent builder.
Historic process instances can be specified by passing a query to
SetRemovalTimeToHistoricProcessInstancesBuilder.byQuery(HistoricProcessInstanceQuery)
.An absolute time can be specified via
SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder.absoluteRemovalTime(Date)
. Passnull
to clear the removal time.As an alternative, the removal time can also be calculated via
SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder.calculatedRemovalTime()
based on the configured time to live values.To additionally take those historic process instances into account that are part of a hierarchy, enable the flag
SetRemovalTimeToHistoricProcessInstancesBuilder.hierarchical()
To create the batch and complete the configuration chain, call
SetRemovalTimeToHistoricProcessInstancesBuilder.executeAsync()
.- Specified by:
setRemovalTimeToHistoricProcessInstances
in interfaceHistoryService
-
setRemovalTimeToHistoricDecisionInstances
public SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder setRemovalTimeToHistoricDecisionInstances()
Description copied from interface:HistoryService
Set a removal time to historic decision instances and all associated historic entities using a fluent builder.
Historic decision instances can be specified by passing a query to
SetRemovalTimeToHistoricDecisionInstancesBuilder.byQuery(HistoricDecisionInstanceQuery)
.An absolute time can be specified via
SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder.absoluteRemovalTime(Date)
. Passnull
to clear the removal time.As an alternative, the removal time can also be calculated via
SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder.calculatedRemovalTime()
based on the configured time to live values.To additionally take those historic decision instances into account that are part of a hierarchy, enable the flag
SetRemovalTimeToHistoricProcessInstancesBuilder.hierarchical()
To create the batch and complete the configuration chain, call
SetRemovalTimeToHistoricDecisionInstancesBuilder.executeAsync()
.- Specified by:
setRemovalTimeToHistoricDecisionInstances
in interfaceHistoryService
-
setRemovalTimeToHistoricBatches
public SetRemovalTimeSelectModeForHistoricBatchesBuilder setRemovalTimeToHistoricBatches()
Description copied from interface:HistoryService
Set a removal time to historic batches and all associated historic entities using a fluent builder.
Historic batches can be specified by passing a query to
SetRemovalTimeToHistoricBatchesBuilder.byQuery(HistoricBatchQuery)
.An absolute time can be specified via
SetRemovalTimeSelectModeForHistoricBatchesBuilder.absoluteRemovalTime(Date)
. Passnull
to clear the removal time.As an alternative, the removal time can also be calculated via
SetRemovalTimeSelectModeForHistoricBatchesBuilder.calculatedRemovalTime()
based on the configured time to live values.To create the batch and complete the configuration chain, call
SetRemovalTimeToHistoricBatchesBuilder.executeAsync()
.- Specified by:
setRemovalTimeToHistoricBatches
in interfaceHistoryService
-
setAnnotationForOperationLogById
public void setAnnotationForOperationLogById(String operationId, String annotation)
Description copied from interface:HistoryService
Set an annotation to user operation log entries.
- Specified by:
setAnnotationForOperationLogById
in interfaceHistoryService
- Parameters:
operationId
- of the user operation log entries that are updatedannotation
- that is set to the user operation log entries
-
clearAnnotationForOperationLogById
public void clearAnnotationForOperationLogById(String operationId)
Description copied from interface:HistoryService
Clear the annotation for user operation log entries.
- Specified by:
clearAnnotationForOperationLogById
in interfaceHistoryService
- Parameters:
operationId
- of the user operation log entries that are updated
-
-