public abstract class CmmnExecution extends CoreExecution implements CmmnCaseInstance
| Modifier and Type | Field and Description |
|---|---|
protected CmmnActivity |
activity
current activity
|
protected CmmnCaseDefinition |
caseDefinition |
protected int |
currentState |
protected boolean |
entryCriterionSatisfied
This property will be used if
this
CmmnExecution is in state CaseExecutionState.NEW
to note that an entry criterion is satisfied. |
protected static CmmnBehaviorLogger |
LOG |
protected int |
previousState |
protected boolean |
required |
protected TaskEntity |
task |
protected Queue<VariableEvent> |
variableEventsQueue |
businessKey, businessKeyWithoutCascade, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping, skipSubprocesses, tenantIdcachedElContext| Constructor and Description |
|---|
CmmnExecution() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addIdIfNotSatisfied(List<String> affectedSentries,
CmmnSentryPart sentryPart) |
protected abstract void |
addSentryPart(CmmnSentryPart sentryPart) |
protected void |
checkAndFireEntryCriteria(List<String> satisfiedSentries) |
protected void |
checkAndFireExitCriteria(List<String> satisfiedSentries) |
void |
close()
Transition to
CaseExecutionState.CLOSED state when no further
work or modifications should be allowed for this case instance. |
protected List<String> |
collectAffectedSentries(CmmnExecution child,
String transition) |
protected List<String> |
collectAffectedSentriesWithVariableOnParts(String variableName,
String variableEvent,
List<CmmnSentryPart> sentryParts) |
protected Map<String,List<CmmnSentryPart>> |
collectAllSentries() |
protected void |
collectCaseExecutionsInExecutionTree(List<CmmnExecution> children) |
protected List<CmmnSentryPart> |
collectSentryParts(Map<String,List<CmmnSentryPart>> sentries) |
void |
complete()
Transition to
CaseExecutionState.COMPLETED state. |
protected boolean |
containsIfPartAndExecutionActive(String sentryId,
Map<String,List<CmmnSentryPart>> sentries) |
void |
create()
This case instance transitions to ACTIVE
state. |
void |
create(Map<String,Object> variables)
This case instance transitions to ACTIVE
state. |
protected abstract CmmnExecution |
createCaseExecution(CmmnActivity activity) |
List<CmmnExecution> |
createChildExecutions(List<CmmnActivity> activities)
Creates new child case executions for each given
CmmnActivity. |
protected CmmnSentryPart |
createIfPart(CmmnSentryDeclaration sentryDeclaration,
CmmnIfPartDeclaration ifPartDeclaration) |
protected CmmnSentryPart |
createOnPart(CmmnSentryDeclaration sentryDeclaration,
CmmnOnPartDeclaration onPartDeclaration) |
protected CmmnSentryPart |
createSentryPart(CmmnSentryDeclaration sentryDeclaration,
String type) |
void |
createSentryParts()
|
abstract CmmnExecution |
createSubCaseInstance(CmmnCaseDefinition caseDefinition)
Creates a new sub case instance.
|
abstract CmmnExecution |
createSubCaseInstance(CmmnCaseDefinition caseDefinition,
String businessKey)
Creates a new sub case instance.
|
abstract PvmExecutionImpl |
createSubProcessInstance(PvmProcessDefinition processDefinition)
Creates a new sub process instance.
|
abstract PvmExecutionImpl |
createSubProcessInstance(PvmProcessDefinition processDefinition,
String businessKey)
Creates a new sub process instance.
|
abstract PvmExecutionImpl |
createSubProcessInstance(PvmProcessDefinition processDefinition,
String businessKey,
String caseInstanceId)
Creates a new sub process instance.
|
TaskEntity |
createTask(TaskDecorator taskDecorator)
Creates a new task.
|
protected CmmnSentryPart |
createVariableOnPart(CmmnSentryDeclaration sentryDeclaration,
CmmnVariableOnPartDeclaration variableOnPartDeclaration) |
void |
deleteCascade() |
void |
disable()
Transition to state.
|
void |
dispatchEvent(VariableEvent variableEvent) |
void |
enable()
Transition to
CaseExecutionState.ENABLED state. |
void |
exit()
Transition to
CaseExecutionState.TERMINATING_ON_EXIT state. |
CmmnExecution |
findCaseExecution(String activityId)
Find a case execution by the given
activityId. |
protected abstract List<? extends CmmnSentryPart> |
findSentry(String sentryId) |
void |
fireEntryCriteria() |
void |
fireExitCriteria() |
void |
fireIfOnlySentryParts()
Fire sentries that consist only out of ifPart, are not satisfied yet, but do satisfy condition.
|
protected void |
fireSentries(List<String> satisfiedSentries) |
protected void |
forceUpdateOnCaseSentryParts(List<CmmnSentryPart> sentryParts) |
protected void |
forceUpdateOnSentries(List<String> sentryIds) |
CmmnActivity |
getActivity()
ensures initialization and returns the activity
|
protected List<CmmnSentryPart> |
getAffectedSentryParts(Map<String,List<CmmnSentryPart>> allSentries,
List<String> affectedSentries) |
String |
getBusinessKey()
The business key for the root execution (e.g.
|
String |
getCaseBusinessKey() |
CmmnCaseDefinition |
getCaseDefinition() |
abstract List<? extends CmmnExecution> |
getCaseExecutions()
Returns a
List of child case executions. |
protected abstract List<? extends CmmnExecution> |
getCaseExecutionsInternal() |
abstract CmmnExecution |
getCaseInstance()
ensures initialization and returns the process instance.
|
String |
getCaseInstanceId()
ensures initialization and returns the process instance.
|
abstract List<? extends CmmnSentryPart> |
getCaseSentryParts() |
CaseExecutionState |
getCurrentState()
Returns the
current state of this
case execution. |
abstract CmmnExecution |
getParent()
ensures initialization and returns the parent
|
AbstractVariableScope |
getParentVariableScope() |
int |
getPrevious() |
CaseExecutionState |
getPreviousState()
Returns the
previous state of this
case execution. |
protected List<String> |
getSatisfiedSentries(List<String> sentryIds)
Checks for each given sentry id whether the corresponding
sentry is satisfied.
|
protected List<String> |
getSatisfiedSentriesInExecutionTree(List<String> sentryIds,
Map<String,List<CmmnSentryPart>> allSentries)
Checks for each given sentry id in the execution tree whether the corresponding
sentry is satisfied.
|
protected abstract Map<String,List<CmmnSentryPart>> |
getSentries() |
int |
getState() |
abstract CmmnExecution |
getSubCaseInstance() |
abstract PvmExecutionImpl |
getSubProcessInstance() |
abstract CmmnExecution |
getSuperCaseExecution() |
abstract PvmExecutionImpl |
getSuperExecution() |
TaskEntity |
getTask() |
protected String |
getToStringIdentity() |
protected Queue<VariableEvent> |
getVariableEventQueue() |
String |
getVariableScopeKey() |
void |
handleChildTransition(CmmnExecution child,
String transition) |
void |
handleVariableTransition(String variableName,
String transition) |
protected boolean |
hasVariableWithSameNameInParent(CmmnExecution execution,
String variableName) |
protected void |
invokeVariableListeners(boolean includeCustomerListeners) |
boolean |
isActive() |
boolean |
isAvailable() |
boolean |
isCaseInstanceExecution()
Returns
true if this case execution
is a case instance. |
boolean |
isClosed() |
boolean |
isCompleted() |
boolean |
isDisabled() |
boolean |
isEnabled() |
boolean |
isEntryCriterionSatisfied()
The flag
entryCriterionSatisfied will only be set to
true, when this CmmnActivityExecution
stays in state CaseExecutionState.NEW. |
boolean |
isFailed() |
boolean |
isNew()
|
protected boolean |
isNotSatisfiedIfPartOnly(CmmnSentryPart sentryPart) |
boolean |
isRequired()
Returns true, if
this case execution is required. |
protected boolean |
isSentryPartsSatisfied(String sentryId,
List<? extends CmmnSentryPart> sentryParts) |
boolean |
isSentrySatisfied(String sentryId)
|
boolean |
isSuspended() |
boolean |
isSuspending()
|
boolean |
isTerminated() |
boolean |
isTerminating()
|
void |
manualComplete()
Transition to
CaseExecutionState.COMPLETED state. |
void |
manualStart()
Transition to
CaseExecutionState.ACTIVE state. |
protected abstract CmmnExecution |
newCaseExecution() |
protected abstract CmmnSentryPart |
newSentryPart() |
void |
occur()
Transition to
CaseExecutionState.COMPLETED state. |
void |
parentComplete()
Transition to
CaseExecutionState.TERMINATED state. |
void |
parentResume()
Transition to the previous state (
CaseExecutionState.AVAILABLE,
CaseExecutionState.ENABLED, CaseExecutionState.DISABLED or
CaseExecutionState.ACTIVE) when the parent Stage transitions
out of CaseExecutionState.SUSPENDED. |
void |
parentSuspend()
Transition to
CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION state. |
void |
parentTerminate()
Transition to
CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION state. |
void |
performExit()
Transition to
CaseExecutionState.TERMINATED state. |
void |
performParentSuspension()
Transition to
CaseExecutionState.SUSPENDED state. |
void |
performParentTerminate()
Transition to
CaseExecutionState.TERMINATED state. |
void |
performSuspension()
Transition to
CaseExecutionState.SUSPENDED state. |
void |
performTerminate()
Transition to
CaseExecutionState.TERMINATED state. |
protected void |
queueVariableEvent(VariableEvent variableEvent,
boolean includeCustomerListeners) |
void |
reactivate()
Transition to
CaseExecutionState.ACTIVE state. |
void |
reenable()
Transition to
CaseExecutionState.ENABLED state. |
void |
remove()
Removes
this case execution from the parent case execution. |
protected void |
resetSentries(List<String> sentries) |
protected void |
resetSentryParts(List<CmmnSentryPart> parts) |
void |
resume()
Transition to either to
CaseExecutionState.ACTIVE state, if this
case execution is associated with a Stage or Task, or to CaseExecutionState#AVAILABE,
if this case execution is associated with a EventListener or Milestone. |
void |
setActivity(CmmnActivity activity) |
void |
setCaseDefinition(CmmnCaseDefinition caseDefinition) |
abstract void |
setCaseInstance(CmmnExecution caseInstance) |
void |
setCurrentState(CaseExecutionState currentState)
Sets the given
state as the
current state of this case execution. |
abstract void |
setParent(CmmnExecution parent) |
void |
setPrevious(int previous) |
void |
setRequired(boolean required)
Sets
this case execution as required or not required. |
void |
setState(int state) |
abstract void |
setSubCaseInstance(CmmnExecution subCaseInstance) |
abstract void |
setSubProcessInstance(PvmExecutionImpl subProcessInstance) |
abstract void |
setSuperCaseExecution(CmmnExecution superCaseExecution) |
abstract void |
setSuperExecution(PvmExecutionImpl superExecution) |
void |
setTask(Task task) |
void |
start()
Transition to
CaseExecutionState.ACTIVE state. |
void |
suspend()
Transition to
CaseExecutionState.SUSPENDING_ON_SUSPENSION state. |
void |
terminate()
Transition to
CaseExecutionState.TERMINATING_ON_TERMINATION state. |
String |
toString() |
void |
triggerChildExecutionsLifecycle(List<CmmnExecution> children)
This method triggers for each given case execution the lifecycle.
|
getBusinessKeyWithoutCascade, getEventName, getEventSource, getId, getListenerIndex, getTenantId, invokeListener, isSkipCustomListeners, isSkipIoMappings, isSkipSubprocesses, performOperation, performOperationSync, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners, setSkipIoMappings, setSkipSubprocesseses, setTenantIdcollectVariableNames, collectVariables, getCachedElContext, getSourceActivityVariableScope, getValueFromVariableInstance, getVariable, getVariable, getVariableInstance, getVariableInstanceFactory, getVariableInstanceLifecycleListeners, getVariableInstanceLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariableStore, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, initializeVariableStore, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersUpdate, invokeVariableLifecycleListenersUpdate, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariableLocal, setVariables, setVariables, setVariablesLocal, setVariablesLocalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActivityId, getActivityName, getCaseDefinitionId, getEventName, getId, getParentId, getTenantIdgetVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocalgetProcessEngine, getProcessEngineServicesgetCmmnModelElementInstance, getCmmnModelInstanceprotected static final CmmnBehaviorLogger LOG
protected transient CmmnCaseDefinition caseDefinition
protected transient CmmnActivity activity
protected boolean required
protected int previousState
protected int currentState
protected Queue<VariableEvent> variableEventsQueue
protected transient TaskEntity task
protected boolean entryCriterionSatisfied
this
CmmnExecution is in state CaseExecutionState.NEW
to note that an entry criterion is satisfied.public abstract List<? extends CmmnExecution> getCaseExecutions()
CmmnActivityExecutionReturns a List of child case executions. If this case
execution has no child case executions an empty List will be returned.
getCaseExecutions in interface CmmnActivityExecutionList of child case executions.protected abstract List<? extends CmmnExecution> getCaseExecutionsInternal()
public CmmnExecution findCaseExecution(String activityId)
CmmnCaseInstanceFind a case execution by the given activityId.
findCaseExecution in interface CmmnCaseInstanceactivityId - the id of the activity to
which a case execution is associated.public TaskEntity getTask()
public void setTask(Task task)
public TaskEntity createTask(TaskDecorator taskDecorator)
CmmnActivityExecutionCreates a new task.
This
createTask in interface CmmnActivityExecutiontaskDecorator - the task decorator used to create taskpublic abstract PvmExecutionImpl getSuperExecution()
public abstract void setSuperExecution(PvmExecutionImpl superExecution)
public abstract PvmExecutionImpl getSubProcessInstance()
public abstract void setSubProcessInstance(PvmExecutionImpl subProcessInstance)
public abstract PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition)
CmmnActivityExecutionCreates a new sub process instance.
This case execution will be the super case execution of the
created sub process instance.
createSubProcessInstance in interface CmmnActivityExecutionprocessDefinition - The PvmProcessDefinition of the subprocess.public abstract PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey)
CmmnActivityExecutionCreates a new sub process instance.
This case execution will be the super case execution of the
created sub process instance.
createSubProcessInstance in interface CmmnActivityExecutionprocessDefinition - The PvmProcessDefinition of the subprocess.businessKey - The businessKey to be set on sub process instance.public abstract PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId)
CmmnActivityExecutionCreates a new sub process instance.
This case execution will be the super case execution of the
created sub process instance.
createSubProcessInstance in interface CmmnActivityExecutionprocessDefinition - The PvmProcessDefinition of the subprocess.businessKey - The businessKey to be set on sub process instance.caseInstanceId - The caseInstanceId to be set on sub process instance.public abstract CmmnExecution getSubCaseInstance()
public abstract void setSubCaseInstance(CmmnExecution subCaseInstance)
public abstract CmmnExecution createSubCaseInstance(CmmnCaseDefinition caseDefinition)
CmmnActivityExecutionCreates a new sub case instance.
This case execution will be the super case execution of the
created sub case instance.
createSubCaseInstance in interface CmmnActivityExecutioncaseDefinition - The CmmnCaseDefinition of the sub case instance.public abstract CmmnExecution createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey)
CmmnActivityExecutionCreates a new sub case instance.
This case execution will be the super case execution of the
created sub case instance.
createSubCaseInstance in interface CmmnActivityExecutioncaseDefinition - The CmmnCaseDefinition of the sub case instance.businessKey - The businessKey to be set on sub case instance.public abstract CmmnExecution getSuperCaseExecution()
public abstract void setSuperCaseExecution(CmmnExecution superCaseExecution)
protected abstract CmmnSentryPart newSentryPart()
protected abstract void addSentryPart(CmmnSentryPart sentryPart)
public void createSentryParts()
CmmnActivityExecutionCreates for each defined PlanItemOnPart and IfPart inside
the specified Sentries a CmmnSentryPart.
createSentryParts in interface CmmnActivityExecutionprotected CmmnSentryPart createOnPart(CmmnSentryDeclaration sentryDeclaration, CmmnOnPartDeclaration onPartDeclaration)
protected CmmnSentryPart createIfPart(CmmnSentryDeclaration sentryDeclaration, CmmnIfPartDeclaration ifPartDeclaration)
protected CmmnSentryPart createVariableOnPart(CmmnSentryDeclaration sentryDeclaration, CmmnVariableOnPartDeclaration variableOnPartDeclaration)
protected CmmnSentryPart createSentryPart(CmmnSentryDeclaration sentryDeclaration, String type)
public void handleChildTransition(CmmnExecution child, String transition)
public void fireIfOnlySentryParts()
CmmnActivityExecutionfireIfOnlySentryParts in interface CmmnActivityExecutionpublic void handleVariableTransition(String variableName, String transition)
protected List<String> collectAffectedSentries(CmmnExecution child, String transition)
protected boolean isNotSatisfiedIfPartOnly(CmmnSentryPart sentryPart)
protected void addIdIfNotSatisfied(List<String> affectedSentries, CmmnSentryPart sentryPart)
protected List<String> collectAffectedSentriesWithVariableOnParts(String variableName, String variableEvent, List<CmmnSentryPart> sentryParts)
protected boolean hasVariableWithSameNameInParent(CmmnExecution execution, String variableName)
protected Map<String,List<CmmnSentryPart>> collectAllSentries()
protected List<CmmnSentryPart> getAffectedSentryParts(Map<String,List<CmmnSentryPart>> allSentries, List<String> affectedSentries)
protected List<CmmnSentryPart> collectSentryParts(Map<String,List<CmmnSentryPart>> sentries)
protected void forceUpdateOnCaseSentryParts(List<CmmnSentryPart> sentryParts)
protected List<String> getSatisfiedSentries(List<String> sentryIds)
protected List<String> getSatisfiedSentriesInExecutionTree(List<String> sentryIds, Map<String,List<CmmnSentryPart>> allSentries)
protected void resetSentryParts(List<CmmnSentryPart> parts)
protected void collectCaseExecutionsInExecutionTree(List<CmmnExecution> children)
public void fireExitCriteria()
public void fireEntryCriteria()
public abstract List<? extends CmmnSentryPart> getCaseSentryParts()
protected abstract List<? extends CmmnSentryPart> findSentry(String sentryId)
protected abstract Map<String,List<CmmnSentryPart>> getSentries()
public boolean isSentrySatisfied(String sentryId)
CmmnActivityExecutionReturns true, if each CmmnSentryPart of the given
sentryId is satisfied.
isSentrySatisfied in interface CmmnActivityExecutionsentryId - the id of the sentry to checktrue if the sentry is satisfied.protected boolean isSentryPartsSatisfied(String sentryId, List<? extends CmmnSentryPart> sentryParts)
protected boolean containsIfPartAndExecutionActive(String sentryId, Map<String,List<CmmnSentryPart>> sentries)
public boolean isEntryCriterionSatisfied()
CmmnActivityExecutionThe flag entryCriterionSatisfied will only be set to
true, when this CmmnActivityExecution
stays in state CaseExecutionState.NEW.
For example:
There exists:
Stage,Stage contains two tasks (A and B) andcreateWhen the Stage instance becomes active, two child case executions
will be created for task A and task B. Both tasks are in the state CaseExecutionState.NEW.
Now task A performs the create transition and so that the given sentry is triggered,
that this is satisfied. Afterwards the sentry will be reseted, that the sentry is not satisfied anymore.
But task B is still in the state CaseExecutionState.NEW and will not be
notified, that its' entry criterion has been satisfied. That's why the the flag entryCriterionSatisfied
will be set to true on the case execution of task B in such a situation. When
task B performs the transition into the state CaseExecutionState.AVAILABLE it can perform
the next transition because the entry criterion has been already satisfied.
isEntryCriterionSatisfied in interface CmmnActivityExecutionpublic String getCaseBusinessKey()
getCaseBusinessKey in interface DelegateCaseExecutionpublic String getBusinessKey()
BaseDelegateExecutiongetBusinessKey in interface BaseDelegateExecutionpublic CmmnCaseDefinition getCaseDefinition()
public void setCaseDefinition(CmmnCaseDefinition caseDefinition)
public abstract CmmnExecution getCaseInstance()
public abstract void setCaseInstance(CmmnExecution caseInstance)
public boolean isCaseInstanceExecution()
CmmnActivityExecutionReturns true if this case execution
is a case instance. If this case execution is not a
case instance then false will be returned.
isCaseInstanceExecution in interface CmmnActivityExecutionthis case execution is a case instance or not.public String getCaseInstanceId()
getCaseInstanceId in interface DelegateCaseExecutionpublic abstract CmmnExecution getParent()
getParent in interface CmmnActivityExecutionparent or null.public abstract void setParent(CmmnExecution parent)
public CmmnActivity getActivity()
getActivity in interface CmmnActivityExecutionactivitypublic void setActivity(CmmnActivity activity)
public String getVariableScopeKey()
getVariableScopeKey in interface VariableScopegetVariableScopeKey in class AbstractVariableScopepublic AbstractVariableScope getParentVariableScope()
getParentVariableScope in class AbstractVariableScopepublic void deleteCascade()
public void remove()
CmmnActivityExecutionRemoves this case execution from the parent case execution.
remove in interface CmmnActivityExecutionpublic boolean isRequired()
CmmnActivityExecutionReturns true, if this case execution is required.
isRequired in interface CmmnActivityExecutionthis case execution is required.public void setRequired(boolean required)
CmmnActivityExecutionSets this case execution as required or not required.
setRequired in interface CmmnActivityExecutionrequired - a boolean value whether this case execution
is required or not required.public CaseExecutionState getCurrentState()
CmmnActivityExecutionReturns the current state of this
case execution.
getCurrentState in interface CmmnActivityExecutioncurrent statepublic void setCurrentState(CaseExecutionState currentState)
CmmnActivityExecutionSets the given state as the
current state of this case execution.
setCurrentState in interface CmmnActivityExecutioncurrentState - the current state to setpublic int getState()
public void setState(int state)
public boolean isNew()
CmmnActivityExecutionReturns true iff:
CmmnActivityExecution.getCurrentState() == CaseExecutionState.NEW
isNew in interface CmmnActivityExecutionthis case execution has as current state CaseExecutionState.NEWpublic boolean isAvailable()
isAvailable in interface DelegateCaseExecutionpublic boolean isEnabled()
isEnabled in interface DelegateCaseExecutionpublic boolean isDisabled()
isDisabled in interface DelegateCaseExecutionpublic boolean isActive()
isActive in interface DelegateCaseExecutionpublic boolean isCompleted()
isCompleted in interface DelegateCaseExecutionpublic boolean isSuspended()
isSuspended in interface DelegateCaseExecutionpublic boolean isSuspending()
CmmnActivityExecutionReturns true iff:
CmmnActivityExecution.getCurrentState() == CaseExecutionState.SUSPENDING_ON_SUSPENSION
|| CmmnActivityExecution.getCurrentState() == CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
isSuspending in interface CmmnActivityExecutionthis case execution has as current state
CaseExecutionState.SUSPENDING_ON_SUSPENSION or CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSIONpublic boolean isTerminated()
isTerminated in interface DelegateCaseExecutionpublic boolean isTerminating()
CmmnActivityExecutionReturns true iff:
CmmnActivityExecution.getCurrentState() == CaseExecutionState.TERMINATING_ON_TERMINATION
|| CmmnActivityExecution.getCurrentState() == CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
|| CmmnActivityExecution.getCurrentState() == CaseExecutionState.TERMINATING_ON_EXIT
isTerminating in interface CmmnActivityExecutionthis case execution has as current state CaseExecutionState.TERMINATING_ON_TERMINATION,
CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION or CaseExecutionState.TERMINATING_ON_EXITpublic boolean isFailed()
isFailed in interface DelegateCaseExecutionpublic boolean isClosed()
isClosed in interface DelegateCaseExecutionpublic CaseExecutionState getPreviousState()
CmmnActivityExecutionReturns the previous state of this
case execution.
getPreviousState in interface CmmnActivityExecutionprevious statepublic int getPrevious()
public void setPrevious(int previous)
public void create()
CmmnCaseInstanceThis case instance transitions to ACTIVE
state.
create in interface CmmnCaseInstancepublic void create(Map<String,Object> variables)
CmmnCaseInstanceThis case instance transitions to ACTIVE
state.
The given variables will be set a case instance variables.
create in interface CmmnCaseInstancepublic List<CmmnExecution> createChildExecutions(List<CmmnActivity> activities)
CmmnActivityExecutionCreates new child case executions for each given CmmnActivity.
Afterwards the method CmmnActivityExecution.triggerChildExecutionsLifecycle(List) must be called
to execute each created case executions (ie. the create listener will be
notified etc.).
According to the CMMN 1.0 specification:
This method can be called when this case execution (which
represents a Stage) transitions to ACTIVE state.
The passed collection of activities are the planned
items that should be executed in this Stage. So that for each
given CmmnActivity a new case execution will be instantiated.
Furthermore for each created child execution there happens a transition
to the initial state AVAILABLE.
createChildExecutions in interface CmmnActivityExecutionactivities - a collection of activities of planned items
to execute inside this case executionpublic void triggerChildExecutionsLifecycle(List<CmmnExecution> children)
CmmnActivityExecutionThis method triggers for each given case execution the lifecycle.
This method must be called after CmmnActivityExecution.createChildExecutions(List).
triggerChildExecutionsLifecycle in interface CmmnActivityExecutionchildren - a collection of case execution to
trigger for each given case execution the lifecycleprotected abstract CmmnExecution createCaseExecution(CmmnActivity activity)
protected abstract CmmnExecution newCaseExecution()
public void enable()
CmmnActivityExecutionTransition to CaseExecutionState.ENABLED state.
This case execution must be in CaseExecutionState.AVAILABLE
state to be able to do this transition.
It is only possible to enable a case execution which is associated with a
Stage or Task.
enable in interface CmmnActivityExecutionpublic void disable()
CmmnActivityExecutionTransition to state.
This case execution must be in CaseExecutionState.ENABLED
state to be able to do this transition.
It is only possible to disable a case execution which is associated with a
Stage or Task.
If this case execution has a parent case execution, that parent
case execution will be notified that this case execution has been
disabled. This can lead to a completion of the parent case execution, for more
details when the parent case execution can be completed see CmmnActivityExecution.complete().
disable in interface CmmnActivityExecutionpublic void reenable()
CmmnActivityExecutionTransition to CaseExecutionState.ENABLED state.
This case execution must be in CaseExecutionState.DISABLED
state to be able to do this transition.
It is only possible to re-enable a case execution which is associated with a
Stage or Task.
reenable in interface CmmnActivityExecutionpublic void manualStart()
CmmnActivityExecutionTransition to CaseExecutionState.ACTIVE state.
This case execution must be in CaseExecutionState.ENABLED
state to be able to do this transition.
It is only possible to start a case execution manually which is associated with a
Stage or Task.
manualStart in interface CmmnActivityExecutionpublic void start()
CmmnActivityExecutionTransition to CaseExecutionState.ACTIVE state.
This case execution must be in CaseExecutionState.AVAILABLE
state to be able to do this transition.
It is only possible to start a case execution which is associated with a
Stage or Task.
start in interface CmmnActivityExecutionpublic void complete()
CmmnActivityExecutionTransition to CaseExecutionState.COMPLETED state.
This case execution must be in CaseExecutionState.ACTIVE
state to be able to do this transition.
It is only possible to complete a case execution which is associated with a
Stage or Task.
If this case execution has a parent case execution, that parent
case execution will be notified that this case execution has been
completed. This can lead to a completion of the parent case execution, for more
details when the parent case execution can be completed see CmmnActivityExecution.complete().
In case of a Stage the completion can only be performed when the following
criteria are fulfilled:
CaseExecutionState.ACTIVE or CaseExecutionState.NEWautoComplete of the associated Stage is set to true:
requiredRule evaluates to true) children are in state
autoComplete of the associated Stage is set to false:
For a Task instance, this means its purpose has been accomplished:
HumanTask have been completed by human.CaseTask have launched a new CaseInstance and if output parameters
are required and/or the property isBlocking is set to true,
then the launched CaseInstance has completed and returned the
output parameters.ProcessTask have launched a new ProcessInstance and if output parameters
are required and/or the property isBlocking is set to true,
then the launched ProcessInstance has completed and returned the
output parameters.complete in interface CmmnActivityExecutionpublic void manualComplete()
CmmnActivityExecutionTransition to CaseExecutionState.COMPLETED state.
This case execution must be in CaseExecutionState.ACTIVE
state to be able to do this transition.
It is only possible to complete a case execution manually which is associated with a
Stage or Task.
If this case execution has a parent case execution, that parent
case execution will be notified that this case execution has been
completed. This can lead to a completion of the parent case execution, for more
details when the parent case execution can be completed see CmmnActivityExecution.complete().
In case of a Stage the completion can only be performed when the following
criteria are fulfilled:
CaseExecutionState.ACTIVE or CaseExecutionState.NEWrequiredRule evaluates to true) children are in state
For a Task instance, this means its purpose has been accomplished:
HumanTask have been completed by human.manualComplete in interface CmmnActivityExecutionpublic void occur()
CmmnActivityExecutionTransition to CaseExecutionState.COMPLETED state.
This case execution must be in CaseExecutionState.AVAILABLE
state to be able to do this transition.
For event listener transitions when the event being listened by the
event listener instance does occur. For a user event
listener instance this transition happens when a human decides to raise the event.
Milestone instance transitions when one of the achieving sentries
(entry criteria) is satisfied.
If this case execution has a parent case execution, that parent
case execution will be notified that this case execution has been
completed (ie.the event or milestone occured). This can lead to a completion of
the parent case execution, for more details when the parent case execution can
be completed see CmmnActivityExecution.complete().
occur in interface CmmnActivityExecutionpublic void terminate()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATING_ON_TERMINATION state.
If this case execution is associated with a Stage or
Task, then this case execution must be in CaseExecutionState.ACTIVE
state to be able to do this transition.
And if this case execution is association with EventListener
or a Milestone, then this case execution must be in
CaseExecutionState.AVAILABLE state to be able to do this transition.
For a Stage instance the termination of this case execution
will be propagated down to all its contained EventListener, Milestone,
Stage, and Task instances.
In case of a Stage this corresponding case execution stays in this state until
all children notified this case execution, that they terminated successfully. Afterwards the
method CmmnActivityExecution.performTerminate() must be called to complete the transition into the state
CaseExecutionState.TERMINATED.
terminate in interface CmmnActivityExecutionpublic void performTerminate()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATED state.
If this case execution has a parent case execution, that parent
case execution will be notified that this case execution has been
terminated. This can lead to a completion of the parent case execution, for more
details when the parent case execution can be completed see CmmnActivityExecution.complete().
performTerminate in interface CmmnActivityExecutionpublic void parentTerminate()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION state.
This case execution must be in CaseExecutionState.AVAILABLE
or CaseExecutionState.SUSPENDED state to be able to do this transition.
It is only possible to execute a parent termination on a case execution which is
associated with a EventListener or Milestone.
Afterwards the method CmmnActivityExecution.performParentTerminate() must be called to complete
the transition into the state CaseExecutionState.TERMINATED.
parentTerminate in interface CmmnActivityExecutionpublic void performParentTerminate()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATED state.
This case execution must be in CaseExecutionState.AVAILABLE
or CaseExecutionState.SUSPENDED state to be able to do this transition.
It is only possible to execute a parent termination on a case execution which is
associated with a EventListener or Milestone.
performParentTerminate in interface CmmnActivityExecutionpublic void exit()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATING_ON_EXIT state.
This case execution must be in one of the following state to
be able to do this transition:
CaseExecutionState.AVAILABLE,CaseExecutionState.ENABLED,CaseExecutionState.DISABLED,CaseExecutionState.ACTIVE,CaseExecutionState.SUSPENDED orCaseExecutionState.FAILEDIt is only possible to execute an exit on a case execution which is
associated with a Stage or Task.
Afterwards the method CmmnActivityExecution.performExit() must be called to complete
the transition into the state CaseExecutionState.TERMINATED.
If this transition is triggered by a fulfilled exit criteria and if
this case execution has a parent case execution, that parent
case execution will be notified that this case execution has been
terminated. This can lead to a completion of the parent case execution, for more
details when the parent case execution can be completed see CmmnActivityExecution.complete().
exit in interface CmmnActivityExecutionpublic void parentComplete()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATED state.
parentComplete in interface CmmnActivityExecutionpublic void performExit()
CmmnActivityExecutionTransition to CaseExecutionState.TERMINATED state.
This can lead to a completion of the parent case execution, for more
details when the parent case execution can be completed see CmmnActivityExecution.complete().
performExit in interface CmmnActivityExecutionpublic void suspend()
CmmnActivityExecutionTransition to CaseExecutionState.SUSPENDING_ON_SUSPENSION state.
If this case execution is associated with a Stage or
Task, then this case execution must be in CaseExecutionState.ACTIVE
state to be able to do this transition.
And if this case execution is association with EventListener
or a Milestone, then this case execution must be in
CaseExecutionState.AVAILABLE state to be able to do this transition.
For a Stage instance the suspension of this case execution
will be propagated down to all its contained EventListener, Milestone,
Stage, and Task instances.
Afterwards the method CmmnActivityExecution.performSuspension() must be called to complete
the transition into the state CaseExecutionState.SUSPENDED.
suspend in interface CmmnActivityExecutionpublic void performSuspension()
CmmnActivityExecutionTransition to CaseExecutionState.SUSPENDED state.
performSuspension in interface CmmnActivityExecutionpublic void parentSuspend()
CmmnActivityExecutionTransition to CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION state.
This case execution must be in one of the following state to
be able to do this transition:
CaseExecutionState.AVAILABLE,CaseExecutionState.ENABLED,CaseExecutionState.DISABLED orCaseExecutionState.ACTIVEIt is only possible to execute a parent suspension on a case execution which is
associated with a Stage or Task.
Afterwards the method CmmnActivityExecution.performParentSuspension() must be called to complete
the transition into the state CaseExecutionState.SUSPENDED.
parentSuspend in interface CmmnActivityExecutionpublic void performParentSuspension()
CmmnActivityExecutionTransition to CaseExecutionState.SUSPENDED state.
performParentSuspension in interface CmmnActivityExecutionpublic void resume()
CmmnActivityExecutionTransition to either to CaseExecutionState.ACTIVE state, if this
case execution is associated with a Stage or Task, or to CaseExecutionState#AVAILABE,
if this case execution is associated with a EventListener or Milestone.
This case execution must be in CaseExecutionState.SUSPENDED
state to be able to do this transition.
For a Stage instance the resume of this case execution
will be propagated down to all its contained EventListener, Milestone,
Stage, and Task instances.
resume in interface CmmnActivityExecutionpublic void parentResume()
CmmnActivityExecutionTransition to the previous state (CaseExecutionState.AVAILABLE,
CaseExecutionState.ENABLED, CaseExecutionState.DISABLED or
CaseExecutionState.ACTIVE) when the parent Stage transitions
out of CaseExecutionState.SUSPENDED.
This case execution must be in CaseExecutionState.SUSPENDED
state to be able to do this transition.
It is only possible to execute a parent resume on a case execution which is
associated with a Stage or Task.
parentResume in interface CmmnActivityExecutionpublic void reactivate()
CmmnActivityExecutionTransition to CaseExecutionState.ACTIVE state.
If this case execution is associated with a Stage or
Task and is not a case instance, then this case execution
must be in CaseExecutionState.FAILED state to be able to do this transition.
And if this case execution is a case instance, then this
case instance must be in one of the following state to perform this transition:
CaseExecutionState.COMPLETED,CaseExecutionState.SUSPENDED,CaseExecutionState.TERMINATED orCaseExecutionState.FAILEDIn case of a case instance the transition out of CaseExecutionState.SUSPENDED state
the resume will be propagated down to all its contained EventListener,
Milestone, Stage, and Task instances, see CmmnActivityExecution.resume() and
CmmnActivityExecution.parentResume().
reactivate in interface CmmnActivityExecutionpublic void close()
CmmnActivityExecutionTransition to CaseExecutionState.CLOSED state when no further
work or modifications should be allowed for this case instance.
It is only possible to close a case instance which is in one of the following states:
close in interface CmmnActivityExecutionpublic void dispatchEvent(VariableEvent variableEvent)
dispatchEvent in interface VariableEventDispatcherdispatchEvent in class AbstractVariableScopeprotected void queueVariableEvent(VariableEvent variableEvent, boolean includeCustomerListeners)
protected void invokeVariableListeners(boolean includeCustomerListeners)
protected Queue<VariableEvent> getVariableEventQueue()
protected String getToStringIdentity()
Copyright © 2022. All rights reserved.