# Uses of Interface
org.flowable.engine.history.HistoricActivityInstanceQuery

Packages that use HistoricActivityInstanceQuery
Package
Description
org.flowable.engine
Public API of the Flowable engine.
Typical usage of the API starts by the creation of a `ProcessEngineConfiguration` (typically based on a configuration file), from which a `ProcessEngine` can be obtained.
Through the services obtained from such a `ProcessEngine`, BPM and workflow operation can be executed:
`RepositoryService`: Manages `Deployment`s.
`RuntimeService`: For starting and searching `ProcessInstance`s.
`TaskService`: Exposes operations to manage human (standalone) tasks, such as claiming, completing and assigning tasks.
`IdentityService`: Used for managing users, groups and the relations between them.
`ManagementService`: Exposes engine administration and maintenance operations, which have no relation to the runtime exection of business processes.
`HistoryService`: Exposes information about ongoing and past process instances.
`FormService`: Access to form data and rendered forms for starting new process instances and completing tasks.
org.flowable.engine.history
Classes related to the `HistoryService`.

- ## Uses of HistoricActivityInstanceQuery in org.flowable.engine

  Methods in org.flowable.engine that return HistoricActivityInstanceQuery
  Modifier and Type
  Method
  Description
  `HistoricActivityInstanceQuery`
  HistoryService.`createHistoricActivityInstanceQuery()`
  Creates a new programmatic query to search for `HistoricActivityInstance`s.

- ## Uses of HistoricActivityInstanceQuery in org.flowable.engine.history

  Methods in org.flowable.engine.history that return HistoricActivityInstanceQuery
  Modifier and Type
  Method
  Description
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityId(String activityId)`
  Only select historic activity instances for the given activity (id from BPMN 2.0 XML)
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityInstanceId(String activityInstanceId)`
  Only select historic activity instances with the given id (primary key within history tables).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityName(String activityName)`
  Only select historic activity instances for activities with the given name
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityTenantId(String tenantId)`
  Only select historic activity instances that have the given tenant id.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityTenantIdLike(String tenantIdLike)`
  Only select historic activity instances with a tenant id like the given one.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityType(String activityType)`
  Only select historic activity instances for activities with the given activity type
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityTypes(Set<String> activityTypes)`
  Only select historic activity instances whose activity type is in the given set of activity types.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`activityWithoutTenantId()`
  Only select historic activity instances that do not have a tenant id.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`deleteReason(String deleteReason)`
  Only select historic activity instances with a specific delete reason.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`deleteReasonLike(String deleteReasonLike)`
  Only select historic activity instances with a delete reason that matches the provided parameter.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`executionId(String executionId)`
  Only select historic activity instances for the given execution
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`finished()`
  Only select historic activity instances that are finished.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`finishedAfter(Date date)`
  Only select historic activity instances that were started after the given date.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`finishedBefore(Date date)`
  Only select historic activity instances that were started before the given date.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByActivityId()`
  Order by activityId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByActivityName()`
  Order by activityName (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByActivityType()`
  Order by activityType (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByExecutionId()`
  Order by executionId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByHistoricActivityInstanceDuration()`
  Order by duration (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByHistoricActivityInstanceEndTime()`
  Order by end (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByHistoricActivityInstanceId()`
  Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByHistoricActivityInstanceStartTime()`
  Order by start (needs to be followed by `Query.asc()` or `Query.desc()` ).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByProcessDefinitionId()`
  Order by processDefinitionId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByProcessInstanceId()`
  Order by processInstanceId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`orderByTenantId()`
  Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`processDefinitionId(String processDefinitionId)`
  Only select historic activity instances for the given process definition
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`processInstanceId(String processInstanceId)`
  Only select historic activity instances with the given process instance.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`startedAfter(Date date)`
  Only select historic activity instances that were started after the given date.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`startedBefore(Date date)`
  Only select historic activity instances that were started before the given date.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`taskAssignee(String userId)`
  Only select historic activity instances for userTask activities assigned to the given user
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`taskCompletedBy(String userId)`
  Only select historic activity instances for userTask activities completed by the given user
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`tenantIdIn(List<String> tenantIds)`
  Only select historic activity instances with one of the given tenant ids.
  `HistoricActivityInstanceQuery`
  HistoricActivityInstanceQuery.`unfinished()`
  Only select historic activity instances that are not finished yet.