public class ProcessInstanceQueryImpl extends AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance> implements ProcessInstanceQuery, Serializable
AbstractQuery.NullHandlingOnOrder
queryVariableValues
commandContext, commandExecutor, databaseType, nullHandlingOnOrder, orderBy, orderProperty, resultType, SORTORDER_ASC, SORTORDER_DESC
firstResult, maxResults, parameter
Constructor and Description |
---|
ProcessInstanceQueryImpl() |
ProcessInstanceQueryImpl(CommandContext commandContext) |
ProcessInstanceQueryImpl(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
ProcessInstanceQuery |
active()
Only select process instances which are active, which means that
neither the process instance nor the corresponding process definition
are suspended.
|
ProcessInstanceQueryImpl |
deploymentId(String deploymentId)
Select the process instances which are defined by a deployment
with the given id.
|
ProcessInstanceQueryImpl |
deploymentIdIn(List<String> deploymentIds)
Select the process instances which are defined by one of the given deployment ids
|
ProcessInstanceQuery |
endOr()
End an OR statement.
|
protected void |
ensureVariablesInitialized() |
ProcessInstanceQuery |
excludeSubprocesses(boolean excludeSubprocesses)
Exclude sub processes from the query result;
|
long |
executeCount(CommandContext commandContext) |
List<ProcessInstance> |
executeList(CommandContext commandContext,
Page page)
Executes the actual query to retrieve the list of results.
|
String |
getActivityId() |
String |
getBusinessKey() |
String |
getDeploymentId() |
List<String> |
getDeploymentIds() |
List<EventSubscriptionQueryValue> |
getEventSubscriptions() |
String |
getExecutionId() |
String |
getInvolvedUser() |
String |
getMssqlOrDB2OrderBy() |
String |
getName() |
String |
getNameLike() |
String |
getNameLikeIgnoreCase() |
boolean |
getOnlyProcessInstances() |
List<ProcessInstanceQueryImpl> |
getOrQueryObjects() |
String |
getParentId()
Method needed for ibatis because of re-use of query-xml for executions.
|
String |
getProcessDefinitionCategory() |
String |
getProcessDefinitionId() |
Set<String> |
getProcessDefinitionIds() |
String |
getProcessDefinitionKey() |
Set<String> |
getProcessDefinitionKeys() |
String |
getProcessDefinitionName() |
Integer |
getProcessDefinitionVersion() |
String |
getProcessInstanceId() |
Set<String> |
getProcessInstanceIds() |
String |
getSubProcessInstanceId() |
String |
getSuperProcessInstanceId() |
SuspensionState |
getSuspensionState() |
String |
getTenantId() |
String |
getTenantIdLike() |
ProcessInstanceQuery |
includeProcessVariables()
Include process variables in the process query result
|
ProcessInstanceQuery |
involvedUser(String involvedUser)
Select the process instances with which the user with the given id is involved.
|
boolean |
isExcludeSubprocesses() |
boolean |
isIncludeChildExecutionsWithBusinessKeyQuery() |
boolean |
isIncludeProcessVariables() |
boolean |
iswithException() |
boolean |
isWithoutTenantId() |
ProcessInstanceQuery |
locale(String locale)
Localize process name and description to specified locale.
|
protected void |
localize(ProcessInstance processInstance) |
ProcessInstanceQuery |
or()
Begin an OR statement.
|
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() ). |
ProcessInstanceQuery |
processDefinitionCategory(String processDefinitionCategory)
Only select process instances whose process definition category is processDefinitionCategory.
|
ProcessInstanceQueryImpl |
processDefinitionId(String processDefinitionId)
Select the process instances which are defined by a process definition
with the given id.
|
ProcessInstanceQuery |
processDefinitionIds(Set<String> processDefinitionIds)
Select the process instances which are defined by process definitions
with the given ids.
|
ProcessInstanceQueryImpl |
processDefinitionKey(String processDefinitionKey)
Select the process instances which are defined by a process definition with
the given key.
|
ProcessInstanceQuery |
processDefinitionKeys(Set<String> processDefinitionKeys)
Select the process instances which are defined by process definitions with
the given keys.
|
ProcessInstanceQuery |
processDefinitionName(String processDefinitionName)
Select process instances whose process definition name is processDefinitionName
|
ProcessInstanceQuery |
processDefinitionVersion(Integer processDefinitionVersion)
Only select process instances with a certain process definition version.
|
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
|
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 |
processInstanceName(String name)
Only select process instances with the given name.
|
ProcessInstanceQuery |
processInstanceNameLike(String nameLike)
Only select process instances with a name like the given value.
|
ProcessInstanceQuery |
processInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)
Only select process instances with a name like the given value, ignoring upper/lower case.
|
ProcessInstanceQuery |
processInstanceTenantId(String tenantId)
Only select process instances that have the given tenant id.
|
ProcessInstanceQuery |
processInstanceTenantIdLike(String tenantIdLike)
Only select process instances with a tenant id like the given one.
|
ProcessInstanceQuery |
processInstanceWithoutTenantId()
Only select process instances that do not have a tenant id.
|
void |
setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions) |
void |
setName(String name) |
void |
setNameLike(String nameLike) |
void |
setSuspensionState(SuspensionState suspensionState) |
ProcessInstanceQuery |
subProcessInstanceId(String subProcessInstanceId)
Select the process instance that have as sub process instance the given
process instance.
|
ProcessInstanceQuery |
superProcessInstanceId(String superProcessInstanceId)
Select the process instances which are a sub process instance of the given
super process instance.
|
ProcessInstanceQuery |
suspended()
Only select process instances which are suspended, either because the
process instance itself is suspended or because the corresponding process
definition is suspended
|
ProcessInstanceQuery |
variableValueEquals(Object variableValue)
Only select process instances which have at least one global variable with the given value.
|
ProcessInstanceQuery |
variableValueEquals(String variableName,
Object variableValue)
Only select process instances which have a global variable with the given value.
|
ProcessInstanceQuery |
variableValueEqualsIgnoreCase(String name,
String value)
Only select process instances which have a local string variable with the given value,
case insensitive.
|
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 |
variableValueLikeIgnoreCase(String name,
String value)
Only select process instances which have a global variable value like the given value (case insensitive).
|
ProcessInstanceQuery |
variableValueNotEquals(String variableName,
Object variableValue)
Only select process instances which have a global variable with the given name, but
with a different value than the passed value.
|
ProcessInstanceQuery |
variableValueNotEqualsIgnoreCase(String name,
String value)
Only select process instances which have a local string variable which is not the given value,
case insensitive.
|
ProcessInstanceQuery |
withJobException()
Only select process instances that failed due to an exception happening during a job execution.
|
ProcessInstanceQuery |
withLocalizationFallback()
Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.
|
addVariable, getQueryVariableValues, isBoolean, variableValueEquals, variableValueEquals, variableValueEqualsIgnoreCase, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueLikeIgnoreCase, variableValueNotEquals, variableValueNotEqualsIgnoreCase
addOrder, asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, getDatabaseType, getOrderBy, getOrderByColumns, list, listPage, orderBy, orderBy, setCommandExecutor, setDatabaseType, singleResult
getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setFirstResult, setMaxResults, setParameter
protected String executionId
protected String businessKey
protected boolean includeChildExecutionsWithBusinessKeyQuery
protected String processDefinitionId
protected String processDefinitionCategory
protected String processDefinitionName
protected Integer processDefinitionVersion
protected String processDefinitionKey
protected String deploymentId
protected String superProcessInstanceId
protected String subProcessInstanceId
protected boolean excludeSubprocesses
protected String involvedUser
protected SuspensionState suspensionState
protected boolean includeProcessVariables
protected boolean withJobException
protected String name
protected String nameLike
protected String nameLikeIgnoreCase
protected String locale
protected boolean withLocalizationFallback
protected String tenantId
protected String tenantIdLike
protected boolean withoutTenantId
protected List<ProcessInstanceQueryImpl> orQueryObjects
protected ProcessInstanceQueryImpl currentOrQueryObject
protected boolean inOrStatement
protected String activityId
protected List<EventSubscriptionQueryValue> eventSubscriptions
public ProcessInstanceQueryImpl()
public ProcessInstanceQueryImpl(CommandContext commandContext)
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 processInstanceTenantId(String tenantId)
ProcessInstanceQuery
processInstanceTenantId
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceTenantIdLike(String tenantIdLike)
ProcessInstanceQuery
processInstanceTenantIdLike
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceWithoutTenantId()
ProcessInstanceQuery
processInstanceWithoutTenantId
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionCategory(String processDefinitionCategory)
ProcessInstanceQuery
processDefinitionCategory
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionName(String processDefinitionName)
ProcessInstanceQuery
processDefinitionName
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionVersion(Integer processDefinitionVersion)
ProcessInstanceQuery
ProcessInstanceQuery.processDefinitionKey(String)
processDefinitionVersion
in interface ProcessInstanceQuery
public ProcessInstanceQueryImpl processDefinitionId(String processDefinitionId)
ProcessInstanceQuery
processDefinitionId
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionIds(Set<String> processDefinitionIds)
ProcessInstanceQuery
processDefinitionIds
in interface ProcessInstanceQuery
public ProcessInstanceQueryImpl processDefinitionKey(String processDefinitionKey)
ProcessInstanceQuery
processDefinitionKey
in interface ProcessInstanceQuery
public ProcessInstanceQuery processDefinitionKeys(Set<String> processDefinitionKeys)
ProcessInstanceQuery
processDefinitionKeys
in interface ProcessInstanceQuery
public ProcessInstanceQueryImpl deploymentId(String deploymentId)
ProcessInstanceQuery
deploymentId
in interface ProcessInstanceQuery
public ProcessInstanceQueryImpl deploymentIdIn(List<String> deploymentIds)
ProcessInstanceQuery
deploymentIdIn
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 excludeSubprocesses(boolean excludeSubprocesses)
ProcessInstanceQuery
excludeSubprocesses
in interface ProcessInstanceQuery
public ProcessInstanceQuery involvedUser(String involvedUser)
ProcessInstanceQuery
involvedUser
in interface ProcessInstanceQuery
public ProcessInstanceQuery active()
ProcessInstanceQuery
active
in interface ProcessInstanceQuery
public ProcessInstanceQuery suspended()
ProcessInstanceQuery
suspended
in interface ProcessInstanceQuery
public ProcessInstanceQuery includeProcessVariables()
ProcessInstanceQuery
includeProcessVariables
in interface ProcessInstanceQuery
public ProcessInstanceQuery withJobException()
ProcessInstanceQuery
withJobException
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceName(String name)
ProcessInstanceQuery
processInstanceName
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceNameLike(String nameLike)
ProcessInstanceQuery
processInstanceNameLike
in interface ProcessInstanceQuery
public ProcessInstanceQuery processInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)
ProcessInstanceQuery
processInstanceNameLikeIgnoreCase
in interface ProcessInstanceQuery
public ProcessInstanceQuery or()
ProcessInstanceQuery
or
in interface ProcessInstanceQuery
public ProcessInstanceQuery endOr()
ProcessInstanceQuery
endOr
in interface ProcessInstanceQuery
public ProcessInstanceQuery variableValueEquals(String variableName, Object variableValue)
ProcessInstanceQuery
ProcessEngineConfiguration#getVariableTypes()
.
Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.variableValueEquals
in interface ProcessInstanceQuery
variableValueEquals
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
variableName
- name of the variable, cannot be null.public ProcessInstanceQuery variableValueNotEquals(String variableName, Object variableValue)
ProcessInstanceQuery
Serializable
objects (which are not primitive type wrappers)
are not supported.variableValueNotEquals
in interface ProcessInstanceQuery
variableValueNotEquals
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
variableName
- name of the variable, cannot be null.public ProcessInstanceQuery variableValueEquals(Object variableValue)
ProcessInstanceQuery
ProcessEngineConfiguration#getVariableTypes()
.
Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.variableValueEquals
in interface ProcessInstanceQuery
variableValueEquals
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
public ProcessInstanceQuery variableValueEqualsIgnoreCase(String name, String value)
ProcessInstanceQuery
This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).
variableValueEqualsIgnoreCase
in interface ProcessInstanceQuery
variableValueEqualsIgnoreCase
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- name of the variable, cannot be null.value
- value of the variable, cannot be null.public ProcessInstanceQuery variableValueNotEqualsIgnoreCase(String name, String value)
ProcessInstanceQuery
This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).
variableValueNotEqualsIgnoreCase
in interface ProcessInstanceQuery
variableValueNotEqualsIgnoreCase
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- name of the variable, cannot be null.value
- value of the variable, cannot be null.public ProcessInstanceQuery variableValueGreaterThan(String name, Object value)
ProcessInstanceQuery
Serializable
objects (which are not primitive type wrappers)
are not supported.variableValueGreaterThan
in interface ProcessInstanceQuery
variableValueGreaterThan
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- variable name, cannot be null.value
- variable value, cannot be null.public ProcessInstanceQuery variableValueGreaterThanOrEqual(String name, Object value)
ProcessInstanceQuery
Serializable
objects (which
are not primitive type wrappers) are not supported.variableValueGreaterThanOrEqual
in interface ProcessInstanceQuery
variableValueGreaterThanOrEqual
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- variable name, cannot be null.value
- variable value, cannot be null.public ProcessInstanceQuery variableValueLessThan(String name, Object value)
ProcessInstanceQuery
Serializable
objects (which are not primitive type wrappers)
are not supported.variableValueLessThan
in interface ProcessInstanceQuery
variableValueLessThan
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- variable name, cannot be null.value
- variable value, cannot be null.public ProcessInstanceQuery variableValueLessThanOrEqual(String name, Object value)
ProcessInstanceQuery
Serializable
objects (which are not primitive type wrappers)
are not supported.variableValueLessThanOrEqual
in interface ProcessInstanceQuery
variableValueLessThanOrEqual
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- variable name, cannot be null.value
- variable value, cannot be null.public ProcessInstanceQuery variableValueLike(String name, String value)
ProcessInstanceQuery
variableValueLike
in interface ProcessInstanceQuery
variableValueLike
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- variable name, cannot be null.value
- variable value, cannot be null. The string can include the
wildcard character '%' to express like-strategy:
starts with (string%), ends with (%string) or contains (%string%).public ProcessInstanceQuery variableValueLikeIgnoreCase(String name, String value)
ProcessInstanceQuery
variableValueLikeIgnoreCase
in interface ProcessInstanceQuery
variableValueLikeIgnoreCase
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
name
- variable name, cannot be null.value
- variable value, cannot be null. The string can include the
wildcard character '%' to express like-strategy:
starts with (string%), ends with (%string) or contains (%string%).public ProcessInstanceQuery locale(String locale)
ProcessInstanceQuery
locale
in interface ProcessInstanceQuery
public ProcessInstanceQuery withLocalizationFallback()
ProcessInstanceQuery
withLocalizationFallback
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()
).orderByTenantId
in interface ProcessInstanceQuery
public String getMssqlOrDB2OrderBy()
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.protected void ensureVariablesInitialized()
ensureVariablesInitialized
in class AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
protected void localize(ProcessInstance processInstance)
public boolean getOnlyProcessInstances()
public String getProcessInstanceId()
public String getBusinessKey()
public boolean isIncludeChildExecutionsWithBusinessKeyQuery()
public String getProcessDefinitionId()
public String getProcessDefinitionCategory()
public String getProcessDefinitionName()
public Integer getProcessDefinitionVersion()
public String getProcessDefinitionKey()
public String getActivityId()
public String getSuperProcessInstanceId()
public String getSubProcessInstanceId()
public boolean isExcludeSubprocesses()
public String getInvolvedUser()
public SuspensionState getSuspensionState()
public void setSuspensionState(SuspensionState suspensionState)
public List<EventSubscriptionQueryValue> getEventSubscriptions()
public void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)
public String getTenantId()
public String getTenantIdLike()
public boolean isWithoutTenantId()
public String getName()
public String getNameLike()
public void setName(String name)
public void setNameLike(String nameLike)
public String getExecutionId()
public String getDeploymentId()
public boolean isIncludeProcessVariables()
public boolean iswithException()
public String getNameLikeIgnoreCase()
public List<ProcessInstanceQueryImpl> getOrQueryObjects()
public String getParentId()
Copyright © 2016 Alfresco. All rights reserved.