Interface HistoryService
-
- All Known Implementing Classes:
HistoryServiceImpl
public interface HistoryService
Service exposing information about ongoing and past process instances. This is different from the runtime information in the sense that this runtime information only contains the actual runtime state at any given moment and it is optimized for runtime process execution performance. The history information is optimized for easy querying and remains permanent in the persistent storage.- Author:
- Christian Stettler, Tom Baeyens, Joram Barrez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated 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
.HistoricIdentityLinkLogQuery
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 id)
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)
Deprecated.Note that this method name is not expressive enough, because it is also possible to delete the historic decision instance by the instance id.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()
Deprecated.As of v.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.
-
-
-
Method Detail
-
createHistoricProcessInstanceQuery
HistoricProcessInstanceQuery createHistoricProcessInstanceQuery()
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
)
- The user has no
-
createHistoricActivityInstanceQuery
HistoricActivityInstanceQuery createHistoricActivityInstanceQuery()
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
)
- The user has no
-
createHistoricActivityStatisticsQuery
HistoricActivityStatisticsQuery createHistoricActivityStatisticsQuery(String processDefinitionId)
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
-
createHistoricCaseActivityStatisticsQuery
HistoricCaseActivityStatisticsQuery createHistoricCaseActivityStatisticsQuery(String caseDefinitionId)
Query for the number of historic case activity instances aggregated by case activities of a single case definition.
-
createHistoricTaskInstanceQuery
HistoricTaskInstanceQuery createHistoricTaskInstanceQuery()
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
)
- The user has no
-
createHistoricDetailQuery
HistoricDetailQuery createHistoricDetailQuery()
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
)
- The user has no
-
createHistoricVariableInstanceQuery
HistoricVariableInstanceQuery createHistoricVariableInstanceQuery()
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
)
- The user has no
-
createUserOperationLogQuery
UserOperationLogQuery createUserOperationLogQuery()
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
)
- The user has no
-
createHistoricIncidentQuery
HistoricIncidentQuery createHistoricIncidentQuery()
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
)
- The user has no
-
createHistoricIdentityLinkLogQuery
HistoricIdentityLinkLogQuery createHistoricIdentityLinkLogQuery()
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
)
- The user has no
-
createHistoricCaseInstanceQuery
HistoricCaseInstanceQuery createHistoricCaseInstanceQuery()
Creates a new programmatic query to search forHistoricCaseInstance
s.
-
createHistoricCaseActivityInstanceQuery
HistoricCaseActivityInstanceQuery createHistoricCaseActivityInstanceQuery()
Creates a new programmatic query to search forHistoricCaseActivityInstance
s.
-
createHistoricDecisionInstanceQuery
HistoricDecisionInstanceQuery createHistoricDecisionInstanceQuery()
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.
-
deleteHistoricTaskInstance
void deleteHistoricTaskInstance(String taskId)
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.- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
deleteHistoricProcessInstance
void deleteHistoricProcessInstance(String processInstanceId)
Deletes historic process instance. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
deleteHistoricProcessInstanceIfExists
void deleteHistoricProcessInstanceIfExists(String processInstanceId)
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.- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
deleteHistoricProcessInstances
void deleteHistoricProcessInstances(List<String> processInstanceIds)
Deletes historic process instances. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Throws:
BadUserRequestException
- when no process instances are found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
deleteHistoricProcessInstancesIfExists
void deleteHistoricProcessInstancesIfExists(List<String> processInstanceIds)
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.- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
deleteHistoricProcessInstancesBulk
void deleteHistoricProcessInstancesBulk(List<String> processInstanceIds)
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.- Parameters:
processInstanceIds
- list of process instance ids for removal- Throws:
BadUserRequestException
- when no process instances are found with the given ids or ids are null or when some of the process instances are not finished yetAuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
cleanUpHistoryAsync
Job cleanUpHistoryAsync()
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.- Returns:
- history cleanup job. NB! As of v. 7.9.0, method does not guarantee to return a job. Use
findHistoryCleanupJobs()
instead. - Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
-
cleanUpHistoryAsync
Job cleanUpHistoryAsync(boolean immediatelyDue)
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.- 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.
- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
-
findHistoryCleanupJob
@Deprecated Job findHistoryCleanupJob()
Deprecated.As of v. 7.9.0, because there can be more than one history cleanup job at once, usefindHistoryCleanupJobs()
instead.Finds history cleanup job, if present.- Returns:
- history cleanup job entity
-
findHistoryCleanupJobs
List<Job> findHistoryCleanupJobs()
Finds history cleanup jobs if present.- Returns:
- history cleanup job entities
-
deleteHistoricProcessInstancesAsync
Batch deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, String deleteReason)
Deletes historic process instances asynchronously. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Throws:
BadUserRequestException
- when no process instances is found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.CREATE
orBatchPermissions.CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCES
permission onResources.BATCH
.
-
deleteHistoricProcessInstancesAsync
Batch deleteHistoricProcessInstancesAsync(HistoricProcessInstanceQuery query, String deleteReason)
Deletes historic process instances asynchronously based on query. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Throws:
BadUserRequestException
- when no process instances is found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.CREATE
orBatchPermissions.CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCES
permission onResources.BATCH
.
-
deleteHistoricProcessInstancesAsync
Batch deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, HistoricProcessInstanceQuery query, String deleteReason)
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.- Throws:
BadUserRequestException
- when no process instances is found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.CREATE
orBatchPermissions.CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCES
permission onResources.BATCH
.
-
deleteUserOperationLogEntry
void deleteUserOperationLogEntry(String entryId)
Deletes a user operation log entry. Does not cascade to any related entities.- Throws:
AuthorizationException
- For entries related to process definition keys: If the user has neitherPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
norUserOperationLogCategoryPermissions.DELETE
permission onResources.OPERATION_LOG_CATEGORY
. For entries not related to process definition keys: If the user has noUserOperationLogCategoryPermissions.DELETE
permission onResources.OPERATION_LOG_CATEGORY
.
-
deleteHistoricCaseInstance
void deleteHistoricCaseInstance(String caseInstanceId)
Deletes historic case instance. All historic case activities, historic task and historic details are deleted as well.
-
deleteHistoricCaseInstancesBulk
void deleteHistoricCaseInstancesBulk(List<String> caseInstanceIds)
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.- Parameters:
caseInstanceIds
- list of case instance ids for removal
-
deleteHistoricDecisionInstance
@Deprecated void deleteHistoricDecisionInstance(String decisionDefinitionId)
Deprecated.Note that this method name is not expressive enough, because it is also possible to delete the historic decision instance by the instance id. Therefore usedeleteHistoricDecisionInstanceByDefinitionId(java.lang.String)
instead to delete the historic decision instance by the definition id.Deletes historic decision instances of a decision definition. All historic decision inputs and outputs are deleted as well.- Parameters:
decisionDefinitionId
- the id of the decision definition- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.DECISION_DEFINITION
.
-
deleteHistoricDecisionInstancesBulk
void deleteHistoricDecisionInstancesBulk(List<String> decisionInstanceIds)
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.- Parameters:
decisionInstanceIds
- list of decision instance ids for removal.- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.DECISION_DEFINITION
.
-
deleteHistoricDecisionInstanceByDefinitionId
void deleteHistoricDecisionInstanceByDefinitionId(String decisionDefinitionId)
Deletes historic decision instances of a decision definition. All historic decision inputs and outputs are deleted as well.- Parameters:
decisionDefinitionId
- the id of the decision definition- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.DECISION_DEFINITION
.
-
deleteHistoricDecisionInstanceByInstanceId
void deleteHistoricDecisionInstanceByInstanceId(String historicDecisionInstanceId)
Deletes historic decision instances by its id. All historic decision inputs and outputs are deleted as well.- Parameters:
historicDecisionInstanceId
- the id of the historic decision instance- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.DECISION_DEFINITION
.
-
deleteHistoricDecisionInstancesAsync
Batch deleteHistoricDecisionInstancesAsync(List<String> decisionInstanceIds, String deleteReason)
Deletes historic decision instances asynchronously based on a list of decision instances.- Throws:
BadUserRequestException
- when no decision instances are found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.CREATE
orBatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCES
permission onResources.BATCH
.
-
deleteHistoricDecisionInstancesAsync
Batch deleteHistoricDecisionInstancesAsync(HistoricDecisionInstanceQuery query, String deleteReason)
Deletes historic decision instances asynchronously based on query of decision instances.- Throws:
BadUserRequestException
- when no decision instances are found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.CREATE
orBatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCES
permission onResources.BATCH
.
-
deleteHistoricDecisionInstancesAsync
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.- Throws:
BadUserRequestException
- when no decision instances are found with the given ids or ids are null.AuthorizationException
- If the user has noPermissions.CREATE
orBatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCES
permission onResources.BATCH
.
-
deleteHistoricVariableInstance
void deleteHistoricVariableInstance(String variableInstanceId)
Deletes a historic variable instance by its id. All related historic details (variable updates, form properties) are deleted as well.- Parameters:
variableInstanceId
- the id of the variable instance- Throws:
BadUserRequestException
- when the historic variable instance is not found by the given id or if id is nullAuthorizationException
- If the variable instance has a process definition key and the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
deleteHistoricVariableInstancesByProcessInstanceId
void deleteHistoricVariableInstancesByProcessInstanceId(String processInstanceId)
Deletes all historic variables and historic details (variable updates, form properties) of a process instance.- Parameters:
processInstanceId
- the id of the process instance- Throws:
AuthorizationException
- If the user has noPermissions.DELETE_HISTORY
permission onResources.PROCESS_DEFINITION
.
-
createNativeHistoricProcessInstanceQuery
NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery()
creates a native query to search forHistoricProcessInstance
s via SQL
-
createNativeHistoricTaskInstanceQuery
NativeHistoricTaskInstanceQuery createNativeHistoricTaskInstanceQuery()
creates a native query to search forHistoricTaskInstance
s via SQL
-
createNativeHistoricActivityInstanceQuery
NativeHistoricActivityInstanceQuery createNativeHistoricActivityInstanceQuery()
creates a native query to search forHistoricActivityInstance
s via SQL
-
createNativeHistoricCaseInstanceQuery
NativeHistoricCaseInstanceQuery createNativeHistoricCaseInstanceQuery()
creates a native query to search forHistoricCaseInstance
s via SQL
-
createNativeHistoricCaseActivityInstanceQuery
NativeHistoricCaseActivityInstanceQuery createNativeHistoricCaseActivityInstanceQuery()
creates a native query to search forHistoricCaseActivityInstance
s via SQL
-
createNativeHistoricDecisionInstanceQuery
NativeHistoricDecisionInstanceQuery createNativeHistoricDecisionInstanceQuery()
creates a native query to search forHistoricDecisionInstance
s via SQL
-
createNativeHistoricVariableInstanceQuery
NativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery()
creates a native query to search forHistoricVariableInstance
s via SQL
-
createHistoricJobLogQuery
HistoricJobLogQuery createHistoricJobLogQuery()
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
)
- Since:
- 7.3
- The user has no
-
getHistoricJobLogExceptionStacktrace
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. Returns null when the historic job log has no exception stacktrace.- Parameters:
historicJobLogId
- id of the historic job log, cannot be null.- Throws:
ProcessEngineException
- when no historic job log exists with the given id.AuthorizationException
- If the user has noPermissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
.- Since:
- 7.3
-
createHistoricProcessInstanceReport
HistoricProcessInstanceReport createHistoricProcessInstanceReport()
Creates a new programmatic query to create a historic process instance report.- Since:
- 7.5
-
createHistoricTaskInstanceReport
HistoricTaskInstanceReport createHistoricTaskInstanceReport()
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
.- Since:
- 7.6
-
createCleanableHistoricProcessInstanceReport
CleanableHistoricProcessInstanceReport createCleanableHistoricProcessInstanceReport()
Creates a new programmatic query to create a cleanable historic process instance report.- Since:
- 7.8
-
createCleanableHistoricDecisionInstanceReport
CleanableHistoricDecisionInstanceReport createCleanableHistoricDecisionInstanceReport()
Creates a new programmatic query to create a cleanable historic decision instance report.- Since:
- 7.8
-
createCleanableHistoricCaseInstanceReport
CleanableHistoricCaseInstanceReport createCleanableHistoricCaseInstanceReport()
Creates a new programmatic query to create a cleanable historic case instance report.- Since:
- 7.8
-
createCleanableHistoricBatchReport
CleanableHistoricBatchReport createCleanableHistoricBatchReport()
Creates a new programmatic query to create a cleanable historic batch report.- Since:
- 7.8
-
createHistoricBatchQuery
HistoricBatchQuery createHistoricBatchQuery()
Creates a query to search forHistoricBatch
instances.- Since:
- 7.5
-
deleteHistoricBatch
void deleteHistoricBatch(String id)
Deletes a historic batch instance. All corresponding historic job logs are deleted as well;- Throws:
AuthorizationException
- If the user has noPermissions.DELETE
permission onResources.BATCH
- Since:
- 7.5
-
createHistoricDecisionInstanceStatisticsQuery
HistoricDecisionInstanceStatisticsQuery createHistoricDecisionInstanceStatisticsQuery(String decisionRequirementsDefinitionId)
Query for the statistics of DRD evaluation.- Parameters:
decisionRequirementsDefinitionId
- - id of decision requirement definition- Since:
- 7.6
-
createHistoricExternalTaskLogQuery
HistoricExternalTaskLogQuery createHistoricExternalTaskLogQuery()
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
)
- Since:
- 7.7
- The user has no
-
getHistoricExternalTaskLogErrorDetails
String getHistoricExternalTaskLogErrorDetails(String historicExternalTaskLogId)
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.- Parameters:
historicExternalTaskLogId
- id of the historic external task log, cannot be null.- Throws:
ProcessEngineException
- when no historic external task log exists with the given id.AuthorizationException
- If the user has noPermissions.READ_HISTORY
permission onResources.PROCESS_DEFINITION
.- Since:
- 7.7
-
setRemovalTimeToHistoricProcessInstances
SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder setRemovalTimeToHistoricProcessInstances()
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()
.- Since:
- 7.11
-
setRemovalTimeToHistoricDecisionInstances
SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder setRemovalTimeToHistoricDecisionInstances()
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()
.- Since:
- 7.11
-
setRemovalTimeToHistoricBatches
SetRemovalTimeSelectModeForHistoricBatchesBuilder setRemovalTimeToHistoricBatches()
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()
.- Since:
- 7.11
-
setAnnotationForOperationLogById
void setAnnotationForOperationLogById(String operationId, String annotation)
Set an annotation to user operation log entries.
- Parameters:
operationId
- of the user operation log entries that are updatedannotation
- that is set to the user operation log entries- Throws:
NotValidException
- when operation id isnull
BadUserRequestException
- when no user operation could be foundAuthorizationException
--
when no
ProcessDefinitionPermissions.UPDATE_HISTORY
permission is granted onResources.PROCESS_DEFINITION
-
or when no
UserOperationLogCategoryPermissions.UPDATE
permission is granted onResources.OPERATION_LOG_CATEGORY
-
when no
- Since:
- 7.12
-
clearAnnotationForOperationLogById
void clearAnnotationForOperationLogById(String operationId)
Clear the annotation for user operation log entries.
- Parameters:
operationId
- of the user operation log entries that are updated- Throws:
NotValidException
- when operation id isnull
BadUserRequestException
- when no user operation could be foundAuthorizationException
--
when no
ProcessDefinitionPermissions.UPDATE_HISTORY
permission is granted onResources.PROCESS_DEFINITION
-
or when no
UserOperationLogCategoryPermissions.UPDATE
permission is granted onResources.OPERATION_LOG_CATEGORY
-
when no
- Since:
- 7.12
-
-