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<org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl>
-
- org.flowable.engine.impl.HistoryServiceImpl
-
- All Implemented Interfaces:
HistoryService
public class HistoryServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl> implements HistoryService
- Author:
- Tom Baeyens, Bernd Ruecker (camunda), Christian Stettler
-
-
Constructor Summary
Constructors Constructor Description HistoryServiceImpl(org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl processEngineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bulkDeleteHistoricProcessInstances(Collection<String> instanceIds)
Performs a bulk delete with the provided process instance ids.HistoricActivityInstanceQuery
createHistoricActivityInstanceQuery()
Creates a new programmatic query to search forHistoricActivityInstance
s.HistoricDetailQuery
createHistoricDetailQuery()
Creates a new programmatic query to search forHistoricDetail
s.HistoricProcessInstanceQuery
createHistoricProcessInstanceQuery()
Creates a new programmatic query to search forHistoricProcessInstance
s.org.flowable.task.api.history.HistoricTaskInstanceQuery
createHistoricTaskInstanceQuery()
Creates a new programmatic query to search forHistoricTaskInstance
s.org.flowable.task.api.history.HistoricTaskLogEntryBuilder
createHistoricTaskLogEntryBuilder()
Create new task log entry builder to the log task event without predefined values from the taskorg.flowable.task.api.history.HistoricTaskLogEntryBuilder
createHistoricTaskLogEntryBuilder(org.flowable.task.api.TaskInfo task)
Create new task log entry builder to the log task eventorg.flowable.task.api.history.HistoricTaskLogEntryQuery
createHistoricTaskLogEntryQuery()
Returns a newHistoricTaskLogEntryQuery
that can be used to dynamically query task log entries.org.flowable.variable.api.history.HistoricVariableInstanceQuery
createHistoricVariableInstanceQuery()
Creates a new programmatic query to search forHistoricVariableInstance
s.NativeHistoricActivityInstanceQuery
createNativeHistoricActivityInstanceQuery()
creates a native query to search forHistoricActivityInstance
s via SQLNativeHistoricDetailQuery
createNativeHistoricDetailQuery()
Returns a newNativeQuery
for process definitions.NativeHistoricProcessInstanceQuery
createNativeHistoricProcessInstanceQuery()
creates a native query to search forHistoricProcessInstance
s via SQLorg.flowable.task.service.history.NativeHistoricTaskInstanceQuery
createNativeHistoricTaskInstanceQuery()
creates a native query to search forHistoricTaskInstance
s via SQLorg.flowable.task.api.history.NativeHistoricTaskLogEntryQuery
createNativeHistoricTaskLogEntryQuery()
Returns a newNativeHistoricTaskLogEntryQuery
forHistoricTaskLogEntry
s.org.flowable.variable.api.history.NativeHistoricVariableInstanceQuery
createNativeHistoricVariableInstanceQuery()
Returns a newNativeQuery
for process definitions.ProcessInstanceHistoryLogQuery
createProcessInstanceHistoryLogQuery(String processInstanceId)
Allows to retrieve theProcessInstanceHistoryLog
for one process instance.void
deleteHistoricProcessInstance(String processInstanceId)
Deletes historic process instance.void
deleteHistoricTaskInstance(String taskId)
Deletes historic task instance.void
deleteHistoricTaskLogEntry(long logNumber)
Deletes user task log entry by its log numbervoid
deleteRelatedDataOfRemovedHistoricProcessInstances()
Deletes historic identity links, detail info, variable data and entity links for removed process instancesvoid
deleteTaskAndActivityDataOfRemovedHistoricProcessInstances()
Deletes historic task and activity data for removed process instancesList<org.flowable.entitylink.api.history.HistoricEntityLink>
getHistoricEntityLinkChildrenForProcessInstance(String processInstanceId)
Retrieves theHistoricEntityLink
s associated with the given process instance.List<org.flowable.entitylink.api.history.HistoricEntityLink>
getHistoricEntityLinkChildrenForTask(String taskId)
Retrieves theHistoricEntityLink
s associated with the given task.List<org.flowable.entitylink.api.history.HistoricEntityLink>
getHistoricEntityLinkChildrenWithSameRootAsProcessInstance(String processInstanceId)
Retrieves all theHistoricEntityLink
s associated with same root as the given process instance.List<org.flowable.entitylink.api.history.HistoricEntityLink>
getHistoricEntityLinkParentsForProcessInstance(String processInstanceId)
Retrieves theHistoricEntityLink
s where the given process instance is referenced.List<org.flowable.entitylink.api.history.HistoricEntityLink>
getHistoricEntityLinkParentsForTask(String taskId)
Retrieves theHistoricEntityLink
s where the given task is referenced.List<org.flowable.identitylink.api.history.HistoricIdentityLink>
getHistoricIdentityLinksForProcessInstance(String processInstanceId)
Retrieves theHistoricIdentityLink
s associated with the given process instance.List<org.flowable.identitylink.api.history.HistoricIdentityLink>
getHistoricIdentityLinksForTask(String taskId)
Retrieves theHistoricIdentityLink
s associated with the given task.-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
-
-
-
Method Detail
-
createHistoricProcessInstanceQuery
public HistoricProcessInstanceQuery createHistoricProcessInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricProcessInstance
s.- Specified by:
createHistoricProcessInstanceQuery
in interfaceHistoryService
-
createHistoricActivityInstanceQuery
public HistoricActivityInstanceQuery createHistoricActivityInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricActivityInstance
s.- Specified by:
createHistoricActivityInstanceQuery
in interfaceHistoryService
-
createHistoricTaskInstanceQuery
public org.flowable.task.api.history.HistoricTaskInstanceQuery createHistoricTaskInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricTaskInstance
s.- Specified by:
createHistoricTaskInstanceQuery
in interfaceHistoryService
-
createHistoricDetailQuery
public HistoricDetailQuery createHistoricDetailQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricDetail
s.- Specified by:
createHistoricDetailQuery
in interfaceHistoryService
-
createNativeHistoricDetailQuery
public NativeHistoricDetailQuery createNativeHistoricDetailQuery()
Description copied from interface:HistoryService
Returns a newNativeQuery
for process definitions.- Specified by:
createNativeHistoricDetailQuery
in interfaceHistoryService
-
createHistoricVariableInstanceQuery
public org.flowable.variable.api.history.HistoricVariableInstanceQuery createHistoricVariableInstanceQuery()
Description copied from interface:HistoryService
Creates a new programmatic query to search forHistoricVariableInstance
s.- Specified by:
createHistoricVariableInstanceQuery
in interfaceHistoryService
-
createNativeHistoricVariableInstanceQuery
public org.flowable.variable.api.history.NativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery()
Description copied from interface:HistoryService
Returns a newNativeQuery
for process definitions.- Specified by:
createNativeHistoricVariableInstanceQuery
in interfaceHistoryService
-
deleteHistoricTaskInstance
public void deleteHistoricTaskInstance(String taskId)
Description copied from interface:HistoryService
Deletes historic task instance. This might be useful for tasks that aredynamically created
and thencompleted
. If the historic task instance doesn't exist, no exception is thrown and the method returns normal.- Specified by:
deleteHistoricTaskInstance
in interfaceHistoryService
-
deleteHistoricProcessInstance
public void deleteHistoricProcessInstance(String processInstanceId)
Description copied from interface:HistoryService
Deletes historic process instance. All historic activities, historic task and historic details (variable updates, form properties) are deleted as well.- Specified by:
deleteHistoricProcessInstance
in interfaceHistoryService
-
bulkDeleteHistoricProcessInstances
public void bulkDeleteHistoricProcessInstances(Collection<String> instanceIds)
Description copied from interface:HistoryService
Performs 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:
bulkDeleteHistoricProcessInstances
in interfaceHistoryService
-
deleteTaskAndActivityDataOfRemovedHistoricProcessInstances
public void deleteTaskAndActivityDataOfRemovedHistoricProcessInstances()
Description copied from interface:HistoryService
Deletes historic task and activity data for removed process instances- Specified by:
deleteTaskAndActivityDataOfRemovedHistoricProcessInstances
in interfaceHistoryService
-
deleteRelatedDataOfRemovedHistoricProcessInstances
public void deleteRelatedDataOfRemovedHistoricProcessInstances()
Description copied from interface:HistoryService
Deletes historic identity links, detail info, variable data and entity links for removed process instances- Specified by:
deleteRelatedDataOfRemovedHistoricProcessInstances
in interfaceHistoryService
-
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 org.flowable.task.service.history.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
-
getHistoricIdentityLinksForProcessInstance
public List<org.flowable.identitylink.api.history.HistoricIdentityLink> getHistoricIdentityLinksForProcessInstance(String processInstanceId)
Description copied from interface:HistoryService
Retrieves theHistoricIdentityLink
s associated with the given process instance. Such anIdentityLink
informs how a certain identity (eg. group or user) is associated with a certain process instance, even if the instance is completed as opposed toIdentityLink
s which only exist for active instances.- Specified by:
getHistoricIdentityLinksForProcessInstance
in interfaceHistoryService
-
getHistoricIdentityLinksForTask
public List<org.flowable.identitylink.api.history.HistoricIdentityLink> getHistoricIdentityLinksForTask(String taskId)
Description copied from interface:HistoryService
Retrieves theHistoricIdentityLink
s associated with the given task. Such anIdentityLink
informs 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 toIdentityLink
s which only exist for active tasks.- Specified by:
getHistoricIdentityLinksForTask
in interfaceHistoryService
-
getHistoricEntityLinkChildrenForProcessInstance
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkChildrenForProcessInstance(String processInstanceId)
Description copied from interface:HistoryService
Retrieves theHistoricEntityLink
s associated with the given process instance.- Specified by:
getHistoricEntityLinkChildrenForProcessInstance
in interfaceHistoryService
-
getHistoricEntityLinkChildrenWithSameRootAsProcessInstance
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkChildrenWithSameRootAsProcessInstance(String processInstanceId)
Description copied from interface:HistoryService
Retrieves all theHistoricEntityLink
s associated with same root as the given process instance.- Specified by:
getHistoricEntityLinkChildrenWithSameRootAsProcessInstance
in interfaceHistoryService
-
getHistoricEntityLinkChildrenForTask
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkChildrenForTask(String taskId)
Description copied from interface:HistoryService
Retrieves theHistoricEntityLink
s associated with the given task.- Specified by:
getHistoricEntityLinkChildrenForTask
in interfaceHistoryService
-
getHistoricEntityLinkParentsForProcessInstance
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkParentsForProcessInstance(String processInstanceId)
Description copied from interface:HistoryService
Retrieves theHistoricEntityLink
s where the given process instance is referenced.- Specified by:
getHistoricEntityLinkParentsForProcessInstance
in interfaceHistoryService
-
getHistoricEntityLinkParentsForTask
public List<org.flowable.entitylink.api.history.HistoricEntityLink> getHistoricEntityLinkParentsForTask(String taskId)
Description copied from interface:HistoryService
Retrieves theHistoricEntityLink
s where the given task is referenced.- Specified by:
getHistoricEntityLinkParentsForTask
in interfaceHistoryService
-
createProcessInstanceHistoryLogQuery
public ProcessInstanceHistoryLogQuery createProcessInstanceHistoryLogQuery(String processInstanceId)
Description copied from interface:HistoryService
Allows to retrieve theProcessInstanceHistoryLog
for one process instance.- Specified by:
createProcessInstanceHistoryLogQuery
in interfaceHistoryService
-
deleteHistoricTaskLogEntry
public void deleteHistoricTaskLogEntry(long logNumber)
Description copied from interface:HistoryService
Deletes user task log entry by its log number- Specified by:
deleteHistoricTaskLogEntry
in 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:HistoryService
Create new task log entry builder to the log task event- Specified by:
createHistoricTaskLogEntryBuilder
in interfaceHistoryService
- Parameters:
task
- to which is log related to
-
createHistoricTaskLogEntryBuilder
public org.flowable.task.api.history.HistoricTaskLogEntryBuilder createHistoricTaskLogEntryBuilder()
Description copied from interface:HistoryService
Create new task log entry builder to the log task event without predefined values from the task- Specified by:
createHistoricTaskLogEntryBuilder
in interfaceHistoryService
-
createHistoricTaskLogEntryQuery
public org.flowable.task.api.history.HistoricTaskLogEntryQuery createHistoricTaskLogEntryQuery()
Description copied from interface:HistoryService
Returns a newHistoricTaskLogEntryQuery
that can be used to dynamically query task log entries.- Specified by:
createHistoricTaskLogEntryQuery
in interfaceHistoryService
-
createNativeHistoricTaskLogEntryQuery
public org.flowable.task.api.history.NativeHistoricTaskLogEntryQuery createNativeHistoricTaskLogEntryQuery()
Description copied from interface:HistoryService
Returns a newNativeHistoricTaskLogEntryQuery
forHistoricTaskLogEntry
s.- Specified by:
createNativeHistoricTaskLogEntryQuery
in interfaceHistoryService
-
-