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 CmmnActivity |
nextActivity
the activity which is to be started next
|
protected int |
previousState |
protected boolean |
required |
protected List<String> |
satisfiedSentries |
protected TaskEntity |
task |
protected Queue<VariableEvent> |
variableEventsQueue |
businessKey, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping
cachedElContext
Constructor and Description |
---|
CmmnExecution() |
Modifier and Type | Method and Description |
---|---|
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) |
void |
complete()
Transition to
CaseExecutionState.COMPLETED state. |
protected boolean |
containsIfPart(String sentryId) |
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.
|
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() |
protected void |
fireSentries(List<String> satisfiedSentries) |
protected void |
forceUpdateOnCaseSentryPart(List<String> sentryIds) |
CmmnActivity |
getActivity()
ensures initialization and returns the activity
|
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. |
CmmnActivity |
getNextActivity() |
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 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) |
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 |
isFailed() |
boolean |
isNew()
|
boolean |
isRequired()
Returns to true, if
this case execution is required. |
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 |
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. |
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. |
void |
setNextActivity(CmmnActivity nextActivity) |
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.
|
getBusinessKey, getEventName, getEventSource, getId, getListenerIndex, invokeListener, isSkipCustomListeners, isSkipIoMappings, performOperation, performOperationSync, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners, setSkipIoMappings
collectVariableNames, collectVariables, getCachedElContext, getSourceActivityVariableScope, getValueFromVariableInstance, getVariable, getVariable, getVariableInstance, getVariableInstanceLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariableStore, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActivityId, getActivityName, getCaseDefinitionId, getEventName, getId, getParentId
getBusinessKey
getVariable, 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, setVariablesLocal
getProcessEngineServices
getCmmnModelElementInstance, getCmmnModelInstance
protected transient CmmnCaseDefinition caseDefinition
protected transient CmmnActivity activity
protected transient CmmnActivity nextActivity
protected boolean required
protected int previousState
protected int currentState
protected Queue<VariableEvent> variableEventsQueue
protected transient TaskEntity task
public abstract List<? extends CmmnExecution> getCaseExecutions()
CmmnActivityExecution
Returns a List
of child case executions. If this
case
execution has no child case executions an empty List
will be returned.
getCaseExecutions
in interface CmmnActivityExecution
List
of child case executions.protected abstract List<? extends CmmnExecution> getCaseExecutionsInternal()
public CmmnExecution findCaseExecution(String activityId)
CmmnCaseInstance
Find a case execution by the given activityId
.
findCaseExecution
in interface CmmnCaseInstance
activityId
- 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)
CmmnActivityExecution
Creates a new task.
This
createTask
in interface CmmnActivityExecution
taskDecorator
- 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)
CmmnActivityExecution
Creates a new sub process instance.
This
case execution will be the super case execution of the
created sub process instance.
createSubProcessInstance
in interface CmmnActivityExecution
processDefinition
- The PvmProcessDefinition
of the subprocess.public abstract PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey)
CmmnActivityExecution
Creates a new sub process instance.
This
case execution will be the super case execution of the
created sub process instance.
createSubProcessInstance
in interface CmmnActivityExecution
processDefinition
- 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)
CmmnActivityExecution
Creates a new sub process instance.
This
case execution will be the super case execution of the
created sub process instance.
createSubProcessInstance
in interface CmmnActivityExecution
processDefinition
- 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)
CmmnActivityExecution
Creates a new sub case instance.
This
case execution will be the super case execution of the
created sub case instance.
createSubCaseInstance
in interface CmmnActivityExecution
caseDefinition
- The CmmnCaseDefinition
of the sub case instance.public abstract CmmnExecution createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey)
CmmnActivityExecution
Creates a new sub case instance.
This
case execution will be the super case execution of the
created sub case instance.
createSubCaseInstance
in interface CmmnActivityExecution
caseDefinition
- 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()
CmmnActivityExecution
Creates for each defined PlanItemOnPart
and IfPart
inside
the specified Sentries
a CmmnSentryPart
.
createSentryParts
in interface CmmnActivityExecution
protected CmmnSentryPart createOnPart(CmmnSentryDeclaration sentryDeclaration, CmmnOnPartDeclaration onPartDeclaration)
protected CmmnSentryPart createIfPart(CmmnSentryDeclaration sentryDeclaration, CmmnIfPartDeclaration ifPartDeclaration)
protected CmmnSentryPart createSentryPart(CmmnSentryDeclaration sentryDeclaration, String type)
public void handleChildTransition(CmmnExecution child, String transition)
protected List<String> collectAffectedSentries(CmmnExecution child, String transition)
protected List<String> getSatisfiedSentries(List<String> sentryIds)
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)
CmmnActivityExecution
Returns true
, if each CmmnSentryPart
of the given
sentryId
is satisfied.
isSentrySatisfied
in interface CmmnActivityExecution
sentryId
- the id of the sentry to checktrue
if the sentry is satisfied.protected boolean containsIfPart(String sentryId)
public String getCaseBusinessKey()
getCaseBusinessKey
in interface DelegateCaseExecution
public CmmnCaseDefinition getCaseDefinition()
public void setCaseDefinition(CmmnCaseDefinition caseDefinition)
public abstract CmmnExecution getCaseInstance()
public abstract void setCaseInstance(CmmnExecution caseInstance)
public boolean isCaseInstanceExecution()
CmmnActivityExecution
Returns 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 CmmnActivityExecution
this
case execution is a case instance or not.public String getCaseInstanceId()
getCaseInstanceId
in interface DelegateCaseExecution
public abstract CmmnExecution getParent()
getParent
in interface CmmnActivityExecution
parent
or null.public abstract void setParent(CmmnExecution parent)
public CmmnActivity getActivity()
getActivity
in interface CmmnActivityExecution
activity
public void setActivity(CmmnActivity activity)
public CmmnActivity getNextActivity()
public void setNextActivity(CmmnActivity nextActivity)
public String getVariableScopeKey()
getVariableScopeKey
in interface VariableScope
getVariableScopeKey
in class AbstractVariableScope
public AbstractVariableScope getParentVariableScope()
getParentVariableScope
in class AbstractVariableScope
public void deleteCascade()
public void remove()
CmmnActivityExecution
Removes this
case execution from the parent case execution.
remove
in interface CmmnActivityExecution
public boolean isRequired()
CmmnActivityExecution
Returns to true, if this
case execution is required.
isRequired
in interface CmmnActivityExecution
this
case execution is required.public void setRequired(boolean required)
CmmnActivityExecution
Sets this
case execution as required or not required.
setRequired
in interface CmmnActivityExecution
required
- a boolean value whether this
case execution
is required or not required.public CaseExecutionState getCurrentState()
CmmnActivityExecution
Returns the current state
of this
case execution.
getCurrentState
in interface CmmnActivityExecution
current state
public void setCurrentState(CaseExecutionState currentState)
CmmnActivityExecution
Sets the given state
as the
current state of this
case execution.
setCurrentState
in interface CmmnActivityExecution
currentState
- the current state to setpublic int getState()
public void setState(int state)
public boolean isNew()
CmmnActivityExecution
Returns true
iff:
CmmnActivityExecution.getCurrentState()
== CaseExecutionState.NEW
isNew
in interface CmmnActivityExecution
this
case execution has as current state CaseExecutionState.NEW
public boolean isAvailable()
isAvailable
in interface DelegateCaseExecution
public boolean isEnabled()
isEnabled
in interface DelegateCaseExecution
public boolean isDisabled()
isDisabled
in interface DelegateCaseExecution
public boolean isActive()
isActive
in interface DelegateCaseExecution
public boolean isCompleted()
isCompleted
in interface DelegateCaseExecution
public boolean isSuspended()
isSuspended
in interface DelegateCaseExecution
public boolean isSuspending()
CmmnActivityExecution
Returns true
iff:
CmmnActivityExecution.getCurrentState()
== CaseExecutionState.SUSPENDING_ON_SUSPENSION
|| CmmnActivityExecution.getCurrentState()
== CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
isSuspending
in interface CmmnActivityExecution
this
case execution has as current state
CaseExecutionState.SUSPENDING_ON_SUSPENSION
or CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
public boolean isTerminated()
isTerminated
in interface DelegateCaseExecution
public boolean isTerminating()
CmmnActivityExecution
Returns true
iff:
CmmnActivityExecution.getCurrentState()
== CaseExecutionState.TERMINATING_ON_TERMINATION
|| CmmnActivityExecution.getCurrentState()
== CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
|| CmmnActivityExecution.getCurrentState()
== CaseExecutionState.TERMINATING_ON_EXIT
isTerminating
in interface CmmnActivityExecution
this
case execution has as current state CaseExecutionState.TERMINATING_ON_TERMINATION
,
CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
or CaseExecutionState.TERMINATING_ON_EXIT
public boolean isFailed()
isFailed
in interface DelegateCaseExecution
public boolean isClosed()
isClosed
in interface DelegateCaseExecution
public CaseExecutionState getPreviousState()
CmmnActivityExecution
Returns the previous state
of this
case execution.
getPreviousState
in interface CmmnActivityExecution
previous state
public int getPrevious()
public void setPrevious(int previous)
public void create()
CmmnCaseInstance
This
case instance transitions to ACTIVE
state.
create
in interface CmmnCaseInstance
public void create(Map<String,Object> variables)
CmmnCaseInstance
This
case instance transitions to ACTIVE
state.
The given variables
will be set a case instance variables.
create
in interface CmmnCaseInstance
public List<CmmnExecution> createChildExecutions(List<CmmnActivity> activities)
CmmnActivityExecution
Creates 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 CmmnActivityExecution
activities
- a collection of activities
of planned items
to execute inside this
case executionpublic void triggerChildExecutionsLifecycle(List<CmmnExecution> children)
CmmnActivityExecution
This method triggers for each given case execution the lifecycle.
This method must be called after CmmnActivityExecution.createChildExecutions(List)
.
triggerChildExecutionsLifecycle
in interface CmmnActivityExecution
children
- 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()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void disable()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void reenable()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void manualStart()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void start()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void complete()
CmmnActivityExecution
Transition 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.NEW
autoComplete
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 CmmnActivityExecution
public void manualComplete()
CmmnActivityExecution
Transition 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.NEW
requiredRule
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 CmmnActivityExecution
public void occur()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void terminate()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void performTerminate()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void parentTerminate()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void performParentTerminate()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void exit()
CmmnActivityExecution
Transition 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.FAILED
It 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 CmmnActivityExecution
public void performExit()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void suspend()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void performSuspension()
CmmnActivityExecution
Transition to CaseExecutionState.SUSPENDED
state.
performSuspension
in interface CmmnActivityExecution
public void parentSuspend()
CmmnActivityExecution
Transition 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.ACTIVE
It 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 CmmnActivityExecution
public void performParentSuspension()
CmmnActivityExecution
Transition to CaseExecutionState.SUSPENDED
state.
performParentSuspension
in interface CmmnActivityExecution
public void resume()
CmmnActivityExecution
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
.
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 CmmnActivityExecution
public void parentResume()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void reactivate()
CmmnActivityExecution
Transition 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.FAILED
In 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 CmmnActivityExecution
public void close()
CmmnActivityExecution
Transition 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 CmmnActivityExecution
public void dispatchEvent(VariableEvent variableEvent)
dispatchEvent
in interface VariableEventDispatcher
dispatchEvent
in class AbstractVariableScope
protected void queueVariableEvent(VariableEvent variableEvent, boolean includeCustomerListeners)
protected void invokeVariableListeners(boolean includeCustomerListeners)
protected Queue<VariableEvent> getVariableEventQueue()
protected String getToStringIdentity()
Copyright © 2018. All rights reserved.