Package org.camunda.bpm.engine.impl
Class ExecutionQueryImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
-
- org.camunda.bpm.engine.impl.AbstractQuery<T,U>
-
- org.camunda.bpm.engine.impl.AbstractVariableQueryImpl<ExecutionQuery,Execution>
-
- org.camunda.bpm.engine.impl.ExecutionQueryImpl
-
- All Implemented Interfaces:
Serializable
,Command<Object>
,Query<ExecutionQuery,Execution>
,ExecutionQuery
public class ExecutionQueryImpl extends AbstractVariableQueryImpl<ExecutionQuery,Execution> implements ExecutionQuery
- Author:
- Joram Barrez, Frederik Heremans, Daniel Meyer
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType
-
-
Field Summary
Fields Modifier and Type Field Description protected String
activityId
protected String
businessKey
protected List<EventSubscriptionQueryValue>
eventSubscriptions
protected String
executionId
protected String
incidentId
protected String
incidentMessage
protected String
incidentMessageLike
protected String
incidentType
protected boolean
isTenantIdSet
protected String
processDefinitionId
protected String
processDefinitionKey
protected String
processInstanceId
protected SuspensionState
suspensionState
protected String[]
tenantIds
-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues, variableNamesIgnoreCase, variableValuesIgnoreCase
-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
-
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
-
-
Constructor Summary
Constructors Constructor Description ExecutionQueryImpl()
ExecutionQueryImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionQuery
active()
Only selects executions which are active (i.e.ExecutionQueryImpl
activityId(String activityId)
Only select executions which contain an activity with the given id.ExecutionQuery
eventSubscription(EventType eventType, String eventName)
long
executeCount(CommandContext commandContext)
List<Execution>
executeList(CommandContext commandContext, Page page)
Executes the actual query to retrieve the list of results.ExecutionQueryImpl
executionId(String executionId)
Only select executions with the given id.String
getActivityId()
String
getBusinessKey()
List<EventSubscriptionQueryValue>
getEventSubscriptions()
String
getExecutionId()
String
getIncidentId()
String
getIncidentMessage()
String
getIncidentMessageLike()
String
getIncidentType()
String
getProcessDefinitionId()
String
getProcessDefinitionKey()
String
getProcessInstanceId()
String
getProcessInstanceIds()
SuspensionState
getSuspensionState()
ExecutionQuery
incidentId(String incidentId)
Only selects executions with the given incident id.ExecutionQuery
incidentMessage(String incidentMessage)
Only selects executions with the given incident message.ExecutionQuery
incidentMessageLike(String incidentMessageLike)
Only selects executions with an incident message like the given.ExecutionQuery
incidentType(String incidentType)
Only selects executions with the given incident type.ExecutionQuery
messageEventSubscription()
Only select executions that have a message event subscription.ExecutionQuery
messageEventSubscriptionName(String messageName)
Only select executions which have a message event subscription for the given messageName.ExecutionQueryImpl
orderByProcessDefinitionId()
Order by process definition id (needs to be followed byQuery.asc()
orQuery.desc()
).ExecutionQueryImpl
orderByProcessDefinitionKey()
Order by process definition key (needs to be followed byQuery.asc()
orQuery.desc()
).ExecutionQueryImpl
orderByProcessInstanceId()
Order by id (needs to be followed byQuery.asc()
orQuery.desc()
).ExecutionQuery
orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).ExecutionQueryImpl
processDefinitionId(String processDefinitionId)
Only select executions which have the given process definition id.ExecutionQueryImpl
processDefinitionKey(String processDefinitionKey)
Only select executions which have the given process definition key.ExecutionQuery
processInstanceBusinessKey(String businessKey)
Only select executions that belong to a process instance with the given business keyExecutionQueryImpl
processInstanceId(String processInstanceId)
Only select executions which have the given process instance id.ExecutionQuery
processVariableValueEquals(String variableName, Object variableValue)
Only select executions which are part of a process that have a variable with the given name set to the given value.ExecutionQuery
processVariableValueNotEquals(String variableName, Object variableValue)
Only select executions which are part of a process that have a variable with the given name, but with a different value than the passed value.void
setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)
void
setSuspensionState(SuspensionState suspensionState)
ExecutionQuery
signalEventSubscription(String signalName)
ExecutionQuery
signalEventSubscriptionName(String signalName)
Only select executions which have a signal event subscription for the given signal name.ExecutionQuery
suspended()
Only selects executions which are suspended, because their process instance is suspended.ExecutionQuery
tenantIdIn(String... tenantIds)
Only selects executions with one of the given tenant ids.ExecutionQuery
withoutTenantId()
Only selects executions which have no tenant id.-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
addVariable, createQueryVariableValue, ensureVariablesInitialized, getQueryVariableValues, isVariableNamesIgnoreCase, isVariableValuesIgnoreCase, matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, validateVariable, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals, variableValueNotLike
-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeDeploymentIdMappingsList, executeIdsList, executeResult, executeSingleResult, extend, getExpressions, getMethod, hasExcludingConditions, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validate
-
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.Command
isRetryable
-
Methods inherited from interface org.camunda.bpm.engine.runtime.ExecutionQuery
matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
-
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
-
-
-
Field Detail
-
processDefinitionId
protected String processDefinitionId
-
processDefinitionKey
protected String processDefinitionKey
-
businessKey
protected String businessKey
-
activityId
protected String activityId
-
executionId
protected String executionId
-
processInstanceId
protected String processInstanceId
-
eventSubscriptions
protected List<EventSubscriptionQueryValue> eventSubscriptions
-
suspensionState
protected SuspensionState suspensionState
-
incidentType
protected String incidentType
-
incidentId
protected String incidentId
-
incidentMessage
protected String incidentMessage
-
incidentMessageLike
protected String incidentMessageLike
-
isTenantIdSet
protected boolean isTenantIdSet
-
tenantIds
protected String[] tenantIds
-
-
Constructor Detail
-
ExecutionQueryImpl
public ExecutionQueryImpl()
-
ExecutionQueryImpl
public ExecutionQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
processDefinitionId
public ExecutionQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface:ExecutionQuery
Only select executions which have the given process definition id.- Specified by:
processDefinitionId
in interfaceExecutionQuery
-
processDefinitionKey
public ExecutionQueryImpl processDefinitionKey(String processDefinitionKey)
Description copied from interface:ExecutionQuery
Only select executions which have the given process definition key.- Specified by:
processDefinitionKey
in interfaceExecutionQuery
-
processInstanceId
public ExecutionQueryImpl processInstanceId(String processInstanceId)
Description copied from interface:ExecutionQuery
Only select executions which have the given process instance id.- Specified by:
processInstanceId
in interfaceExecutionQuery
-
processInstanceBusinessKey
public ExecutionQuery processInstanceBusinessKey(String businessKey)
Description copied from interface:ExecutionQuery
Only select executions that belong to a process instance with the given business key- Specified by:
processInstanceBusinessKey
in interfaceExecutionQuery
-
executionId
public ExecutionQueryImpl executionId(String executionId)
Description copied from interface:ExecutionQuery
Only select executions with the given id.- Specified by:
executionId
in interfaceExecutionQuery
-
activityId
public ExecutionQueryImpl activityId(String activityId)
Description copied from interface:ExecutionQuery
Only select executions which contain an activity with the given id.- Specified by:
activityId
in interfaceExecutionQuery
-
signalEventSubscription
public ExecutionQuery signalEventSubscription(String signalName)
- Specified by:
signalEventSubscription
in interfaceExecutionQuery
- See Also:
ExecutionQuery.signalEventSubscriptionName(String)
-
signalEventSubscriptionName
public ExecutionQuery signalEventSubscriptionName(String signalName)
Description copied from interface:ExecutionQuery
Only select executions which have a signal event subscription for the given signal name. (The signalName is specified using the 'name' attribute of the signal element in the BPMN 2.0 XML.)- Specified by:
signalEventSubscriptionName
in interfaceExecutionQuery
- Parameters:
signalName
- the name of the signal the execution has subscribed to
-
messageEventSubscriptionName
public ExecutionQuery messageEventSubscriptionName(String messageName)
Description copied from interface:ExecutionQuery
Only select executions which have a message event subscription for the given messageName. (The messageName is specified using the 'name' attribute of the message element in the BPMN 2.0 XML.)- Specified by:
messageEventSubscriptionName
in interfaceExecutionQuery
- Parameters:
messageName
- the name of the message the execution has subscribed to
-
messageEventSubscription
public ExecutionQuery messageEventSubscription()
Description copied from interface:ExecutionQuery
Only select executions that have a message event subscription. UseExecutionQuery.messageEventSubscriptionName(String)
to filter for executions with message event subscriptions with a certain name.- Specified by:
messageEventSubscription
in interfaceExecutionQuery
-
eventSubscription
public ExecutionQuery eventSubscription(EventType eventType, String eventName)
-
suspended
public ExecutionQuery suspended()
Description copied from interface:ExecutionQuery
Only selects executions which are suspended, because their process instance is suspended.- Specified by:
suspended
in interfaceExecutionQuery
-
active
public ExecutionQuery active()
Description copied from interface:ExecutionQuery
Only selects executions which are active (i.e. not suspended).- Specified by:
active
in interfaceExecutionQuery
-
processVariableValueEquals
public ExecutionQuery processVariableValueEquals(String variableName, Object variableValue)
Description copied from interface:ExecutionQuery
Only select executions which are part of a process that have a variable with the given name set to the given value.- Specified by:
processVariableValueEquals
in interfaceExecutionQuery
-
processVariableValueNotEquals
public ExecutionQuery processVariableValueNotEquals(String variableName, Object variableValue)
Description copied from interface:ExecutionQuery
Only select executions which are part of a process that have a variable with the given name, but with a different value than the passed value. Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Specified by:
processVariableValueNotEquals
in interfaceExecutionQuery
-
incidentType
public ExecutionQuery incidentType(String incidentType)
Description copied from interface:ExecutionQuery
Only selects executions with the given incident type.- Specified by:
incidentType
in interfaceExecutionQuery
-
incidentId
public ExecutionQuery incidentId(String incidentId)
Description copied from interface:ExecutionQuery
Only selects executions with the given incident id.- Specified by:
incidentId
in interfaceExecutionQuery
-
incidentMessage
public ExecutionQuery incidentMessage(String incidentMessage)
Description copied from interface:ExecutionQuery
Only selects executions with the given incident message.- Specified by:
incidentMessage
in interfaceExecutionQuery
-
incidentMessageLike
public ExecutionQuery incidentMessageLike(String incidentMessageLike)
Description copied from interface:ExecutionQuery
Only selects executions with an incident message like the given.- Specified by:
incidentMessageLike
in interfaceExecutionQuery
-
tenantIdIn
public ExecutionQuery tenantIdIn(String... tenantIds)
Description copied from interface:ExecutionQuery
Only selects executions with one of the given tenant ids.- Specified by:
tenantIdIn
in interfaceExecutionQuery
-
withoutTenantId
public ExecutionQuery withoutTenantId()
Description copied from interface:ExecutionQuery
Only selects executions which have no tenant id.- Specified by:
withoutTenantId
in interfaceExecutionQuery
-
orderByProcessInstanceId
public ExecutionQueryImpl orderByProcessInstanceId()
Description copied from interface:ExecutionQuery
Order by id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessInstanceId
in interfaceExecutionQuery
-
orderByProcessDefinitionId
public ExecutionQueryImpl orderByProcessDefinitionId()
Description copied from interface:ExecutionQuery
Order by process definition id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionId
in interfaceExecutionQuery
-
orderByProcessDefinitionKey
public ExecutionQueryImpl orderByProcessDefinitionKey()
Description copied from interface:ExecutionQuery
Order by process definition key (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionKey
in interfaceExecutionQuery
-
orderByTenantId
public ExecutionQuery orderByTenantId()
Description copied from interface:ExecutionQuery
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
). Note that the ordering of executions without tenant id is database-specific.- Specified by:
orderByTenantId
in interfaceExecutionQuery
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCount
in classAbstractVariableQueryImpl<ExecutionQuery,Execution>
-
executeList
public List<Execution> executeList(CommandContext commandContext, Page page)
Description copied from class:AbstractQuery
Executes the actual query to retrieve the list of results.- Specified by:
executeList
in classAbstractVariableQueryImpl<ExecutionQuery,Execution>
page
- used if the results must be paged. If null, no paging will be applied.
-
getProcessDefinitionKey
public String getProcessDefinitionKey()
-
getProcessDefinitionId
public String getProcessDefinitionId()
-
getActivityId
public String getActivityId()
-
getProcessInstanceId
public String getProcessInstanceId()
-
getProcessInstanceIds
public String getProcessInstanceIds()
-
getBusinessKey
public String getBusinessKey()
-
getExecutionId
public String getExecutionId()
-
getSuspensionState
public SuspensionState getSuspensionState()
-
setSuspensionState
public void setSuspensionState(SuspensionState suspensionState)
-
getEventSubscriptions
public List<EventSubscriptionQueryValue> getEventSubscriptions()
-
setEventSubscriptions
public void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)
-
getIncidentId
public String getIncidentId()
-
getIncidentType
public String getIncidentType()
-
getIncidentMessage
public String getIncidentMessage()
-
getIncidentMessageLike
public String getIncidentMessageLike()
-
-