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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String batchId)
Deletes a historic batch instance.void
deleteHistoricCaseInstance(java.lang.String caseInstanceId)
Deletes historic case instance.void
deleteHistoricCaseInstancesBulk(java.util.List<java.lang.String> caseInstanceIds)
Deletes historic case instances and all related historic data in bulk manner.void
deleteHistoricDecisionInstance(java.lang.String decisionDefinitionId)
Deletes historic decision instances of a decision definition.void
deleteHistoricDecisionInstanceByDefinitionId(java.lang.String decisionDefinitionId)
Deletes historic decision instances of a decision definition.void
deleteHistoricDecisionInstanceByInstanceId(java.lang.String historicDecisionInstanceId)
Deletes historic decision instances by its id.Batch
deleteHistoricDecisionInstancesAsync(java.util.List<java.lang.String> decisionInstanceIds, java.lang.String deleteReason)
Deletes historic decision instances asynchronously based on a list of decision instances.Batch
deleteHistoricDecisionInstancesAsync(java.util.List<java.lang.String> decisionInstanceIds, HistoricDecisionInstanceQuery query, java.lang.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, java.lang.String deleteReason)
Deletes historic decision instances asynchronously based on query of decision instances.void
deleteHistoricDecisionInstancesBulk(java.util.List<java.lang.String> decisionInstanceIds)
Deletes decision instances and all related historic data in bulk manner.void
deleteHistoricProcessInstance(java.lang.String processInstanceId)
Deletes historic process instance.void
deleteHistoricProcessInstanceIfExists(java.lang.String processInstanceId)
Deletes historic process instance.void
deleteHistoricProcessInstances(java.util.List<java.lang.String> processInstanceIds)
Deletes historic process instances.Batch
deleteHistoricProcessInstancesAsync(java.util.List<java.lang.String> processInstanceIds, java.lang.String deleteReason)
Deletes historic process instances asynchronously.Batch
deleteHistoricProcessInstancesAsync(java.util.List<java.lang.String> processInstanceIds, HistoricProcessInstanceQuery query, java.lang.String deleteReason)
Deletes historic process instances asynchronously based on query and a list of process instances.Batch
deleteHistoricProcessInstancesAsync(HistoricProcessInstanceQuery query, java.lang.String deleteReason)
Deletes historic process instances asynchronously based on query.void
deleteHistoricProcessInstancesBulk(java.util.List<java.lang.String> processInstanceIds)
Deletes historic process instances and all related historic data in bulk manner.void
deleteHistoricProcessInstancesIfExists(java.util.List<java.lang.String> processInstanceIds)
Deletes historic process instances.void
deleteHistoricTaskInstance(java.lang.String taskId)
Deletes historic task instance.void
deleteHistoricVariableInstance(java.lang.String variableInstanceId)
Deletes a historic variable instance by its id.void
deleteHistoricVariableInstancesByProcessInstanceId(java.lang.String processInstanceId)
Deletes all historic variables and historic details (variable updates, form properties) of a process instance.void
deleteUserOperationLogEntry(java.lang.String entryId)
Deletes a user operation log entry.Job
findHistoryCleanupJob()
Finds history cleanup job, if present.java.util.List<Job>
findHistoryCleanupJobs()
Finds history cleanup jobs if present.java.lang.String
getHistoricExternalTaskLogErrorDetails(java.lang.String historicExternalTaskLogId)
Returns the full error details that occurs when the historic external task log with the given id was last executed.java.lang.String
getHistoricJobLogExceptionStacktrace(java.lang.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(java.lang.String operationId, java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.List<java.lang.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(java.util.List<java.lang.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(java.util.List<java.lang.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 java.util.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(java.util.List<java.lang.String> processInstanceIds, java.lang.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, java.lang.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(java.util.List<java.lang.String> processInstanceIds, HistoricProcessInstanceQuery query, java.lang.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(java.lang.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(java.lang.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(java.util.List<java.lang.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(java.lang.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(java.util.List<java.lang.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(java.lang.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(java.lang.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(java.util.List<java.lang.String> decisionInstanceIds, java.lang.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, java.lang.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(java.util.List<java.lang.String> decisionInstanceIds, HistoricDecisionInstanceQuery query, java.lang.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(java.lang.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(java.lang.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 java.lang.String getHistoricJobLogExceptionStacktrace(java.lang.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(java.lang.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(java.lang.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 java.lang.String getHistoricExternalTaskLogErrorDetails(java.lang.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(java.lang.String operationId, java.lang.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(java.lang.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
-
-