Package org.flowable.engine.runtime

# Interface ActivityInstanceQuery

All Superinterfaces:
  `Query<ActivityInstanceQuery,ActivityInstance>`

public interface ActivityInstanceQuery extends Query<ActivityInstanceQuery,ActivityInstance>
Programmatic querying for `ActivityInstance`s.

Author:
  martin.grofcik

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query

  `Query.NullHandlingOnOrder`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ActivityInstanceQuery`
  `activityId(String activityId)`
  Only select activity instances for the given activity (id from BPMN 2.0 XML)
  `ActivityInstanceQuery`
  `activityInstanceId(String activityInstanceId)`
  Only select activity instances with the given id (primary key within history tables).
  `ActivityInstanceQuery`
  `activityName(String activityName)`
  Only select activity instances for activities with the given name
  `ActivityInstanceQuery`
  `activityTenantId(String tenantId)`
  Only select activity instances that have the given tenant id.
  `ActivityInstanceQuery`
  `activityTenantIdLike(String tenantIdLike)`
  Only select activity instances with a tenant id like the given one.
  `ActivityInstanceQuery`
  `activityType(String activityType)`
  Only select activity instances for activities with the given activity type
  `ActivityInstanceQuery`
  `activityWithoutTenantId()`
  Only select activity instances that do not have a tenant id.
  `ActivityInstanceQuery`
  `deleteReason(String deleteReason)`
  Only select activity instances with a specific delete reason.
  `ActivityInstanceQuery`
  `deleteReasonLike(String deleteReasonLike)`
  Only select activity instances with a delete reason that matches the provided parameter.
  `ActivityInstanceQuery`
  `executionId(String executionId)`
  Only select activity instances for the given execution
  `ActivityInstanceQuery`
  `finished()`
  Only select activity instances that are finished.
  `ActivityInstanceQuery`
  `orderByActivityId()`
  Order by activityId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByActivityInstanceDuration()`
  Order by duration (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByActivityInstanceEndTime()`
  Order by end (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByActivityInstanceId()`
  Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByActivityInstanceStartTime()`
  Order by start (needs to be followed by `Query.asc()` or `Query.desc()` ).
  `ActivityInstanceQuery`
  `orderByActivityName()`
  Order by activityName (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByActivityType()`
  Order by activityType (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByExecutionId()`
  Order by executionId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByProcessDefinitionId()`
  Order by processDefinitionId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByProcessInstanceId()`
  Order by processInstanceId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `orderByTenantId()`
  Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ActivityInstanceQuery`
  `processDefinitionId(String processDefinitionId)`
  Only select activity instances for the given process definition
  `ActivityInstanceQuery`
  `processInstanceId(String processInstanceId)`
  Only select activity instances with the given process instance.
  `ActivityInstanceQuery`
  `taskAssignee(String userId)`
  Only select activity instances for userTask activities assigned to the given user
  `ActivityInstanceQuery`
  `taskCompletedBy(String userId)`
  Only select activity instances for userTask activities completed by the given user
  `ActivityInstanceQuery`
  `unfinished()`
  Only select activity instances that are not finished yet.

  ### Methods inherited from interface org.flowable.common.engine.api.query.Query

  `asc, count, desc, list, listPage, orderBy, orderBy, singleResult`

- ## Method Details

  - ### activityInstanceId

    ActivityInstanceQuery activityInstanceId(String activityInstanceId)
    Only select activity instances with the given id (primary key within history tables).

  - ### processInstanceId

    ActivityInstanceQuery processInstanceId(String processInstanceId)
    Only select activity instances with the given process instance. `ProcessInstance` ids and `ActivityInstance.getProcessInstanceId()` ids match.

  - ### processDefinitionId

    ActivityInstanceQuery processDefinitionId(String processDefinitionId)
    Only select activity instances for the given process definition

  - ### executionId

    ActivityInstanceQuery executionId(String executionId)
    Only select activity instances for the given execution

  - ### activityId

    ActivityInstanceQuery activityId(String activityId)
    Only select activity instances for the given activity (id from BPMN 2.0 XML)

  - ### activityName

    ActivityInstanceQuery activityName(String activityName)
    Only select activity instances for activities with the given name

  - ### activityType

    ActivityInstanceQuery activityType(String activityType)
    Only select activity instances for activities with the given activity type

  - ### taskAssignee

    ActivityInstanceQuery taskAssignee(String userId)
    Only select activity instances for userTask activities assigned to the given user

  - ### taskCompletedBy

    ActivityInstanceQuery taskCompletedBy(String userId)
    Only select activity instances for userTask activities completed by the given user

  - ### finished

    ActivityInstanceQuery finished()
    Only select activity instances that are finished.

  - ### unfinished

    ActivityInstanceQuery unfinished()
    Only select activity instances that are not finished yet.

  - ### deleteReason

    ActivityInstanceQuery deleteReason(String deleteReason)
    Only select activity instances with a specific delete reason.

  - ### deleteReasonLike

    ActivityInstanceQuery deleteReasonLike(String deleteReasonLike)
    Only select activity instances with a delete reason that matches the provided parameter.

  - ### activityTenantId

    ActivityInstanceQuery activityTenantId(String tenantId)
    Only select activity instances that have the given tenant id.

  - ### activityTenantIdLike

    ActivityInstanceQuery activityTenantIdLike(String tenantIdLike)
    Only select activity instances with a tenant id like the given one.

  - ### activityWithoutTenantId

    ActivityInstanceQuery activityWithoutTenantId()
    Only select activity instances that do not have a tenant id.

  - ### orderByActivityInstanceId

    ActivityInstanceQuery orderByActivityInstanceId()
    Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessInstanceId

    ActivityInstanceQuery orderByProcessInstanceId()
    Order by processInstanceId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByExecutionId

    ActivityInstanceQuery orderByExecutionId()
    Order by executionId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityId

    ActivityInstanceQuery orderByActivityId()
    Order by activityId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityName

    ActivityInstanceQuery orderByActivityName()
    Order by activityName (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityType

    ActivityInstanceQuery orderByActivityType()
    Order by activityType (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityInstanceStartTime

    ActivityInstanceQuery orderByActivityInstanceStartTime()
    Order by start (needs to be followed by `Query.asc()` or `Query.desc()` ).

  - ### orderByActivityInstanceEndTime

    ActivityInstanceQuery orderByActivityInstanceEndTime()
    Order by end (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityInstanceDuration

    ActivityInstanceQuery orderByActivityInstanceDuration()
    Order by duration (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionId

    ActivityInstanceQuery orderByProcessDefinitionId()
    Order by processDefinitionId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByTenantId

    ActivityInstanceQuery orderByTenantId()
    Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).