Package org.flowable.engine.impl
Class HistoryServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<ProcessEngineConfigurationImpl>
-
- org.flowable.engine.impl.HistoryServiceImpl
-
- All Implemented Interfaces:
HistoryService
public class HistoryServiceImpl extends CommonEngineServiceImpl<ProcessEngineConfigurationImpl> implements HistoryService
- Author:
- Tom Baeyens, Bernd Ruecker (camunda), Christian Stettler
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration
-
-
Constructor Summary
Constructors Constructor Description HistoryServiceImpl(ProcessEngineConfigurationImpl processEngineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbulkDeleteHistoricProcessInstances(Collection<String> instanceIds)Performs a bulk delete with the provided process instance ids.HistoricActivityInstanceQuerycreateHistoricActivityInstanceQuery()Creates a new programmatic query to search forHistoricActivityInstances.HistoricDetailQuerycreateHistoricDetailQuery()Creates a new programmatic query to search forHistoricDetails.HistoricProcessInstanceQuerycreateHistoricProcessInstanceQuery()Creates a new programmatic query to search forHistoricProcessInstances.org.flowable.task.api.history.HistoricTaskInstanceQuerycreateHistoricTaskInstanceQuery()Creates a new programmatic query to search forHistoricTaskInstances.org.flowable.task.api.history.HistoricTaskLogEntryBuildercreateHistoricTaskLogEntryBuilder()Create new task log entry builder to the log task event without predefined values from the taskorg.flowable.task.api.history.HistoricTaskLogEntryBuildercreateHistoricTaskLogEntryBuilder(org.flowable.task.api.TaskInfo task)Create new task log entry builder to the log task eventorg.flowable.task.api.history.HistoricTaskLogEntryQuerycreateHistoricTaskLogEntryQuery()Returns a newHistoricTaskLogEntryQuerythat can be used to dynamically query task log entries.org.flowable.variable.api.history.HistoricVariableInstanceQuerycreateHistoricVariableInstanceQuery()Creates a new programmatic query to search forHistoricVariableInstances.NativeHistoricActivityInstanceQuerycreateNativeHistoricActivityInstanceQuery()creates a native query to search forHistoricActivityInstances via SQLNativeHistoricDetailQuerycreateNativeHistoricDetailQuery()Returns a newNativeQueryfor process definitions.NativeHistoricProcessInstanceQuerycreateNativeHistoricProcessInstanceQuery()creates a native query to search forHistoricProcessInstances via SQLNativeHistoricTaskInstanceQuerycreateNativeHistoricTaskInstanceQuery()creates a native query to search forHistoricTaskInstances via SQLorg.flowable.task.api.history.NativeHistoricTaskLogEntryQuerycreateNativeHistoricTaskLogEntryQuery()Returns a newNativeHistoricTaskLogEntryQueryforHistoricTaskLogEntrys.org.flowable.variable.api.history.NativeHistoricVariableInstanceQuerycreateNativeHistoricVariableInstanceQuery()Returns a newNativeQueryfor process definitions.ProcessInstanceHistoryLogQuerycreateProcessInstanceHistoryLogQuery(String processInstanceId)Allows to retrieve theProcessInstanceHistoryLogfor one process instance.voiddeleteHistoricProcessInstance(String processInstanceId)Deletes historic process instance.voiddeleteHistoricTaskInstance(String taskId)Deletes historic task instance.voiddeleteHistoricTaskLogEntry(long logNumber)Deletes user task log entry by its log numbervoiddeleteRelatedDataOfRemovedHistoricProcessInstances()Deletes historic identity links, detail info, variable data and entity links for removed process instancesvoiddeleteTaskAndActivityDataOfRemovedHistoricProcessInstances()Deletes historic task and activity data for removed process instancesList<org.flowable.entitylink.api.history.HistoricEntityLink>getHistoricEntityLinkChildrenForProcessInstance(String processInstanceId)Retrieves theHistoricEntityLinks associated with the given process instance.List<org.flowable.entitylink.api.history.HistoricEntityLink>getHistoricEntityLinkChildrenForTask(String taskId)Retrieves theHistoricEntityLinks associated with the given task.List<org.flowable.entitylink.api.history.HistoricEntityLink>getHistoricEntityLinkChildrenWithSameRootAsProcessInstance(String processInstanceId)Retrieves all theHistoricEntityLinks associated with same root as the given process instance.List<org.flowable.entitylink.api.history.HistoricEntityLink>getHistoricEntityLinkParentsForProcessInstance(String processInstanceId)Retrieves theHistoricEntityLinks where the given process instance is referenced.List<org.flowable.entitylink.api.history.HistoricEntityLink>getHistoricEntityLinkParentsForTask(String taskId)Retrieves theHistoricEntityLinks where the given task is referenced.List<org.flowable.identitylink.api.history.HistoricIdentityLink>getHistoricIdentityLinksForProcessInstance(String processInstanceId)Retrieves theHistoricIdentityLinks associated with the given process instance.List<org.flowable.identitylink.api.history.HistoricIdentityLink>getHistoricIdentityLinksForTask(String taskId)Retrieves theHistoricIdentityLinks associated with the given task.-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
-
-
-
Constructor Detail
-
HistoryServiceImpl
public HistoryServiceImpl(ProcessEngineConfigurationImpl processEngineConfiguration)
-
-
Method Detail
-
createHistoricProcessInstanceQuery
public HistoricProcessInstanceQuery createHistoricProcessInstanceQuery()
Description copied from interface:HistoryServiceCreates a new programmatic query to search forHistoricProcessInstances.- Specified by:
createHistoricProcessInstanceQueryin interfaceHistoryService
-
createHistoricActivityInstanceQuery
public HistoricActivityInstanceQuery createHistoricActivityInstanceQuery()
Description copied from interface:HistoryServiceCreates a new programmatic query to search forHistoricActivityInstances.- Specified by:
createHistoricActivityInstanceQueryin interfaceHistoryService
-
createHistoricTaskInstanceQuery
public org.flowable.task.api.history.HistoricTaskInstanceQuery createHistoricTaskInstanceQuery()
Description copied from interface:HistoryServiceCreates a new programmatic query to search forHistoricTaskInstances.- Specified by:
createHistoricTaskInstanceQueryin interfaceHistoryService
-
createHistoricDetailQuery
public HistoricDetailQuery createHistoricDetailQuery()
Description copied from interface:HistoryServiceCreates a new programmatic query to search forHistoricDetails.- Specified by:
createHistoricDetailQueryin interfaceHistoryService
-
createNativeHistoricDetailQuery
public NativeHistoricDetailQuery createNativeHistoricDetailQuery()
Description copied from interface:HistoryServiceReturns a newNativeQueryfor process definitions.- Specified by:
createNativeHistoricDetailQueryin interfaceHistoryService
-
createHistoricVariableInstanceQuery
public org.flowable.variable.api.history.HistoricVariableInstanceQuery createHistoricVariableInstanceQuery()
Description copied from interface:HistoryServiceCreates a new programmatic query to search forHistoricVariableInstances.- Specified by:
createHistoricVariableInstanceQueryin interfaceHistoryService
-
createNativeHistoricVariableInstanceQuery
public org.flowable.variable.api.history.NativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery()
Description copied from interface:HistoryServiceReturns a newNativeQueryfor process definitions.- Specified by:
createNativeHistoricVariableInstanceQueryin interfaceHistoryService
-
deleteHistoricTaskInstance
public void deleteHistoricTaskInstance(String taskId)
Description copied from interface:HistoryServiceDeletes 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.- Specified by:
deleteHistoricTaskInstancein interfaceHistoryService
-
deleteHistoricProcessInstance
public void deleteHistoricProcessInstance(String processInstanceId)
Description copied from interface:HistoryServiceDeletes historic process instance. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstancein interfaceHistoryService
-
bulkDeleteHistoricProcessInstances
public void bulkDeleteHistoricProcessInstances(Collection<String> instanceIds)
Description copied from interface:HistoryServicePerforms a bulk delete with the provided process instance ids. All historic activities, historic tasks and historic details (variable updates, form properties) are deleted as well.- Specified by:
bulkDeleteHistoricProcessInstancesin interfaceHistoryService
-
deleteTaskAndActivityDataOfRemovedHistoricProcessInstances
public void deleteTaskAndActivityDataOfRemovedHistoricProcessInstances()
Description copied from interface:HistoryServiceDeletes historic task and activity data for removed process instances- Specified by:
deleteTaskAndActivityDataOfRemovedHistoricProcessInstancesin interfaceHistoryService
-
deleteRelatedDataOfRemovedHistoricProcessInstances
public void deleteRelatedDataOfRemovedHistoricProcessInstances()
Description copied from interface:HistoryServiceDeletes historic identity links, detail info, variable data and entity links for removed process instances- Specified by:
deleteRelatedDataOfRemovedHistoricProcessInstancesin interfaceHistoryService
-
createNativeHistoricProcessInstanceQuery
public NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery()
Description copied from interface:HistoryServicecreates a native query to search forHistoricProcessInstances via SQL- Specified by:
createNativeHistoricProcessInstanceQueryin interfaceHistoryService
-
createNativeHistoricTaskInstanceQuery
public NativeHistoricTaskInstanceQuery createNativeHistoricTaskInstanceQuery()
Description copied from interface:HistoryServicecreates a native query to search forHistoricTaskInstances via SQL- Specified by:
createNativeHistoricTaskInstanceQueryin interfaceHistoryService
-
createNativeHistoricActivityInstanceQuery
public NativeHistoricActivityInstanceQuery createNativeHistoricActivityInstanceQuery()
Description copied from interface:HistoryServicecreates a native query to search forHistoricActivityInstances via SQL- Specified by:
createNativeHistoricActivityInstanceQueryin interfaceHistoryService
-
getHistoricIdentityLinksForProcessInstance
public List<org.flowable.identitylink.api.history.HistoricIdentityLink> getHistoricIdentityLinksForProcessInstance(String processInstanceId)
Description copied from interface:HistoryServiceRetrieves theHistoricIdentityLinks associated with the given process instance. Such anIdentityLinkinforms how a certain identity (eg. group or user) is associated with a certain process instance, even if the instance is completed as opposed toIdentityLinks which only exist for active instances.- Specified by:
getHistoricIdentityLinksForProcessInstancein interfaceHistoryService
-
getHistoricIdentityLinksForTask
public List<org.flowable.identitylink.api.history.HistoricIdentityLink> getHistoricIdentityLinksForTask(String taskId)
Description copied from interface:HistoryServiceRetrieves theHistoricIdentityLinks associated with the given task. Such anIdentityLinkinforms how a certain identity (eg. group or user) is associated with a certain task (eg. as candidate, assignee, etc.), even if the task is completed as opposed toIdentityLinks which only exist for active tasks.- Specified by:
getHistoricIdentityLinksForTaskin interfaceHistoryService
-
getHistoricEntityLinkChildrenForProcessInstance
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkChildrenForProcessInstance(String processInstanceId)
Description copied from interface:HistoryServiceRetrieves theHistoricEntityLinks associated with the given process instance.- Specified by:
getHistoricEntityLinkChildrenForProcessInstancein interfaceHistoryService
-
getHistoricEntityLinkChildrenWithSameRootAsProcessInstance
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkChildrenWithSameRootAsProcessInstance(String processInstanceId)
Description copied from interface:HistoryServiceRetrieves all theHistoricEntityLinks associated with same root as the given process instance.- Specified by:
getHistoricEntityLinkChildrenWithSameRootAsProcessInstancein interfaceHistoryService
-
getHistoricEntityLinkChildrenForTask
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkChildrenForTask(String taskId)
Description copied from interface:HistoryServiceRetrieves theHistoricEntityLinks associated with the given task.- Specified by:
getHistoricEntityLinkChildrenForTaskin interfaceHistoryService
-
getHistoricEntityLinkParentsForProcessInstance
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkParentsForProcessInstance(String processInstanceId)
Description copied from interface:HistoryServiceRetrieves theHistoricEntityLinks where the given process instance is referenced.- Specified by:
getHistoricEntityLinkParentsForProcessInstancein interfaceHistoryService
-
getHistoricEntityLinkParentsForTask
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkParentsForTask(String taskId)
Description copied from interface:HistoryServiceRetrieves theHistoricEntityLinks where the given task is referenced.- Specified by:
getHistoricEntityLinkParentsForTaskin interfaceHistoryService
-
createProcessInstanceHistoryLogQuery
public ProcessInstanceHistoryLogQuery createProcessInstanceHistoryLogQuery(String processInstanceId)
Description copied from interface:HistoryServiceAllows to retrieve theProcessInstanceHistoryLogfor one process instance.- Specified by:
createProcessInstanceHistoryLogQueryin interfaceHistoryService
-
deleteHistoricTaskLogEntry
public void deleteHistoricTaskLogEntry(long logNumber)
Description copied from interface:HistoryServiceDeletes user task log entry by its log number- Specified by:
deleteHistoricTaskLogEntryin interfaceHistoryService- Parameters:
logNumber- user task log entry identifier
-
createHistoricTaskLogEntryBuilder
public org.flowable.task.api.history.HistoricTaskLogEntryBuilder createHistoricTaskLogEntryBuilder(org.flowable.task.api.TaskInfo task)
Description copied from interface:HistoryServiceCreate new task log entry builder to the log task event- Specified by:
createHistoricTaskLogEntryBuilderin interfaceHistoryService- Parameters:
task- to which is log related to
-
createHistoricTaskLogEntryBuilder
public org.flowable.task.api.history.HistoricTaskLogEntryBuilder createHistoricTaskLogEntryBuilder()
Description copied from interface:HistoryServiceCreate new task log entry builder to the log task event without predefined values from the task- Specified by:
createHistoricTaskLogEntryBuilderin interfaceHistoryService
-
createHistoricTaskLogEntryQuery
public org.flowable.task.api.history.HistoricTaskLogEntryQuery createHistoricTaskLogEntryQuery()
Description copied from interface:HistoryServiceReturns a newHistoricTaskLogEntryQuerythat can be used to dynamically query task log entries.- Specified by:
createHistoricTaskLogEntryQueryin interfaceHistoryService
-
createNativeHistoricTaskLogEntryQuery
public org.flowable.task.api.history.NativeHistoricTaskLogEntryQuery createNativeHistoricTaskLogEntryQuery()
Description copied from interface:HistoryServiceReturns a newNativeHistoricTaskLogEntryQueryforHistoricTaskLogEntrys.- Specified by:
createNativeHistoricTaskLogEntryQueryin interfaceHistoryService
-
-