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:
java.io.Serializable
,Command<java.lang.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 java.lang.String
activityId
protected java.lang.String
businessKey
protected java.util.List<EventSubscriptionQueryValue>
eventSubscriptions
protected java.lang.String
executionId
protected java.lang.String
incidentId
protected java.lang.String
incidentMessage
protected java.lang.String
incidentMessageLike
protected java.lang.String
incidentType
protected boolean
isTenantIdSet
protected java.lang.String
processDefinitionId
protected java.lang.String
processDefinitionKey
protected java.lang.String
processInstanceId
protected SuspensionState
suspensionState
protected java.lang.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(java.lang.String activityId)
Only select executions which contain an activity with the given id.ExecutionQuery
eventSubscription(EventType eventType, java.lang.String eventName)
long
executeCount(CommandContext commandContext)
java.util.List<Execution>
executeList(CommandContext commandContext, Page page)
Executes the actual query to retrieve the list of results.ExecutionQueryImpl
executionId(java.lang.String executionId)
Only select executions with the given id.java.lang.String
getActivityId()
java.lang.String
getBusinessKey()
java.util.List<EventSubscriptionQueryValue>
getEventSubscriptions()
java.lang.String
getExecutionId()
java.lang.String
getIncidentId()
java.lang.String
getIncidentMessage()
java.lang.String
getIncidentMessageLike()
java.lang.String
getIncidentType()
java.lang.String
getProcessDefinitionId()
java.lang.String
getProcessDefinitionKey()
java.lang.String
getProcessInstanceId()
java.lang.String
getProcessInstanceIds()
SuspensionState
getSuspensionState()
ExecutionQuery
incidentId(java.lang.String incidentId)
Only selects executions with the given incident id.ExecutionQuery
incidentMessage(java.lang.String incidentMessage)
Only selects executions with the given incident message.ExecutionQuery
incidentMessageLike(java.lang.String incidentMessageLike)
Only selects executions with an incident message like the given.ExecutionQuery
incidentType(java.lang.String incidentType)
Only selects executions with the given incident type.ExecutionQuery
messageEventSubscription()
Only select executions that have a message event subscription.ExecutionQuery
messageEventSubscriptionName(java.lang.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(java.lang.String processDefinitionId)
Only select executions which have the given process definition id.ExecutionQueryImpl
processDefinitionKey(java.lang.String processDefinitionKey)
Only select executions which have the given process definition key.ExecutionQuery
processInstanceBusinessKey(java.lang.String businessKey)
Only select executions that belong to a process instance with the given business keyExecutionQueryImpl
processInstanceId(java.lang.String processInstanceId)
Only select executions which have the given process instance id.ExecutionQuery
processVariableValueEquals(java.lang.String variableName, java.lang.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(java.lang.String variableName, java.lang.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(java.util.List<EventSubscriptionQueryValue> eventSubscriptions)
void
setSuspensionState(SuspensionState suspensionState)
ExecutionQuery
signalEventSubscription(java.lang.String signalName)
ExecutionQuery
signalEventSubscriptionName(java.lang.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(java.lang.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 java.lang.String processDefinitionId
-
processDefinitionKey
protected java.lang.String processDefinitionKey
-
businessKey
protected java.lang.String businessKey
-
activityId
protected java.lang.String activityId
-
executionId
protected java.lang.String executionId
-
processInstanceId
protected java.lang.String processInstanceId
-
eventSubscriptions
protected java.util.List<EventSubscriptionQueryValue> eventSubscriptions
-
suspensionState
protected SuspensionState suspensionState
-
incidentType
protected java.lang.String incidentType
-
incidentId
protected java.lang.String incidentId
-
incidentMessage
protected java.lang.String incidentMessage
-
incidentMessageLike
protected java.lang.String incidentMessageLike
-
isTenantIdSet
protected boolean isTenantIdSet
-
tenantIds
protected java.lang.String[] tenantIds
-
-
Constructor Detail
-
ExecutionQueryImpl
public ExecutionQueryImpl()
-
ExecutionQueryImpl
public ExecutionQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
processDefinitionId
public ExecutionQueryImpl processDefinitionId(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String executionId)
Description copied from interface:ExecutionQuery
Only select executions with the given id.- Specified by:
executionId
in interfaceExecutionQuery
-
activityId
public ExecutionQueryImpl activityId(java.lang.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(java.lang.String signalName)
- Specified by:
signalEventSubscription
in interfaceExecutionQuery
- See Also:
ExecutionQuery.signalEventSubscriptionName(String)
-
signalEventSubscriptionName
public ExecutionQuery signalEventSubscriptionName(java.lang.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(java.lang.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, java.lang.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(java.lang.String variableName, java.lang.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(java.lang.String variableName, java.lang.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(java.lang.String incidentType)
Description copied from interface:ExecutionQuery
Only selects executions with the given incident type.- Specified by:
incidentType
in interfaceExecutionQuery
-
incidentId
public ExecutionQuery incidentId(java.lang.String incidentId)
Description copied from interface:ExecutionQuery
Only selects executions with the given incident id.- Specified by:
incidentId
in interfaceExecutionQuery
-
incidentMessage
public ExecutionQuery incidentMessage(java.lang.String incidentMessage)
Description copied from interface:ExecutionQuery
Only selects executions with the given incident message.- Specified by:
incidentMessage
in interfaceExecutionQuery
-
incidentMessageLike
public ExecutionQuery incidentMessageLike(java.lang.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(java.lang.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 java.util.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 java.lang.String getProcessDefinitionKey()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
getActivityId
public java.lang.String getActivityId()
-
getProcessInstanceId
public java.lang.String getProcessInstanceId()
-
getProcessInstanceIds
public java.lang.String getProcessInstanceIds()
-
getBusinessKey
public java.lang.String getBusinessKey()
-
getExecutionId
public java.lang.String getExecutionId()
-
getSuspensionState
public SuspensionState getSuspensionState()
-
setSuspensionState
public void setSuspensionState(SuspensionState suspensionState)
-
getEventSubscriptions
public java.util.List<EventSubscriptionQueryValue> getEventSubscriptions()
-
setEventSubscriptions
public void setEventSubscriptions(java.util.List<EventSubscriptionQueryValue> eventSubscriptions)
-
getIncidentId
public java.lang.String getIncidentId()
-
getIncidentType
public java.lang.String getIncidentType()
-
getIncidentMessage
public java.lang.String getIncidentMessage()
-
getIncidentMessageLike
public java.lang.String getIncidentMessageLike()
-
-