Interface HistoryService
- All Known Implementing Classes:
- HistoryServiceImpl
- Author:
- Christian Stettler, Tom Baeyens, Joram Barrez
- 
Method SummaryModifier and TypeMethodDescriptionSchedules history cleanup job at batch window start time.cleanUpHistoryAsync(boolean immediatelyDue) Schedules history cleanup job at batch window start time.voidclearAnnotationForOperationLogById(String operationId) Clear the annotation for user operation log entries.Creates a new programmatic query to create a cleanable historic batch report.Creates a new programmatic query to create a cleanable historic case instance report.Creates a new programmatic query to create a cleanable historic decision instance report.Creates a new programmatic query to create a cleanable historic process instance report.Creates a new programmatic query to search forHistoricActivityInstances.createHistoricActivityStatisticsQuery(String processDefinitionId) Query for the number of historic activity instances aggregated by activities of a single process definition.Creates a query to search forHistoricBatchinstances.Creates a new programmatic query to search forHistoricCaseActivityInstances.createHistoricCaseActivityStatisticsQuery(String caseDefinitionId) Query for the number of historic case activity instances aggregated by case activities of a single case definition.Creates a new programmatic query to search forHistoricCaseInstances.Creates a new programmatic query to search forHistoricDecisionInstances.createHistoricDecisionInstanceStatisticsQuery(String decisionRequirementsDefinitionId) Query for the statistics of DRD evaluation.Creates a new programmatic query to search forHistoricDetails.Creates a new programmatic query to search forhistoric external task logs.Creates a new programmatic query to search forhistoric identity links.Creates a new programmatic query to search forhistoric incidents.Creates a new programmatic query to search forhistoric job logs.Creates a new programmatic query to search forHistoricProcessInstances.Creates a new programmatic query to create a historic process instance report.Creates a new programmatic query to search forHistoricTaskInstances.Creates a new programmatic query to create a historic task instance report.Creates a new programmatic query to search forHistoricVariableInstances.creates a native query to search forHistoricActivityInstances via SQLcreates a native query to search forHistoricCaseActivityInstances via SQLcreates a native query to search forHistoricCaseInstances via SQLcreates a native query to search forHistoricDecisionInstances via SQLcreates a native query to search forHistoricProcessInstances via SQLcreates a native query to search forHistoricTaskInstances via SQLcreates a native query to search forHistoricVariableInstances via SQLCreates a new programmatic query to search forUserOperationLogEntryinstances.voidDeletes a historic batch instance.voiddeleteHistoricCaseInstance(String caseInstanceId) Deletes historic case instance.voiddeleteHistoricCaseInstancesBulk(List<String> caseInstanceIds) Deletes historic case instances and all related historic data in bulk manner.voiddeleteHistoricDecisionInstance(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.voiddeleteHistoricDecisionInstanceByDefinitionId(String decisionDefinitionId) Deletes historic decision instances of a decision definition.voiddeleteHistoricDecisionInstanceByInstanceId(String historicDecisionInstanceId) Deletes historic decision instances by its id.deleteHistoricDecisionInstancesAsync(List<String> decisionInstanceIds, String deleteReason) Deletes historic decision instances asynchronously based on a list of decision instances.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.deleteHistoricDecisionInstancesAsync(HistoricDecisionInstanceQuery query, String deleteReason) Deletes historic decision instances asynchronously based on query of decision instances.voiddeleteHistoricDecisionInstancesBulk(List<String> decisionInstanceIds) Deletes decision instances and all related historic data in bulk manner.voiddeleteHistoricProcessInstance(String processInstanceId) Deletes historic process instance.voiddeleteHistoricProcessInstanceIfExists(String processInstanceId) Deletes historic process instance.voiddeleteHistoricProcessInstances(List<String> processInstanceIds) Deletes historic process instances.deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, String deleteReason) Deletes historic process instances asynchronously.deleteHistoricProcessInstancesAsync(List<String> processInstanceIds, HistoricProcessInstanceQuery query, String deleteReason) Deletes historic process instances asynchronously based on query and a list of process instances.deleteHistoricProcessInstancesAsync(HistoricProcessInstanceQuery query, String deleteReason) Deletes historic process instances asynchronously based on query.voiddeleteHistoricProcessInstancesBulk(List<String> processInstanceIds) Deletes historic process instances and all related historic data in bulk manner.voiddeleteHistoricProcessInstancesIfExists(List<String> processInstanceIds) Deletes historic process instances.voiddeleteHistoricTaskInstance(String taskId) Deletes historic task instance.voiddeleteHistoricVariableInstance(String variableInstanceId) Deletes a historic variable instance by its id.voiddeleteHistoricVariableInstancesByProcessInstanceId(String processInstanceId) Deletes all historic variables and historic details (variable updates, form properties) of a process instance.voiddeleteUserOperationLogEntry(String entryId) Deletes a user operation log entry.Deprecated.As of v.Finds history cleanup jobs if present.getHistoricExternalTaskLogErrorDetails(String historicExternalTaskLogId) Returns the full error details that occurs when the historic external task log with the given id was last executed.getHistoricJobLogExceptionStacktrace(String historicJobLogId) Returns the full stacktrace of the exception that occurs when the historic job log with the given id was last executed.voidsetAnnotationForOperationLogById(String operationId, String annotation) Set an annotation to user operation log entries.Set a removal time to historic batches and all associated historic entities using a fluent builder.Set a removal time to historic decision instances and all associated historic entities using a fluent builder.Set a removal time to historic process instances and all associated historic entities using a fluent builder.
- 
Method Details- 
createHistoricProcessInstanceQueryHistoricProcessInstanceQuery createHistoricProcessInstanceQuery()Creates a new programmatic query to search for HistoricProcessInstances.The result of the query is empty in the following cases: - The user has no Permissions.READ_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricActivityInstanceQueryHistoricActivityInstanceQuery createHistoricActivityInstanceQuery()Creates a new programmatic query to search for HistoricActivityInstances.The result of the query is empty in the following cases: - The user has no Permissions.READ_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricActivityStatisticsQueryQuery 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_HISTORYpermission onResources.PROCESS_DEFINITION
- 
createHistoricCaseActivityStatisticsQueryHistoricCaseActivityStatisticsQuery createHistoricCaseActivityStatisticsQuery(String caseDefinitionId) Query for the number of historic case activity instances aggregated by case activities of a single case definition.
- 
createHistoricTaskInstanceQueryHistoricTaskInstanceQuery createHistoricTaskInstanceQuery()Creates a new programmatic query to search for HistoricTaskInstances.The result of the query is empty in the following cases: - The user has no Permissions.READ_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue) OR
- The user has no HistoricTaskPermissions.READpermission onResources.HISTORIC_TASK(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricDetailQueryHistoricDetailQuery createHistoricDetailQuery()Creates a new programmatic query to search for HistoricDetails.The result of the query is empty in the following cases: - The user has no Permissions.READ_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricTaskPermissions.READpermission onResources.HISTORIC_TASK(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue) OR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue) OR
- The user has no ProcessDefinitionPermissions.READ_HISTORY_VARIABLEpermission onResources.PROCESS_DEFINITION(ProcessEngineConfiguration.enforceSpecificVariablePermissionmust be set totrue) OR
- The user has no HistoricTaskPermissions.READ_VARIABLEpermission onResources.HISTORIC_TASK(enforceSpecificVariablePermissionandenableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricVariableInstanceQueryHistoricVariableInstanceQuery createHistoricVariableInstanceQuery()Creates a new programmatic query to search for HistoricVariableInstances.The result of the query is empty in the following cases: - The user has no Permissions.READ_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricTaskPermissions.READpermission onResources.HISTORIC_TASK(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue) OR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue) OR
- The user has no ProcessDefinitionPermissions.READ_HISTORY_VARIABLEpermission onResources.PROCESS_DEFINITION(ProcessEngineConfiguration.enforceSpecificVariablePermissionmust be set totrue) OR
- The user has no HistoricTaskPermissions.READ_VARIABLEpermission onResources.HISTORIC_TASK(enforceSpecificVariablePermissionandenableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createUserOperationLogQueryUserOperationLogQuery createUserOperationLogQuery()Creates a new programmatic query to search for UserOperationLogEntryinstances.The result of the query is empty in the following cases: - The user has no Permissions.READ_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue) OR
- The user has no HistoricTaskPermissions.READpermission onResources.HISTORIC_TASK(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricIncidentQueryHistoricIncidentQuery 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_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricIdentityLinkLogQueryHistoricIdentityLinkLogQuery 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_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricTaskPermissions.READpermission onResources.HISTORIC_TASK(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 
- The user has no 
- 
createHistoricCaseInstanceQueryHistoricCaseInstanceQuery createHistoricCaseInstanceQuery()Creates a new programmatic query to search forHistoricCaseInstances.
- 
createHistoricCaseActivityInstanceQueryHistoricCaseActivityInstanceQuery createHistoricCaseActivityInstanceQuery()Creates a new programmatic query to search forHistoricCaseActivityInstances.
- 
createHistoricDecisionInstanceQueryHistoricDecisionInstanceQuery createHistoricDecisionInstanceQuery()Creates a new programmatic query to search forHistoricDecisionInstances. If the user has noPermissions.READ_HISTORYpermission onResources.DECISION_DEFINITIONthen the result of the query is empty.
- 
deleteHistoricTaskInstanceDeletes historic task instance. This might be useful for tasks that aredynamically createdand thencompleted. If the historic task instance doesn't exist, no exception is thrown and the method returns normal.- Throws:
- AuthorizationException- If the user has no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
deleteHistoricProcessInstanceDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
deleteHistoricProcessInstanceIfExistsDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
deleteHistoricProcessInstancesDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
deleteHistoricProcessInstancesIfExistsDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
deleteHistoricProcessInstancesBulkDeletes 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 yet
- AuthorizationException- If the user has no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
cleanUpHistoryAsyncJob 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION
 
- 
cleanUpHistoryAsyncSchedules 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION
 
- 
findHistoryCleanupJobDeprecated.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
 
- 
findHistoryCleanupJobsFinds history cleanup jobs if present.- Returns:
- history cleanup job entities
 
- 
deleteHistoricProcessInstancesAsyncDeletes 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 no- Permissions.CREATEor- BatchPermissions.CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCESpermission on- Resources.BATCH.
 
- 
deleteHistoricProcessInstancesAsyncDeletes 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 no- Permissions.CREATEor- BatchPermissions.CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCESpermission on- Resources.BATCH.
 
- 
deleteHistoricProcessInstancesAsyncBatch 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 no- Permissions.CREATEor- BatchPermissions.CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCESpermission on- Resources.BATCH.
 
- 
deleteUserOperationLogEntryDeletes 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 neither- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITIONnor- UserOperationLogCategoryPermissions.DELETEpermission on- Resources.OPERATION_LOG_CATEGORY. For entries not related to process definition keys: If the user has no- UserOperationLogCategoryPermissions.DELETEpermission on- Resources.OPERATION_LOG_CATEGORY.
 
- 
deleteHistoricCaseInstanceDeletes historic case instance. All historic case activities, historic task and historic details are deleted as well.
- 
deleteHistoricCaseInstancesBulkDeletes 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
 
- 
deleteHistoricDecisionInstanceDeprecated.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 no- Permissions.DELETE_HISTORYpermission on- Resources.DECISION_DEFINITION.
 
- 
deleteHistoricDecisionInstancesBulkDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.DECISION_DEFINITION.
 
- 
deleteHistoricDecisionInstanceByDefinitionIdDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.DECISION_DEFINITION.
 
- 
deleteHistoricDecisionInstanceByInstanceIdDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.DECISION_DEFINITION.
 
- 
deleteHistoricDecisionInstancesAsyncDeletes 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 no- Permissions.CREATEor- BatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCESpermission on- Resources.BATCH.
 
- 
deleteHistoricDecisionInstancesAsyncBatch 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 no- Permissions.CREATEor- BatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCESpermission on- Resources.BATCH.
 
- 
deleteHistoricDecisionInstancesAsyncBatch 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 no- Permissions.CREATEor- BatchPermissions.CREATE_BATCH_DELETE_DECISION_INSTANCESpermission on- Resources.BATCH.
 
- 
deleteHistoricVariableInstanceDeletes 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 null
- AuthorizationException- If the variable instance has a process definition key and the user has no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
deleteHistoricVariableInstancesByProcessInstanceIdDeletes 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 no- Permissions.DELETE_HISTORYpermission on- Resources.PROCESS_DEFINITION.
 
- 
createNativeHistoricProcessInstanceQueryNativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery()creates a native query to search forHistoricProcessInstances via SQL
- 
createNativeHistoricTaskInstanceQueryNativeHistoricTaskInstanceQuery createNativeHistoricTaskInstanceQuery()creates a native query to search forHistoricTaskInstances via SQL
- 
createNativeHistoricActivityInstanceQueryNativeHistoricActivityInstanceQuery createNativeHistoricActivityInstanceQuery()creates a native query to search forHistoricActivityInstances via SQL
- 
createNativeHistoricCaseInstanceQueryNativeHistoricCaseInstanceQuery createNativeHistoricCaseInstanceQuery()creates a native query to search forHistoricCaseInstances via SQL
- 
createNativeHistoricCaseActivityInstanceQueryNativeHistoricCaseActivityInstanceQuery createNativeHistoricCaseActivityInstanceQuery()creates a native query to search forHistoricCaseActivityInstances via SQL
- 
createNativeHistoricDecisionInstanceQueryNativeHistoricDecisionInstanceQuery createNativeHistoricDecisionInstanceQuery()creates a native query to search forHistoricDecisionInstances via SQL
- 
createNativeHistoricVariableInstanceQueryNativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery()creates a native query to search forHistoricVariableInstances via SQL
- 
createHistoricJobLogQueryHistoricJobLogQuery 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_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 - Since:
- 7.3
 
- The user has no 
- 
getHistoricJobLogExceptionStacktraceReturns 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 no- Permissions.READ_HISTORYpermission on- Resources.PROCESS_DEFINITION.
- Since:
- 7.3
 
- 
createHistoricProcessInstanceReportHistoricProcessInstanceReport createHistoricProcessInstanceReport()Creates a new programmatic query to create a historic process instance report.- Since:
- 7.5
 
- 
createHistoricTaskInstanceReportHistoricTaskInstanceReport createHistoricTaskInstanceReport()Creates a new programmatic query to create a historic task instance report. Subsequent builder methods throw AuthorizationExceptionwhen the user has noPermissions.READ_HISTORYpermission on anyResources.PROCESS_DEFINITION.- Since:
- 7.6
 
- 
createCleanableHistoricProcessInstanceReportCleanableHistoricProcessInstanceReport createCleanableHistoricProcessInstanceReport()Creates a new programmatic query to create a cleanable historic process instance report.- Since:
- 7.8
 
- 
createCleanableHistoricDecisionInstanceReportCleanableHistoricDecisionInstanceReport createCleanableHistoricDecisionInstanceReport()Creates a new programmatic query to create a cleanable historic decision instance report.- Since:
- 7.8
 
- 
createCleanableHistoricCaseInstanceReportCleanableHistoricCaseInstanceReport createCleanableHistoricCaseInstanceReport()Creates a new programmatic query to create a cleanable historic case instance report.- Since:
- 7.8
 
- 
createCleanableHistoricBatchReportCleanableHistoricBatchReport createCleanableHistoricBatchReport()Creates a new programmatic query to create a cleanable historic batch report.- Since:
- 7.8
 
- 
createHistoricBatchQueryHistoricBatchQuery createHistoricBatchQuery()Creates a query to search forHistoricBatchinstances.- Since:
- 7.5
 
- 
deleteHistoricBatchDeletes a historic batch instance. All corresponding historic job logs are deleted as well;- Throws:
- AuthorizationException- If the user has no- Permissions.DELETEpermission on- Resources.BATCH
- Since:
- 7.5
 
- 
createHistoricDecisionInstanceStatisticsQueryHistoricDecisionInstanceStatisticsQuery createHistoricDecisionInstanceStatisticsQuery(String decisionRequirementsDefinitionId) Query for the statistics of DRD evaluation.- Parameters:
- decisionRequirementsDefinitionId- - id of decision requirement definition
- Since:
- 7.6
 
- 
createHistoricExternalTaskLogQueryHistoricExternalTaskLogQuery 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_HISTORYpermission onResources.PROCESS_DEFINITIONOR
- The user has no HistoricProcessInstancePermissions.READpermission onResources.HISTORIC_PROCESS_INSTANCE(enableHistoricInstancePermissionsinProcessEngineConfigurationImplmust be set totrue)
 - Since:
- 7.7
 
- The user has no 
- 
getHistoricExternalTaskLogErrorDetailsReturns 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 no- Permissions.READ_HISTORYpermission on- Resources.PROCESS_DEFINITION.
- Since:
- 7.7
 
- 
setRemovalTimeToHistoricProcessInstancesSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder 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). Passnullto 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
 
- 
setRemovalTimeToHistoricDecisionInstancesSetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder 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). Passnullto 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
 
- 
setRemovalTimeToHistoricBatchesSetRemovalTimeSelectModeForHistoricBatchesBuilder 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). Passnullto 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
 
- 
setAnnotationForOperationLogByIdSet an annotation to user operation log entries. - Parameters:
- operationId- of the user operation log entries that are updated
- annotation- that is set to the user operation log entries
- Throws:
- NotValidException- when operation id is- null
- BadUserRequestException- when no user operation could be found
- AuthorizationException-- 
     when no ProcessDefinitionPermissions.UPDATE_HISTORYpermission is granted onResources.PROCESS_DEFINITION
- 
     or when no UserOperationLogCategoryPermissions.UPDATEpermission is granted onResources.OPERATION_LOG_CATEGORY
 
- 
     when no 
- Since:
- 7.12
 
- 
clearAnnotationForOperationLogByIdClear the annotation for user operation log entries. - Parameters:
- operationId- of the user operation log entries that are updated
- Throws:
- NotValidException- when operation id is- null
- BadUserRequestException- when no user operation could be found
- AuthorizationException-- 
     when no ProcessDefinitionPermissions.UPDATE_HISTORYpermission is granted onResources.PROCESS_DEFINITION
- 
     or when no UserOperationLogCategoryPermissions.UPDATEpermission is granted onResources.OPERATION_LOG_CATEGORY
 
- 
     when no 
- Since:
- 7.12
 
 
-