org.activiti.engine

## Interface HistoryService

-     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
    Modifier and Type | Method and Description
    --- | ---
    `HistoricActivityInstanceQuery` | `createHistoricActivityInstanceQuery()` Creates a new programmatic query to search for `HistoricActivityInstance`s.
    `HistoricDetailQuery` | `createHistoricDetailQuery()` Creates a new programmatic query to search for `HistoricDetail`s.
    `HistoricProcessInstanceQuery` | `createHistoricProcessInstanceQuery()` Creates a new programmatic query to search for `HistoricProcessInstance`s.
    `HistoricTaskInstanceQuery` | `createHistoricTaskInstanceQuery()` Creates a new programmatic query to search for `HistoricTaskInstance`s.
    `HistoricVariableInstanceQuery` | `createHistoricVariableInstanceQuery()` Creates a new programmatic query to search for `HistoricVariableInstance`s.
    `NativeHistoricActivityInstanceQuery` | `createNativeHistoricActivityInstanceQuery()` creates a native query to search for `HistoricActivityInstance`s via SQL
    `NativeHistoricDetailQuery` | `createNativeHistoricDetailQuery()` Returns a new `NativeQuery` for process definitions.
    `NativeHistoricProcessInstanceQuery` | `createNativeHistoricProcessInstanceQuery()` creates a native query to search for `HistoricProcessInstance`s via SQL
    `NativeHistoricTaskInstanceQuery` | `createNativeHistoricTaskInstanceQuery()` creates a native query to search for `HistoricTaskInstance`s via SQL
    `NativeHistoricVariableInstanceQuery` | `createNativeHistoricVariableInstanceQuery()` Returns a new `NativeQuery` for process definitions.
    `ProcessInstanceHistoryLogQuery` | `createProcessInstanceHistoryLogQuery(String processInstanceId)` Allows to retrieve the `ProcessInstanceHistoryLog` for one process instance.
    `void` | `deleteHistoricProcessInstance(String processInstanceId)` Deletes historic process instance.
    `void` | `deleteHistoricTaskInstance(String taskId)` Deletes historic task instance.
    `List<HistoricIdentityLink>` | `getHistoricIdentityLinksForProcessInstance(String processInstanceId)` Retrieves the `HistoricIdentityLink`s associated with the given process instance.
    `List<HistoricIdentityLink>` | `getHistoricIdentityLinksForTask(String taskId)` Retrieves the `HistoricIdentityLink`s associated with the given task.

- - ### Method Detail

    - #### createHistoricProcessInstanceQuery

          HistoricProcessInstanceQuery createHistoricProcessInstanceQuery()

      Creates a new programmatic query to search for `HistoricProcessInstance`s.

    - #### createHistoricActivityInstanceQuery

          HistoricActivityInstanceQuery createHistoricActivityInstanceQuery()

      Creates a new programmatic query to search for `HistoricActivityInstance`s.

    - #### createHistoricTaskInstanceQuery

          HistoricTaskInstanceQuery createHistoricTaskInstanceQuery()

      Creates a new programmatic query to search for `HistoricTaskInstance`s.

    - #### createHistoricDetailQuery

          HistoricDetailQuery createHistoricDetailQuery()

      Creates a new programmatic query to search for `HistoricDetail`s.

    - #### createNativeHistoricDetailQuery

          NativeHistoricDetailQuery createNativeHistoricDetailQuery()

      Returns a new `NativeQuery` for process definitions.

    - #### createHistoricVariableInstanceQuery

          HistoricVariableInstanceQuery createHistoricVariableInstanceQuery()

      Creates a new programmatic query to search for `HistoricVariableInstance`s.

    - #### createNativeHistoricVariableInstanceQuery

          NativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery()

      Returns a new `NativeQuery` for process definitions.

    - #### deleteHistoricTaskInstance

          void deleteHistoricTaskInstance(String taskId)

      Deletes historic task instance. This might be useful for tasks that are `dynamically created` and then `completed`. If the historic task instance doesn't exist, no exception is thrown and the method returns normal.

    - #### 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.

    - #### createNativeHistoricProcessInstanceQuery

          NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery()

      creates a native query to search for `HistoricProcessInstance`s via SQL

    - #### createNativeHistoricTaskInstanceQuery

          NativeHistoricTaskInstanceQuery createNativeHistoricTaskInstanceQuery()

      creates a native query to search for `HistoricTaskInstance`s via SQL

    - #### createNativeHistoricActivityInstanceQuery

          NativeHistoricActivityInstanceQuery createNativeHistoricActivityInstanceQuery()

      creates a native query to search for `HistoricActivityInstance`s via SQL

    - #### getHistoricIdentityLinksForTask

          List<HistoricIdentityLink> getHistoricIdentityLinksForTask(String taskId)

      Retrieves the `HistoricIdentityLink`s associated with the given task. Such an `IdentityLink` 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 to `IdentityLink`s which only exist for active tasks.

    - #### getHistoricIdentityLinksForProcessInstance

          List<HistoricIdentityLink> getHistoricIdentityLinksForProcessInstance(String processInstanceId)

      Retrieves the `HistoricIdentityLink`s associated with the given process instance. Such an `IdentityLink` informs how a certain identity (eg. group or user) is associated with a certain process instance, even if the instance is completed as opposed to `IdentityLink`s which only exist for active instances.

    - #### createProcessInstanceHistoryLogQuery

          ProcessInstanceHistoryLogQuery createProcessInstanceHistoryLogQuery(String processInstanceId)

      Allows to retrieve the `ProcessInstanceHistoryLog` for one process instance.

Copyright © 2016 Alfresco. All rights reserved.