Uses of Interface
org.camunda.bpm.engine.runtime.ProcessInstanceQuery
Package
Description
Public API of the Camunda Platform engine.
Typical usage of the API starts by the creation of a
Through the services obtained from such a
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
sRuntimeService
:
For starting and searching ProcessInstance
sTaskService
:
Exposes operations to manage human (standalone) Task
s,
such as claiming, completing and assigning tasksIdentityService
:
Used for managing User
s,
Group
s and the relations between themManagementService
:
Exposes engine admin and maintenance operations,
which have no relation to the runtime execution of business processesHistoryService
:
Exposes information about ongoing and past process instances.FormService
:
Access to form data and rendered forms for starting new process instances and completing tasks.API implementation classes, which shouldn't directly be used by end-users.
Classes related to the
ManagementService
.Classes related to the
RuntimeService
.-
Uses of ProcessInstanceQuery in org.camunda.bpm.engine
Modifier and TypeMethodDescriptionRuntimeService.createProcessInstanceQuery()
Creates a newProcessInstanceQuery
instance, that can be used to query process instances.Modifier and TypeMethodDescriptionRuntimeService.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, String deleteReason) Delete an existing runtime process instances asynchronously using Batch operation.RuntimeService.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, String deleteReason, boolean skipCustomListeners) Delete an existing runtime process instances asynchronously using Batch operation.RuntimeService.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses) Delete an existing runtime process instances asynchronously using Batch operation.RuntimeService.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses) Delete an existing runtime process instances asynchronously using Batch operation.RuntimeService.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses, boolean skipIoMappings) Delete an existing runtime process instances asynchronously using Batch operation.RuntimeService.deleteProcessInstancesAsync
(ProcessInstanceQuery processInstanceQuery, String deleteReason) Delete an existing runtime process instances asynchronously using Batch operation.ManagementService.setJobRetriesAsync
(List<String> processInstanceIds, ProcessInstanceQuery query, int retries) Sets the number of retries that jobs have left asynchronously.ManagementService.setJobRetriesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, int retries) Sets the number of retries that jobs have left asynchronously.RuntimeService.setVariablesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, Map<String, ?> variables) Update or create runtime process variables in the root scope of process instances.RuntimeService.setVariablesAsync
(ProcessInstanceQuery processInstanceQuery, Map<String, ?> variables) Update or create runtime process variables in the root scope of process instances. -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.externaltask
Modifier and TypeMethodDescriptionUpdateExternalTaskRetriesSelectBuilder.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) Selects a list of external tasks with the given process instance query. -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl
Modifier and TypeFieldDescriptionprotected ProcessInstanceQuery
MessageCorrelationAsyncBuilderImpl.processInstanceQuery
protected ProcessInstanceQuery
ModificationBuilderImpl.processInstanceQuery
protected ProcessInstanceQuery
UpdateProcessInstancesSuspensionStateBuilderImpl.processInstanceQuery
protected final ProcessInstanceQuery
SetJobsRetriesByProcessBatchCmd.query
Modifier and TypeMethodDescriptionProcessInstanceQueryImpl.active()
ProcessInstanceQueryImpl.activityIdIn
(String... activityIds) ProcessInstanceQueryImpl.caseInstanceId
(String caseInstanceId) RuntimeServiceImpl.createProcessInstanceQuery()
ProcessInstanceQueryImpl.deploymentId
(String deploymentId) ProcessInstanceQueryImpl.endOr()
MessageCorrelationAsyncBuilderImpl.getProcessInstanceQuery()
ModificationBuilderImpl.getProcessInstanceQuery()
UpdateProcessInstancesSuspensionStateBuilderImpl.getProcessInstanceQuery()
ProcessInstanceQueryImpl.incidentId
(String incidentId) ProcessInstanceQueryImpl.incidentMessage
(String incidentMessage) ProcessInstanceQueryImpl.incidentMessageLike
(String incidentMessageLike) ProcessInstanceQueryImpl.incidentType
(String incidentType) ProcessInstanceQueryImpl.leafProcessInstances()
ProcessInstanceQueryImpl.or()
ProcessInstanceQueryImpl.orderByBusinessKey()
ProcessInstanceQueryImpl.orderByProcessDefinitionId()
ProcessInstanceQueryImpl.orderByProcessDefinitionKey()
ProcessInstanceQueryImpl.orderByProcessInstanceId()
ProcessInstanceQueryImpl.orderByTenantId()
ProcessInstanceQueryImpl.processDefinitionKeyIn
(String... processDefinitionKeys) ProcessInstanceQueryImpl.processDefinitionKeyNotIn
(String... processDefinitionKeys) ProcessInstanceQueryImpl.processDefinitionWithoutTenantId()
ProcessInstanceQueryImpl.processInstanceBusinessKey
(String businessKey) ProcessInstanceQueryImpl.processInstanceBusinessKey
(String businessKey, String processDefinitionKey) ProcessInstanceQueryImpl.processInstanceBusinessKeyLike
(String businessKeyLike) ProcessInstanceQueryImpl.processInstanceIds
(Set<String> processInstanceIds) ProcessInstanceQueryImpl.rootProcessInstances()
ProcessInstanceQueryImpl.subCaseInstanceId
(String subCaseInstanceId) ProcessInstanceQueryImpl.subProcessInstanceId
(String subProcessInstanceId) ProcessInstanceQueryImpl.superCaseInstanceId
(String superCaseInstanceId) ProcessInstanceQueryImpl.superProcessInstanceId
(String superProcessInstanceId) ProcessInstanceQueryImpl.suspended()
ProcessInstanceQueryImpl.tenantIdIn
(String... tenantIds) ProcessInstanceQueryImpl.withIncident()
ProcessInstanceQueryImpl.withoutTenantId()
Modifier and TypeMethodDescriptionUpdateProcessInstancesSuspensionStateBuilderImpl.byProcessInstanceQuery
(ProcessInstanceQuery processInstanceQuery) RuntimeServiceImpl.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, String deleteReason) RuntimeServiceImpl.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, String deleteReason, boolean skipCustomListeners) RuntimeServiceImpl.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses) RuntimeServiceImpl.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses) RuntimeServiceImpl.deleteProcessInstancesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses, boolean skipIoMappings) RuntimeServiceImpl.deleteProcessInstancesAsync
(ProcessInstanceQuery processInstanceQuery, String deleteReason) MessageCorrelationAsyncBuilderImpl.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) ModificationBuilderImpl.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) ManagementServiceImpl.setJobRetriesAsync
(List<String> processInstanceIds, ProcessInstanceQuery query, int retries) ManagementServiceImpl.setJobRetriesAsync
(List<String> processInstanceIds, ProcessInstanceQuery query, HistoricProcessInstanceQuery historicProcessInstanceQuery, int retries) RuntimeServiceImpl.setVariablesAsync
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, Map<String, ?> variables) RuntimeServiceImpl.setVariablesAsync
(ProcessInstanceQuery processInstanceQuery, Map<String, ?> variables) ModifierConstructorDescriptionSetJobsRetriesByProcessBatchCmd
(List<String> processInstanceIds, ProcessInstanceQuery query, HistoricProcessInstanceQuery historicProcessInstanceQuery, int retries, Date dueDate, boolean isDueDateSet) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl.cmd
Modifier and TypeFieldDescriptionprotected ProcessInstanceQuery
UpdateExternalTaskRetriesBuilderImpl.processInstanceQuery
Modifier and TypeMethodDescriptionUpdateExternalTaskRetriesBuilderImpl.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl.cmd.batch
Modifier and TypeFieldDescriptionprotected ProcessInstanceQuery
CorrelateAllMessageBatchCmd.processInstanceQuery
protected ProcessInstanceQuery
DeleteProcessInstanceBatchCmd.processInstanceQuery
ModifierConstructorDescriptionDeleteProcessInstanceBatchCmd
(List<String> processInstances, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, String deleteReason, boolean skipCustomListeners, boolean skipSubprocesses, boolean skipIoMappings) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl.cmd.batch.variables
Modifier and TypeFieldDescriptionprotected ProcessInstanceQuery
SetVariablesToProcessInstancesBatchCmd.processInstanceQuery
ModifierConstructorDescriptionSetVariablesToProcessInstancesBatchCmd
(List<String> processInstanceIds, ProcessInstanceQuery processInstanceQuery, HistoricProcessInstanceQuery historicProcessInstanceQuery, Map<String, ?> variables) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl.management
Modifier and TypeFieldDescriptionprotected ProcessInstanceQuery
SetJobRetriesByProcessAsyncBuilderImpl.processInstanceQuery
Modifier and TypeMethodDescriptionSetJobRetriesByProcessAsyncBuilderImpl.processInstanceQuery
(ProcessInstanceQuery query) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl.migration
Modifier and TypeFieldDescriptionprotected ProcessInstanceQuery
MigrationPlanExecutionBuilderImpl.processInstanceQuery
Modifier and TypeMethodDescriptionMigrationPlanExecutionBuilderImpl.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.impl.runtime
Modifier and TypeMethodDescriptionUpdateProcessInstanceSuspensionStateBuilderImpl.byProcessInstanceQuery
(ProcessInstanceQuery processInstanceQuery) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.management
Modifier and TypeMethodDescriptionSetJobRetriesByProcessAsyncBuilder.processInstanceQuery
(ProcessInstanceQuery query) Specifies a process instance query. -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.migration
Modifier and TypeMethodDescriptionMigrationPlanExecutionBuilder.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.rest.dto.runtime
Modifier and TypeMethodDescriptionprotected ProcessInstanceQuery
ProcessInstanceQueryDto.createNewQuery
(ProcessEngine engine) Modifier and TypeMethodDescriptionprotected void
ProcessInstanceQueryDto.applyFilters
(ProcessInstanceQuery query) protected void
ProcessInstanceQueryDto.applySortBy
(ProcessInstanceQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.runtime
Modifier and TypeMethodDescriptionProcessInstanceQuery.active()
Only selects process instances which are active, which means that neither the process instance nor the corresponding process definition are suspended.ProcessInstanceQuery.activityIdIn
(String... activityIds) Only selects process instances with leaf activity instances or transition instances (async before, async after) in at least one of the given activity ids.ProcessInstanceQuery.caseInstanceId
(String caseInstanceId) Selects the process instances which are associated with the given case instance id.ProcessInstanceQuery.deploymentId
(String deploymentId) Selects the process instances which belong to the given deployment id.ProcessInstanceQuery.endOr()
endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied.ProcessInstanceQuery.incidentId
(String incidentId) Only selects process instances with the given incident id.ProcessInstanceQuery.incidentMessage
(String incidentMessage) Only selects process instances with the given incident message.ProcessInstanceQuery.incidentMessageLike
(String incidentMessageLike) Only selects process instances with an incident message like the given.ProcessInstanceQuery.incidentType
(String incidentType) Only selects process instances with the given incident type.ProcessInstanceQuery.leafProcessInstances()
Only selects process instances which don't have subprocesses and thus are leaves of the execution tree.ProcessInstanceQuery.matchVariableNamesIgnoreCase()
The query will match the names of process-variables in a case-insensitive way.ProcessInstanceQuery.matchVariableValuesIgnoreCase()
The query will match the values of process-variables in a case-insensitive way.ProcessInstanceQuery.or()
After calling or(), a chain of several filter criteria could follow.ProcessInstanceQuery.orderByBusinessKey()
Order by the business key (needs to be followed byQuery.asc()
orQuery.desc()
).ProcessInstanceQuery.orderByProcessDefinitionId()
Order by process definition id (needs to be followed byQuery.asc()
orQuery.desc()
).ProcessInstanceQuery.orderByProcessDefinitionKey()
Order by process definition key (needs to be followed byQuery.asc()
orQuery.desc()
).ProcessInstanceQuery.orderByProcessInstanceId()
Order by id (needs to be followed byQuery.asc()
orQuery.desc()
).ProcessInstanceQuery.orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).ProcessInstanceQuery.processDefinitionId
(String processDefinitionId) Selects the process instances which are defined by a process definition with the given id.ProcessInstanceQuery.processDefinitionKey
(String processDefinitionKey) Select the process instances which are defined by a process definition with the given key.ProcessInstanceQuery.processDefinitionKeyIn
(String... processDefinitionKeys) Select the process instances for any given process definition keys.ProcessInstanceQuery.processDefinitionKeyNotIn
(String... processDefinitionKeys) Select historic process instances that don't have a process-definition of which the key is present in the given listProcessInstanceQuery.processDefinitionWithoutTenantId()
Only selects process instances which process definition has no tenant id.ProcessInstanceQuery.processInstanceBusinessKey
(String processInstanceBusinessKey) Select process instances with the given business keyProcessInstanceQuery.processInstanceBusinessKey
(String processInstanceBusinessKey, String processDefinitionKey) Select process instance with the given business key, unique for the given process definitionProcessInstanceQuery.processInstanceBusinessKeyLike
(String processInstanceBusinessKeyLike) Select process instances with a business key like the given value.ProcessInstanceQuery.processInstanceId
(String processInstanceId) Select the process instance with the given idProcessInstanceQuery.processInstanceIds
(Set<String> processInstanceIds) Select process instances whose id is in the given set of idsProcessInstanceQuery.rootProcessInstances()
Only selects process instances which are top level process instances.ProcessInstanceQuery.subCaseInstanceId
(String subCaseInstanceId) Select the process instance that has as sub case instance the given case instance.ProcessInstanceQuery.subProcessInstanceId
(String subProcessInstanceId) Select the process instance that have as sub process instance the given process instance.ProcessInstanceQuery.superCaseInstanceId
(String superCaseInstanceId) Select the process instances which are a sub process instance of the given super case instance.ProcessInstanceQuery.superProcessInstanceId
(String superProcessInstanceId) Select the process instances which are a sub process instance of the given super process instance.ProcessInstanceQuery.suspended()
Only selects process instances which are suspended, either because the process instance itself is suspended or because the corresponding process definition is suspendedProcessInstanceQuery.tenantIdIn
(String... tenantIds) Only select process instances with one of the given tenant ids.ProcessInstanceQuery.variableValueEquals
(String name, Object value) Only select process instances which have a global variable with the given value.ProcessInstanceQuery.variableValueGreaterThan
(String name, Object value) Only select process instances which have a variable value greater than the passed value.ProcessInstanceQuery.variableValueGreaterThanOrEqual
(String name, Object value) Only select process instances which have a global variable value greater than or equal to the passed value.ProcessInstanceQuery.variableValueLessThan
(String name, Object value) Only select process instances which have a global variable value less than the passed value.ProcessInstanceQuery.variableValueLessThanOrEqual
(String name, Object value) Only select process instances which have a global variable value less than or equal to the passed value.ProcessInstanceQuery.variableValueLike
(String name, String value) Only select process instances which have a global variable value like the given value.ProcessInstanceQuery.variableValueNotEquals
(String name, Object value) Only select process instances which have a global variable with the given name, but with a different value than the passed value.ProcessInstanceQuery.withIncident()
Only selects process instances with at least one incident.ProcessInstanceQuery.withoutTenantId()
Only selects process instances which have no tenant id.Modifier and TypeMethodDescriptionUpdateProcessInstancesRequest.byProcessInstanceQuery
(ProcessInstanceQuery processInstanceQuery) Selects a list of process instances with the given a process instance query.MessageCorrelationAsyncBuilder.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) Correlate the message such that the process instances found by the given query are selected.ModificationBuilder.processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) -
Uses of ProcessInstanceQuery in org.camunda.bpm.engine.test.assertions.bpmn
Modifier and TypeMethodDescriptionprotected ProcessInstanceQuery
AbstractProcessAssert.processInstanceQuery()
static ProcessInstanceQuery
BpmnAwareTests.processInstanceQuery()
Helper method to easily create a new ProcessInstanceQueryprotected ProcessInstanceQuery
ProcessDefinitionAssert.processInstanceQuery()
protected ProcessInstanceQuery
ProcessInstanceAssert.processInstanceQuery()
Modifier and TypeMethodDescriptionstatic ProcessInstance
BpmnAwareTests.calledProcessInstance
(ProcessInstanceQuery processInstanceQuery) Helper method to easily access the only called process instance compliant to a given processInstanceQuery and currently available in the context of the last asserted process instance.static ProcessInstance
BpmnAwareTests.calledProcessInstance
(ProcessInstanceQuery processInstanceQuery, ProcessInstance processInstance) Helper method to easily access the only called process instance compliant to a given processInstanceQuery and currently available in the context of the given process instance.ProcessInstanceAssert.calledProcessInstance
(ProcessInstanceQuery query) Enter into a chained process instance assert inspecting a called process instance called by and currently available in the context of the process instance under test of this ProcessInstanceAssert. -
Uses of ProcessInstanceQuery in org.camunda.bpm.qa.upgrade