Interface CmmnActivityExecution
-
- All Superinterfaces:
BaseDelegateExecution
,CmmnModelExecutionContext
,DelegateCaseExecution
,ProcessEngineServicesAware
,VariableScope
- All Known Subinterfaces:
CmmnCaseInstance
- All Known Implementing Classes:
CaseExecutionEntity
,CaseExecutionImpl
,CmmnExecution
public interface CmmnActivityExecution extends DelegateCaseExecution
- Author:
- Roman Smirnov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Transition toCaseExecutionState.CLOSED
state when no further work or modifications should be allowed for this case instance.void
complete()
Transition toCaseExecutionState.COMPLETED
state.java.util.List<CmmnExecution>
createChildExecutions(java.util.List<CmmnActivity> activities)
Creates new child case executions for each givenCmmnActivity
.void
createSentryParts()
CmmnCaseInstance
createSubCaseInstance(CmmnCaseDefinition caseDefinition)
Creates a new sub case instance.CmmnCaseInstance
createSubCaseInstance(CmmnCaseDefinition caseDefinition, java.lang.String businessKey)
Creates a new sub case instance.PvmProcessInstance
createSubProcessInstance(PvmProcessDefinition processDefinition)
Creates a new sub process instance.PvmProcessInstance
createSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey)
Creates a new sub process instance.PvmProcessInstance
createSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey, java.lang.String caseInstanceId)
Creates a new sub process instance.Task
createTask(TaskDecorator taskDecorator)
Creates a new task.void
disable()
Transition to state.void
enable()
Transition toCaseExecutionState.ENABLED
state.void
exit()
Transition toCaseExecutionState.TERMINATING_ON_EXIT
state.void
fireIfOnlySentryParts()
Fire sentries that consist only out of ifPart, are not satisfied yet, but do satisfy condition.CmmnActivity
getActivity()
Returns theactivity
which is associated withthis
case execution.java.util.List<? extends CmmnExecution>
getCaseExecutions()
Returns aList
of child case executions.CaseExecutionState
getCurrentState()
Returns thecurrent state
ofthis
case execution.CmmnActivityExecution
getParent()
Returns the parent ofthis
case execution, or null if there is no parent.CaseExecutionState
getPreviousState()
Returns theprevious state
ofthis
case execution.boolean
isCaseInstanceExecution()
Returnstrue
ifthis
case execution is a case instance.boolean
isEntryCriterionSatisfied()
The flagentryCriterionSatisfied
will only be set totrue
, whenthis
CmmnActivityExecution
stays in stateCaseExecutionState.NEW
.boolean
isNew()
boolean
isRequired()
Returns true, ifthis
case execution is required.boolean
isSentrySatisfied(java.lang.String sentryId)
boolean
isSuspending()
boolean
isTerminating()
void
manualComplete()
Transition toCaseExecutionState.COMPLETED
state.void
manualStart()
Transition toCaseExecutionState.ACTIVE
state.void
occur()
Transition toCaseExecutionState.COMPLETED
state.void
parentComplete()
Transition toCaseExecutionState.TERMINATED
state.void
parentResume()
Transition to the previous state (CaseExecutionState.AVAILABLE
,CaseExecutionState.ENABLED
,CaseExecutionState.DISABLED
orCaseExecutionState.ACTIVE
) when the parentStage
transitions out ofCaseExecutionState.SUSPENDED
.void
parentSuspend()
Transition toCaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
state.void
parentTerminate()
Transition toCaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
state.void
performExit()
Transition toCaseExecutionState.TERMINATED
state.void
performParentSuspension()
Transition toCaseExecutionState.SUSPENDED
state.void
performParentTerminate()
Transition toCaseExecutionState.TERMINATED
state.void
performSuspension()
Transition toCaseExecutionState.SUSPENDED
state.void
performTerminate()
Transition toCaseExecutionState.TERMINATED
state.void
reactivate()
Transition toCaseExecutionState.ACTIVE
state.void
reenable()
Transition toCaseExecutionState.ENABLED
state.void
remove()
Removesthis
case execution from the parent case execution.void
resume()
Transition to either toCaseExecutionState.ACTIVE
state, ifthis
case execution is associated with aStage
orTask
, or toCaseExecutionState#AVAILABE
, ifthis
case execution is associated with aEventListener
orMilestone
.void
setCurrentState(CaseExecutionState currentState)
Sets the givenstate
as the current state ofthis
case execution.void
setRequired(boolean required)
Setsthis
case execution as required or not required.void
start()
Transition toCaseExecutionState.ACTIVE
state.void
suspend()
Transition toCaseExecutionState.SUSPENDING_ON_SUSPENSION
state.void
terminate()
Transition toCaseExecutionState.TERMINATING_ON_TERMINATION
state.void
triggerChildExecutionsLifecycle(java.util.List<CmmnExecution> children)
This method triggers for each given case execution the lifecycle.-
Methods inherited from interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
getBusinessKey
-
Methods inherited from interface org.camunda.bpm.engine.delegate.CmmnModelExecutionContext
getCmmnModelElementInstance, getCmmnModelInstance
-
Methods inherited from interface org.camunda.bpm.engine.delegate.DelegateCaseExecution
getActivityId, getActivityName, getCaseBusinessKey, getCaseDefinitionId, getCaseInstanceId, getEventName, getId, getParentId, getTenantId, isActive, isAvailable, isClosed, isCompleted, isDisabled, isEnabled, isFailed, isSuspended, isTerminated
-
Methods inherited from interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
getProcessEngine, getProcessEngineServices
-
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariableScopeKey, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
-
-
-
-
Method Detail
-
getParent
CmmnActivityExecution getParent()
Returns the parent of
this
case execution, or null if there is no parent.- Returns:
- a
parent
or null.
-
isCaseInstanceExecution
boolean isCaseInstanceExecution()
Returns
true
ifthis
case execution is a case instance. Ifthis
case execution is not a case instance thenfalse
will be returned.- Returns:
- whether
this
case execution is a case instance or not.
-
getCurrentState
CaseExecutionState getCurrentState()
Returns the
current state
ofthis
case execution.- Returns:
- the
current state
-
setCurrentState
void setCurrentState(CaseExecutionState currentState)
Sets the given
state
as the current state ofthis
case execution.- Parameters:
currentState
- the current state to set
-
getPreviousState
CaseExecutionState getPreviousState()
Returns the
previous state
ofthis
case execution.- Returns:
- the
previous state
-
isNew
boolean isNew()
Returns
true
iff:
getCurrentState()
==CaseExecutionState.NEW
- Returns:
- whether
this
case execution has as current stateCaseExecutionState.NEW
-
isTerminating
boolean isTerminating()
Returns
true
iff:
getCurrentState()
==CaseExecutionState.TERMINATING_ON_TERMINATION
||getCurrentState()
==CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
||getCurrentState()
==CaseExecutionState.TERMINATING_ON_EXIT
- Returns:
- whether
this
case execution has as current stateCaseExecutionState.TERMINATING_ON_TERMINATION
,CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
orCaseExecutionState.TERMINATING_ON_EXIT
-
isSuspending
boolean isSuspending()
Returns
true
iff:
getCurrentState()
==CaseExecutionState.SUSPENDING_ON_SUSPENSION
||getCurrentState()
==CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
- Returns:
- whether
this
case execution has as current stateCaseExecutionState.SUSPENDING_ON_SUSPENSION
orCaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
-
getActivity
CmmnActivity getActivity()
Returns the
activity
which is associated withthis
case execution.- Returns:
- the associated
activity
-
createChildExecutions
java.util.List<CmmnExecution> createChildExecutions(java.util.List<CmmnActivity> activities)
Creates new child case executions for each given
CmmnActivity
.Afterwards the method
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 whenthis
case execution (which represents aStage
) transitions toACTIVE
state. The passed collection ofactivities
are the planned items that should be executed in thisStage
. So that for each givenCmmnActivity
a new case execution will be instantiated. Furthermore for each created child execution there happens a transition to the initial stateAVAILABLE
.- Parameters:
activities
- a collection ofactivities
of planned items to execute insidethis
case execution
-
triggerChildExecutionsLifecycle
void triggerChildExecutionsLifecycle(java.util.List<CmmnExecution> children)
This method triggers for each given case execution the lifecycle.
This method must be called after
createChildExecutions(List)
.- Parameters:
children
- a collection ofcase execution
to trigger for each given case execution the lifecycle
-
enable
void enable()
Transition to
CaseExecutionState.ENABLED
state.This
case execution must be inCaseExecutionState.AVAILABLE
state to be able to do this transition.It is only possible to enable a case execution which is associated with a
Stage
orTask
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.AVAILABLE
.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
disable
void disable()
Transition to state.
This
case execution must be inCaseExecutionState.ENABLED
state to be able to do this transition.It is only possible to disable a case execution which is associated with a
Stage
orTask
.If
this
case execution has a parent case execution, that parent case execution will be notified thatthis
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 seecomplete()
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.ENABLED
.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
reenable
void reenable()
Transition to
CaseExecutionState.ENABLED
state.This
case execution must be inCaseExecutionState.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
orTask
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.DISABLED
.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
manualStart
void manualStart()
Transition to
CaseExecutionState.ACTIVE
state.This
case execution must be inCaseExecutionState.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
orTask
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.ENABLED
.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
start
void start()
Transition to
CaseExecutionState.ACTIVE
state.This
case execution must be inCaseExecutionState.AVAILABLE
state to be able to do this transition.It is only possible to start a case execution which is associated with a
Stage
orTask
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.AVAILABLE
.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
complete
void complete()
Transition to
CaseExecutionState.COMPLETED
state.This
case execution must be inCaseExecutionState.ACTIVE
state to be able to do this transition.It is only possible to complete a case execution which is associated with a
Stage
orTask
.If
this
case execution has a parent case execution, that parent case execution will be notified thatthis
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 seecomplete()
.In case of a
Stage
the completion can only be performed when the following criteria are fulfilled:
- there are no children in the state
CaseExecutionState.ACTIVE
orCaseExecutionState.NEW
- if the property
autoComplete
of the associatedStage
is set totrue
:- all required (
requiredRule
evaluates totrue
) children are in state
- all required (
- if the property
autoComplete
of the associatedStage
is set tofalse
:
For a
Task
instance, this means its purpose has been accomplished:
HumanTask
have been completed by human.CaseTask
have launched a newCaseInstance
and if output parameters are required and/or the propertyisBlocking
is set totrue
, then the launchedCaseInstance
has completed and returned the output parameters.ProcessTask
have launched a newProcessInstance
and if output parameters are required and/or the propertyisBlocking
is set totrue
, then the launchedProcessInstance
has completed and returned the output parameters.
- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.ACTIVE
or when the case execution cannot be completed.ProcessEngineException
- when an internal exception happens during the execution of the command.
- there are no children in the state
-
manualComplete
void manualComplete()
Transition to
CaseExecutionState.COMPLETED
state.This
case execution must be inCaseExecutionState.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
orTask
.If
this
case execution has a parent case execution, that parent case execution will be notified thatthis
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 seecomplete()
.In case of a
Stage
the completion can only be performed when the following criteria are fulfilled:
- there are no children in the state
CaseExecutionState.ACTIVE
orCaseExecutionState.NEW
- all required (
requiredRule
evaluates totrue
) children are in state
For a
Task
instance, this means its purpose has been accomplished:
HumanTask
have been completed by human.
- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.ACTIVE
or when the case execution cannot be completed.ProcessEngineException
- when an internal exception happens during the execution of the command.
- there are no children in the state
-
occur
void occur()
Transition to
CaseExecutionState.COMPLETED
state.This
case execution must be inCaseExecutionState.AVAILABLE
state to be able to do this transition.For
Forevent listener
transitions when the event being listened by theevent listener
instance does occur. For auser event listener
instance this transition happens when a human decides to raise the event.Milestone
instance transitions when one of the achievingsentries
(entry criteria) is satisfied.If
this
case execution has a parent case execution, that parent case execution will be notified thatthis
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 seecomplete()
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is notCaseExecutionState.AVAILABLE
.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
terminate
void terminate()
Transition to
CaseExecutionState.TERMINATING_ON_TERMINATION
state.If
this
case execution is associated with aStage
orTask
, thenthis
case execution must be inCaseExecutionState.ACTIVE
state to be able to do this transition.
And ifthis
case execution is association withEventListener
or aMilestone
, thenthis
case execution must be inCaseExecutionState.AVAILABLE
state to be able to do this transition.For a
Stage
instance the termination ofthis
case execution will be propagated down to all its containedEventListener
,Milestone
,Stage
, andTask
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 methodperformTerminate()
must be called to complete the transition into the stateCaseExecutionState.TERMINATED
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
performTerminate
void performTerminate()
Transition to
CaseExecutionState.TERMINATED
state.If
this
case execution has a parent case execution, that parent case execution will be notified thatthis
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 seecomplete()
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
parentTerminate
void parentTerminate()
Transition to
CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION
state.This
case execution must be inCaseExecutionState.AVAILABLE
orCaseExecutionState.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
orMilestone
.Afterwards the method
performParentTerminate()
must be called to complete the transition into the stateCaseExecutionState.TERMINATED
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
performParentTerminate
void performParentTerminate()
Transition to
CaseExecutionState.TERMINATED
state.This
case execution must be inCaseExecutionState.AVAILABLE
orCaseExecutionState.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
orMilestone
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
exit
void exit()
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
orTask
.Afterwards the method
performExit()
must be called to complete the transition into the stateCaseExecutionState.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 thatthis
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 seecomplete()
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
parentComplete
void parentComplete()
Transition to
CaseExecutionState.TERMINATED
state.- Throws:
ProcessEngineException
- when an internal exception happens during the execution of the command.
-
performExit
void performExit()
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
complete()
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
suspend
void suspend()
Transition to
CaseExecutionState.SUSPENDING_ON_SUSPENSION
state.If
this
case execution is associated with aStage
orTask
, thenthis
case execution must be inCaseExecutionState.ACTIVE
state to be able to do this transition.
And ifthis
case execution is association withEventListener
or aMilestone
, thenthis
case execution must be inCaseExecutionState.AVAILABLE
state to be able to do this transition.For a
Stage
instance the suspension ofthis
case execution will be propagated down to all its containedEventListener
,Milestone
,Stage
, andTask
instances.Afterwards the method
performSuspension()
must be called to complete the transition into the stateCaseExecutionState.SUSPENDED
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
performSuspension
void performSuspension()
Transition to
CaseExecutionState.SUSPENDED
state.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
parentSuspend
void parentSuspend()
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
orTask
.Afterwards the method
performParentSuspension()
must be called to complete the transition into the stateCaseExecutionState.SUSPENDED
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
performParentSuspension
void performParentSuspension()
Transition to
CaseExecutionState.SUSPENDED
state.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
resume
void resume()
Transition to either to
CaseExecutionState.ACTIVE
state, ifthis
case execution is associated with aStage
orTask
, or toCaseExecutionState#AVAILABE
, ifthis
case execution is associated with aEventListener
orMilestone
.This
case execution must be inCaseExecutionState.SUSPENDED
state to be able to do this transition.For a
Stage
instance the resume ofthis
case execution will be propagated down to all its containedEventListener
,Milestone
,Stage
, andTask
instances.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
parentResume
void parentResume()
Transition to the previous state (
CaseExecutionState.AVAILABLE
,CaseExecutionState.ENABLED
,CaseExecutionState.DISABLED
orCaseExecutionState.ACTIVE
) when the parentStage
transitions out ofCaseExecutionState.SUSPENDED
.This
case execution must be inCaseExecutionState.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
orTask
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
reactivate
void reactivate()
Transition to
CaseExecutionState.ACTIVE
state.If
this
case execution is associated with aStage
orTask
and is not a case instance, thenthis
case execution must be inCaseExecutionState.FAILED
state to be able to do this transition.
And ifthis
case execution is a case instance, thenthis
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 containedEventListener
,Milestone
,Stage
, andTask
instances, seeresume()
andparentResume()
.- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
close
void close()
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:
- Throws:
CaseIllegalStateTransitionException
- will be thrown, ifthis
case execution is not in the expected state.ProcessEngineException
- when an internal exception happens during the execution of the command.
-
isRequired
boolean isRequired()
Returns true, if
this
case execution is required.- Returns:
- true if
this
case execution is required.
-
setRequired
void setRequired(boolean required)
Sets
this
case execution as required or not required.- Parameters:
required
- a boolean value whetherthis
case execution is required or not required.
-
remove
void remove()
Removes
this
case execution from the parent case execution.
-
getCaseExecutions
java.util.List<? extends CmmnExecution> getCaseExecutions()
Returns a
List
of child case executions. Ifthis
case execution has no child case executions an emptyList
will be returned.- Returns:
- a
List
of child case executions.
-
createTask
Task createTask(TaskDecorator taskDecorator)
Creates a new task.
case execution will be the case execution of the created task.This
- Parameters:
taskDecorator
- the task decorator used to create task
-
createSubProcessInstance
PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition)
Creates a new sub process instance.
This
case execution will be the super case execution of the created sub process instance.- Parameters:
processDefinition
- ThePvmProcessDefinition
of the subprocess.
-
createSubProcessInstance
PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey)
Creates a new sub process instance.
This
case execution will be the super case execution of the created sub process instance.- Parameters:
processDefinition
- ThePvmProcessDefinition
of the subprocess.businessKey
- The businessKey to be set on sub process instance.
-
createSubProcessInstance
PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey, java.lang.String caseInstanceId)
Creates a new sub process instance.
This
case execution will be the super case execution of the created sub process instance.- Parameters:
processDefinition
- ThePvmProcessDefinition
of the subprocess.businessKey
- The businessKey to be set on sub process instance.caseInstanceId
- The caseInstanceId to be set on sub process instance.
-
createSubCaseInstance
CmmnCaseInstance createSubCaseInstance(CmmnCaseDefinition caseDefinition)
Creates a new sub case instance.
This
case execution will be the super case execution of the created sub case instance.- Parameters:
caseDefinition
- TheCmmnCaseDefinition
of the sub case instance.
-
createSubCaseInstance
CmmnCaseInstance createSubCaseInstance(CmmnCaseDefinition caseDefinition, java.lang.String businessKey)
Creates a new sub case instance.
This
case execution will be the super case execution of the created sub case instance.- Parameters:
caseDefinition
- TheCmmnCaseDefinition
of the sub case instance.businessKey
- The businessKey to be set on sub case instance.
-
createSentryParts
void createSentryParts()
Creates for each defined
PlanItemOnPart
andIfPart
inside the specifiedSentries
aCmmnSentryPart
.
-
isSentrySatisfied
boolean isSentrySatisfied(java.lang.String sentryId)
Returns
true
, if eachCmmnSentryPart
of the givensentryId
is satisfied.- Parameters:
sentryId
- the id of the sentry to check- Returns:
true
if the sentry is satisfied.
-
isEntryCriterionSatisfied
boolean isEntryCriterionSatisfied()
The flag
entryCriterionSatisfied
will only be set totrue
, whenthis
CmmnActivityExecution
stays in stateCaseExecutionState.NEW
.For example:
There exists:
- a
Stage
, - the
Stage
contains two tasks (A and B) and - task B has an entry criterion which is satisfied,
when task A performs the transition
create
When the
Stage
instance becomes active, two child case executions will be created for task A and task B. Both tasks are in the stateCaseExecutionState.NEW
. Now task A performs thecreate
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 flagentryCriterionSatisfied
will be set totrue
on the case execution of task B in such a situation. When task B performs the transition into the stateCaseExecutionState.AVAILABLE
it can perform the next transition because the entry criterion has been already satisfied. - a
-
fireIfOnlySentryParts
void fireIfOnlySentryParts()
Fire sentries that consist only out of ifPart, are not satisfied yet, but do satisfy condition.
-
-