public class ProcessInstanceQueryImpl extends AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance> implements ProcessInstanceQuery, Serializable
AbstractQuery.ResultType
queryVariableValues, variableNamesIgnoreCase, variableValuesIgnoreCase
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
Constructor and Description |
---|
ProcessInstanceQueryImpl() |
ProcessInstanceQueryImpl(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
ProcessInstanceQuery |
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.
|
void |
addOrQuery(ProcessInstanceQueryImpl orQuery) |
ProcessInstanceQuery |
caseInstanceId(String caseInstanceId)
Selects the process instances which are associated with the given case instance id.
|
protected void |
checkQueryOk() |
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.
|
protected void |
ensureVariablesInitialized() |
long |
executeCount(CommandContext commandContext) |
List<ImmutablePair<String,String>> |
executeDeploymentIdMappingsList(CommandContext commandContext) |
List<String> |
executeIdsList(CommandContext commandContext) |
List<ProcessInstance> |
executeList(CommandContext commandContext,
Page page)
Executes the actual query to retrieve the list of results.
|
String[] |
getActivityIds() |
String |
getBusinessKey() |
String |
getBusinessKeyLike() |
String |
getCaseInstanceId() |
String |
getDeploymentId() |
String |
getIncidentId() |
String |
getIncidentMessage() |
String |
getIncidentMessageLike() |
String |
getIncidentType() |
String |
getProcessDefinitionId() |
String |
getProcessDefinitionKey() |
String[] |
getProcessDefinitionKeyNotIn() |
String[] |
getProcessDefinitionKeys() |
String |
getProcessInstanceId() |
Set<String> |
getProcessInstanceIds() |
List<ProcessInstanceQueryImpl> |
getQueries() |
String |
getSubCaseInstanceId() |
String |
getSubProcessInstanceId() |
String |
getSuperCaseInstanceId() |
String |
getSuperProcessInstanceId() |
SuspensionState |
getSuspensionState() |
String[] |
getTenantIds() |
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.
|
boolean |
isLeafProcessInstances() |
boolean |
isOrQueryActive() |
boolean |
isProcessDefinitionWithoutTenantId() |
boolean |
isRootProcessInstances() |
boolean |
isTenantIdSet() |
boolean |
isWithIncident() |
ProcessInstanceQuery |
leafProcessInstances()
Only selects process instances which don't have subprocesses and thus are leaves of the execution tree.
|
ProcessInstanceQuery |
or()
After calling or(), a chain of several filter criteria could follow.
|
ProcessInstanceQuery |
orderByBusinessKey()
Order by the business key (needs to be followed by
Query.asc() or Query.desc() ). |
ProcessInstanceQuery |
orderByProcessDefinitionId()
Order by process definition id (needs to be followed by
Query.asc() or Query.desc() ). |
ProcessInstanceQuery |
orderByProcessDefinitionKey()
Order by process definition key (needs to be followed by
Query.asc() or Query.desc() ). |
ProcessInstanceQuery |
orderByProcessInstanceId()
Order by id (needs to be followed by
Query.asc() or Query.desc() ). |
ProcessInstanceQuery |
orderByTenantId()
Order by tenant id (needs to be followed by
Query.asc() or Query.desc() ). |
ProcessInstanceQueryImpl |
processDefinitionId(String processDefinitionId)
Selects the process instances which are defined by a process definition
with the given id.
|
ProcessInstanceQueryImpl |
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 list
|
ProcessInstanceQuery |
processDefinitionWithoutTenantId()
Only selects process instances which process definition has no tenant id.
|
ProcessInstanceQuery |
processInstanceBusinessKey(String businessKey)
Select process instances with the given business key
|
ProcessInstanceQuery |
processInstanceBusinessKey(String businessKey,
String processDefinitionKey)
Select process instance with the given business key, unique for the given process definition
|
ProcessInstanceQuery |
processInstanceBusinessKeyLike(String businessKeyLike)
Select process instances with a business key like the given value.
|
ProcessInstanceQueryImpl |
processInstanceId(String processInstanceId)
Select the process instance with the given id
|
ProcessInstanceQuery |
processInstanceIds(Set<String> processInstanceIds)
Select process instances whose id is in the given set of ids
|
ProcessInstanceQuery |
rootProcessInstances()
Only selects process instances which are top level process instances.
|
void |
setOrQueryActive() |
void |
setSuspensionState(SuspensionState suspensionState) |
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 suspended
|
ProcessInstanceQuery |
tenantIdIn(String... tenantIds)
Only select process instances with one of the given tenant ids.
|
ProcessInstanceQuery |
withIncident()
Only selects process instances with at least one incident.
|
ProcessInstanceQuery |
withoutTenantId()
Only selects process instances which have no tenant id.
|
addVariable, getQueryVariableValues, isVariableNamesIgnoreCase, isVariableValuesIgnoreCase, matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
addExpression, addValidator, asc, checkMaxResultsLimit, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeResult, executeSingleResult, extend, getExpressions, getMethod, hasExcludingConditions, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validate
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
asc, count, desc, list, listPage, singleResult, unlimitedList
protected String processInstanceId
protected String businessKey
protected String businessKeyLike
protected String processDefinitionId
protected String processDefinitionKey
protected String[] processDefinitionKeys
protected String[] processDefinitionKeyNotIn
protected String deploymentId
protected String superProcessInstanceId
protected String subProcessInstanceId
protected SuspensionState suspensionState
protected boolean withIncident
protected String incidentType
protected String incidentId
protected String incidentMessage
protected String incidentMessageLike
protected String caseInstanceId
protected String superCaseInstanceId
protected String subCaseInstanceId
protected String[] activityIds
protected boolean isRootProcessInstances
protected boolean isLeafProcessInstances
protected boolean isTenantIdSet
protected String[] tenantIds
protected boolean isProcessDefinitionWithoutTenantId
protected List<ProcessInstanceQueryImpl> queries
protected boolean isOrQueryActive
public ProcessInstanceQueryImpl()
public ProcessInstanceQueryImpl(CommandExecutor commandExecutor)
public ProcessInstanceQueryImpl processInstanceId(String processInstanceId)
ProcessInstanceQuery
processInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
ProcessInstanceQuery
processInstanceIds
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceBusinessKey(String businessKey)
ProcessInstanceQuery
processInstanceBusinessKey
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceBusinessKey(String businessKey, String processDefinitionKey)
ProcessInstanceQuery
processInstanceBusinessKey
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceBusinessKeyLike(String businessKeyLike)
ProcessInstanceQuery
processInstanceBusinessKeyLike
in interface ProcessInstanceQuery
businessKeyLike
- The string can include the wildcard character '%' to express
like-strategy: starts with (string%), ends with (%string) or contains (%string%).public ProcessInstanceQueryImpl processDefinitionId(String processDefinitionId)
ProcessInstanceQuery
processDefinitionId
in interface ProcessInstanceQuery
public ProcessInstanceQueryImpl processDefinitionKey(String processDefinitionKey)
ProcessInstanceQuery
processDefinitionKey
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionKeyIn(String... processDefinitionKeys)
ProcessInstanceQuery
processDefinitionKeyIn
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionKeyNotIn(String... processDefinitionKeys)
ProcessInstanceQuery
processDefinitionKeyNotIn
in interface ProcessInstanceQuery
public ProcessInstanceQuery deploymentId(String deploymentId)
ProcessInstanceQuery
deploymentId
in interface ProcessInstanceQuery
public ProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
ProcessInstanceQuery
superProcessInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId)
ProcessInstanceQuery
subProcessInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery caseInstanceId(String caseInstanceId)
ProcessInstanceQuery
caseInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery superCaseInstanceId(String superCaseInstanceId)
ProcessInstanceQuery
superCaseInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery subCaseInstanceId(String subCaseInstanceId)
ProcessInstanceQuery
subCaseInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery orderByProcessInstanceId()
ProcessInstanceQuery
Query.asc()
or Query.desc()
).orderByProcessInstanceId
in interface ProcessInstanceQuery
public ProcessInstanceQuery orderByProcessDefinitionId()
ProcessInstanceQuery
Query.asc()
or Query.desc()
).orderByProcessDefinitionId
in interface ProcessInstanceQuery
public ProcessInstanceQuery orderByProcessDefinitionKey()
ProcessInstanceQuery
Query.asc()
or Query.desc()
).orderByProcessDefinitionKey
in interface ProcessInstanceQuery
public ProcessInstanceQuery orderByTenantId()
ProcessInstanceQuery
Query.asc()
or Query.desc()
).
Note that the ordering of process instances without tenant id is database-specific.orderByTenantId
in interface ProcessInstanceQuery
public ProcessInstanceQuery orderByBusinessKey()
ProcessInstanceQuery
Query.asc()
or Query.desc()
).orderByBusinessKey
in interface ProcessInstanceQuery
public ProcessInstanceQuery active()
ProcessInstanceQuery
active
in interface ProcessInstanceQuery
public ProcessInstanceQuery suspended()
ProcessInstanceQuery
suspended
in interface ProcessInstanceQuery
public ProcessInstanceQuery withIncident()
ProcessInstanceQuery
withIncident
in interface ProcessInstanceQuery
public ProcessInstanceQuery incidentType(String incidentType)
ProcessInstanceQuery
incidentType
in interface ProcessInstanceQuery
public ProcessInstanceQuery incidentId(String incidentId)
ProcessInstanceQuery
incidentId
in interface ProcessInstanceQuery
public ProcessInstanceQuery incidentMessage(String incidentMessage)
ProcessInstanceQuery
incidentMessage
in interface ProcessInstanceQuery
public ProcessInstanceQuery incidentMessageLike(String incidentMessageLike)
ProcessInstanceQuery
incidentMessageLike
in interface ProcessInstanceQuery
public ProcessInstanceQuery tenantIdIn(String... tenantIds)
ProcessInstanceQuery
tenantIdIn
in interface ProcessInstanceQuery
public ProcessInstanceQuery withoutTenantId()
ProcessInstanceQuery
withoutTenantId
in interface ProcessInstanceQuery
public ProcessInstanceQuery activityIdIn(String... activityIds)
ProcessInstanceQuery
Only selects process instances with leaf activity instances or transition instances (async before, async after) in at least one of the given activity ids.
Leaf instance means this filter works for instances of a user task is matched, but not the embedded sub process it is contained in.
activityIdIn
in interface ProcessInstanceQuery
public ProcessInstanceQuery rootProcessInstances()
ProcessInstanceQuery
rootProcessInstances
in interface ProcessInstanceQuery
public ProcessInstanceQuery leafProcessInstances()
ProcessInstanceQuery
leafProcessInstances
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionWithoutTenantId()
ProcessInstanceQuery
processDefinitionWithoutTenantId
in interface ProcessInstanceQuery
protected void checkQueryOk()
checkQueryOk
in class AbstractQuery<ProcessInstanceQuery,ProcessInstance>
public long executeCount(CommandContext commandContext)
executeCount
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
public List<ProcessInstance> executeList(CommandContext commandContext, Page page)
AbstractQuery
executeList
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
page
- used if the results must be paged. If null, no paging will be applied.public List<String> executeIdsList(CommandContext commandContext)
executeIdsList
in class AbstractQuery<ProcessInstanceQuery,ProcessInstance>
public List<ImmutablePair<String,String>> executeDeploymentIdMappingsList(CommandContext commandContext)
executeDeploymentIdMappingsList
in class AbstractQuery<ProcessInstanceQuery,ProcessInstance>
protected void ensureVariablesInitialized()
ensureVariablesInitialized
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
public String getProcessInstanceId()
public List<ProcessInstanceQueryImpl> getQueries()
public void addOrQuery(ProcessInstanceQueryImpl orQuery)
public void setOrQueryActive()
public boolean isOrQueryActive()
public String[] getActivityIds()
public String getBusinessKey()
public String getBusinessKeyLike()
public String getProcessDefinitionId()
public String getProcessDefinitionKey()
public String[] getProcessDefinitionKeys()
public String[] getProcessDefinitionKeyNotIn()
public String getDeploymentId()
public String getSuperProcessInstanceId()
public String getSubProcessInstanceId()
public SuspensionState getSuspensionState()
public void setSuspensionState(SuspensionState suspensionState)
public boolean isWithIncident()
public String getIncidentId()
public String getIncidentType()
public String getIncidentMessage()
public String getIncidentMessageLike()
public String getCaseInstanceId()
public String getSuperCaseInstanceId()
public String getSubCaseInstanceId()
public boolean isTenantIdSet()
public boolean isRootProcessInstances()
public boolean isProcessDefinitionWithoutTenantId()
public boolean isLeafProcessInstances()
public String[] getTenantIds()
public ProcessInstanceQuery or()
ProcessInstanceQuery
After calling or(), a chain of several filter criteria could follow. Each filter criterion that follows or()
will be linked together with an OR expression until the OR query is terminated. To terminate the OR query right
after the last filter criterion was applied, ProcessInstanceQuery.endOr()
must be invoked.
or
in interface ProcessInstanceQuery
ProcessInstanceQuery
on which an arbitrary amount of filter criteria could be applied.
The several filter criteria will be linked together by an OR expression.public ProcessInstanceQuery endOr()
ProcessInstanceQuery
endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied. To terminate the
OR query which has been started by invoking ProcessInstanceQuery.or()
, endOr() must be invoked. Filter criteria which are
applied after calling endOr() are linked together by an AND expression.
endOr
in interface ProcessInstanceQuery
ProcessInstanceQuery
on which an arbitrary amount of filter criteria could be applied.
The filter criteria will be linked together by an AND expression.Copyright © 2021. All rights reserved.