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 voidclose()Transition toCaseExecutionState.CLOSEDstate when no further work or modifications should be allowed for this case instance.voidcomplete()Transition toCaseExecutionState.COMPLETEDstate.java.util.List<CmmnExecution>createChildExecutions(java.util.List<CmmnActivity> activities)Creates new child case executions for each givenCmmnActivity.voidcreateSentryParts()CmmnCaseInstancecreateSubCaseInstance(CmmnCaseDefinition caseDefinition)Creates a new sub case instance.CmmnCaseInstancecreateSubCaseInstance(CmmnCaseDefinition caseDefinition, java.lang.String businessKey)Creates a new sub case instance.PvmProcessInstancecreateSubProcessInstance(PvmProcessDefinition processDefinition)Creates a new sub process instance.PvmProcessInstancecreateSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey)Creates a new sub process instance.PvmProcessInstancecreateSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey, java.lang.String caseInstanceId)Creates a new sub process instance.TaskcreateTask(TaskDecorator taskDecorator)Creates a new task.voiddisable()Transition to state.voidenable()Transition toCaseExecutionState.ENABLEDstate.voidexit()Transition toCaseExecutionState.TERMINATING_ON_EXITstate.voidfireIfOnlySentryParts()Fire sentries that consist only out of ifPart, are not satisfied yet, but do satisfy condition.CmmnActivitygetActivity()Returns theactivitywhich is associated withthiscase execution.java.util.List<? extends CmmnExecution>getCaseExecutions()Returns aListof child case executions.CaseExecutionStategetCurrentState()Returns thecurrent stateofthiscase execution.CmmnActivityExecutiongetParent()Returns the parent ofthiscase execution, or null if there is no parent.CaseExecutionStategetPreviousState()Returns theprevious stateofthiscase execution.booleanisCaseInstanceExecution()Returnstrueifthiscase execution is a case instance.booleanisEntryCriterionSatisfied()The flagentryCriterionSatisfiedwill only be set totrue, whenthisCmmnActivityExecutionstays in stateCaseExecutionState.NEW.booleanisNew()booleanisRequired()Returns true, ifthiscase execution is required.booleanisSentrySatisfied(java.lang.String sentryId)booleanisSuspending()booleanisTerminating()voidmanualComplete()Transition toCaseExecutionState.COMPLETEDstate.voidmanualStart()Transition toCaseExecutionState.ACTIVEstate.voidoccur()Transition toCaseExecutionState.COMPLETEDstate.voidparentComplete()Transition toCaseExecutionState.TERMINATEDstate.voidparentResume()Transition to the previous state (CaseExecutionState.AVAILABLE,CaseExecutionState.ENABLED,CaseExecutionState.DISABLEDorCaseExecutionState.ACTIVE) when the parentStagetransitions out ofCaseExecutionState.SUSPENDED.voidparentSuspend()Transition toCaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSIONstate.voidparentTerminate()Transition toCaseExecutionState.TERMINATING_ON_PARENT_TERMINATIONstate.voidperformExit()Transition toCaseExecutionState.TERMINATEDstate.voidperformParentSuspension()Transition toCaseExecutionState.SUSPENDEDstate.voidperformParentTerminate()Transition toCaseExecutionState.TERMINATEDstate.voidperformSuspension()Transition toCaseExecutionState.SUSPENDEDstate.voidperformTerminate()Transition toCaseExecutionState.TERMINATEDstate.voidreactivate()Transition toCaseExecutionState.ACTIVEstate.voidreenable()Transition toCaseExecutionState.ENABLEDstate.voidremove()Removesthiscase execution from the parent case execution.voidresume()Transition to either toCaseExecutionState.ACTIVEstate, ifthiscase execution is associated with aStageorTask, or toCaseExecutionState#AVAILABE, ifthiscase execution is associated with aEventListenerorMilestone.voidsetCurrentState(CaseExecutionState currentState)Sets the givenstateas the current state ofthiscase execution.voidsetRequired(boolean required)Setsthiscase execution as required or not required.voidstart()Transition toCaseExecutionState.ACTIVEstate.voidsuspend()Transition toCaseExecutionState.SUSPENDING_ON_SUSPENSIONstate.voidterminate()Transition toCaseExecutionState.TERMINATING_ON_TERMINATIONstate.voidtriggerChildExecutionsLifecycle(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
thiscase execution, or null if there is no parent.- Returns:
- a
parentor null.
-
isCaseInstanceExecution
boolean isCaseInstanceExecution()
Returns
trueifthiscase execution is a case instance. Ifthiscase execution is not a case instance thenfalsewill be returned.- Returns:
- whether
thiscase execution is a case instance or not.
-
getCurrentState
CaseExecutionState getCurrentState()
Returns the
current stateofthiscase execution.- Returns:
- the
current state
-
setCurrentState
void setCurrentState(CaseExecutionState currentState)
Sets the given
stateas the current state ofthiscase execution.- Parameters:
currentState- the current state to set
-
getPreviousState
CaseExecutionState getPreviousState()
Returns the
previous stateofthiscase execution.- Returns:
- the
previous state
-
isNew
boolean isNew()
Returns
trueiff:
getCurrentState()==CaseExecutionState.NEW- Returns:
- whether
thiscase execution has as current stateCaseExecutionState.NEW
-
isTerminating
boolean isTerminating()
Returns
trueiff:
getCurrentState()==CaseExecutionState.TERMINATING_ON_TERMINATION||getCurrentState()==CaseExecutionState.TERMINATING_ON_PARENT_TERMINATION||getCurrentState()==CaseExecutionState.TERMINATING_ON_EXIT- Returns:
- whether
thiscase execution has as current stateCaseExecutionState.TERMINATING_ON_TERMINATION,CaseExecutionState.TERMINATING_ON_PARENT_TERMINATIONorCaseExecutionState.TERMINATING_ON_EXIT
-
isSuspending
boolean isSuspending()
Returns
trueiff:
getCurrentState()==CaseExecutionState.SUSPENDING_ON_SUSPENSION||getCurrentState()==CaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION- Returns:
- whether
thiscase execution has as current stateCaseExecutionState.SUSPENDING_ON_SUSPENSIONorCaseExecutionState.SUSPENDING_ON_PARENT_SUSPENSION
-
getActivity
CmmnActivity getActivity()
Returns the
activitywhich is associated withthiscase 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 whenthiscase execution (which represents aStage) transitions toACTIVEstate. The passed collection ofactivitiesare the planned items that should be executed in thisStage. So that for each givenCmmnActivitya new case execution will be instantiated. Furthermore for each created child execution there happens a transition to the initial stateAVAILABLE.- Parameters:
activities- a collection ofactivitiesof planned items to execute insidethiscase 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 executionto trigger for each given case execution the lifecycle
-
enable
void enable()
Transition to
CaseExecutionState.ENABLEDstate.Thiscase execution must be inCaseExecutionState.AVAILABLEstate to be able to do this transition.It is only possible to enable a case execution which is associated with a
StageorTask.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase execution is notCaseExecutionState.AVAILABLE.ProcessEngineException- when an internal exception happens during the execution of the command.
-
disable
void disable()
Transition to state.
Thiscase execution must be inCaseExecutionState.ENABLEDstate to be able to do this transition.It is only possible to disable a case execution which is associated with a
StageorTask.If
thiscase execution has a parent case execution, that parent case execution will be notified thatthiscase 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, ifthiscase execution is notCaseExecutionState.ENABLED.ProcessEngineException- when an internal exception happens during the execution of the command.
-
reenable
void reenable()
Transition to
CaseExecutionState.ENABLEDstate.Thiscase execution must be inCaseExecutionState.DISABLEDstate to be able to do this transition.It is only possible to re-enable a case execution which is associated with a
StageorTask.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase execution is notCaseExecutionState.DISABLED.ProcessEngineException- when an internal exception happens during the execution of the command.
-
manualStart
void manualStart()
Transition to
CaseExecutionState.ACTIVEstate.Thiscase execution must be inCaseExecutionState.ENABLEDstate to be able to do this transition.It is only possible to start a case execution manually which is associated with a
StageorTask.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase execution is notCaseExecutionState.ENABLED.ProcessEngineException- when an internal exception happens during the execution of the command.
-
start
void start()
Transition to
CaseExecutionState.ACTIVEstate.Thiscase execution must be inCaseExecutionState.AVAILABLEstate to be able to do this transition.It is only possible to start a case execution which is associated with a
StageorTask.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase execution is notCaseExecutionState.AVAILABLE.ProcessEngineException- when an internal exception happens during the execution of the command.
-
complete
void complete()
Transition to
CaseExecutionState.COMPLETEDstate.Thiscase execution must be inCaseExecutionState.ACTIVEstate to be able to do this transition.It is only possible to complete a case execution which is associated with a
StageorTask.If
thiscase execution has a parent case execution, that parent case execution will be notified thatthiscase 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
Stagethe completion can only be performed when the following criteria are fulfilled:
- there are no children in the state
CaseExecutionState.ACTIVEorCaseExecutionState.NEW - if the property
autoCompleteof the associatedStageis set totrue:- all required (
requiredRuleevaluates totrue) children are in state
- all required (
- if the property
autoCompleteof the associatedStageis set tofalse:
For a
Taskinstance, this means its purpose has been accomplished:
HumanTaskhave been completed by human.CaseTaskhave launched a newCaseInstanceand if output parameters are required and/or the propertyisBlockingis set totrue, then the launchedCaseInstancehas completed and returned the output parameters.ProcessTaskhave launched a newProcessInstanceand if output parameters are required and/or the propertyisBlockingis set totrue, then the launchedProcessInstancehas completed and returned the output parameters.
- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase execution is notCaseExecutionState.ACTIVEor 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.COMPLETEDstate.Thiscase execution must be inCaseExecutionState.ACTIVEstate to be able to do this transition.It is only possible to complete a case execution manually which is associated with a
StageorTask.If
thiscase execution has a parent case execution, that parent case execution will be notified thatthiscase 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
Stagethe completion can only be performed when the following criteria are fulfilled:
- there are no children in the state
CaseExecutionState.ACTIVEorCaseExecutionState.NEW - all required (
requiredRuleevaluates totrue) children are in state
For a
Taskinstance, this means its purpose has been accomplished:
HumanTaskhave been completed by human.
- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase execution is notCaseExecutionState.ACTIVEor 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.COMPLETEDstate.Thiscase execution must be inCaseExecutionState.AVAILABLEstate to be able to do this transition.For
Forevent listenertransitions when the event being listened by theevent listenerinstance does occur. For auser event listenerinstance this transition happens when a human decides to raise the event.Milestoneinstance transitions when one of the achievingsentries(entry criteria) is satisfied.If
thiscase execution has a parent case execution, that parent case execution will be notified thatthiscase 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, ifthiscase execution is notCaseExecutionState.AVAILABLE.ProcessEngineException- when an internal exception happens during the execution of the command.
-
terminate
void terminate()
Transition to
CaseExecutionState.TERMINATING_ON_TERMINATIONstate.If
thiscase execution is associated with aStageorTask, thenthiscase execution must be inCaseExecutionState.ACTIVEstate to be able to do this transition.
And ifthiscase execution is association withEventListeneror aMilestone, thenthiscase execution must be inCaseExecutionState.AVAILABLEstate to be able to do this transition.For a
Stageinstance the termination ofthiscase execution will be propagated down to all its containedEventListener,Milestone,Stage, andTaskinstances.In case of a
Stagethis 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, ifthiscase 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.TERMINATEDstate.If
thiscase execution has a parent case execution, that parent case execution will be notified thatthiscase 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, ifthiscase 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_TERMINATIONstate.Thiscase execution must be inCaseExecutionState.AVAILABLEorCaseExecutionState.SUSPENDEDstate 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
EventListenerorMilestone.Afterwards the method
performParentTerminate()must be called to complete the transition into the stateCaseExecutionState.TERMINATED.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.TERMINATEDstate.Thiscase execution must be inCaseExecutionState.AVAILABLEorCaseExecutionState.SUSPENDEDstate 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
EventListenerorMilestone.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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_EXITstate.Thiscase 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.SUSPENDEDorCaseExecutionState.FAILED
It is only possible to execute an exit on a case execution which is associated with a
StageorTask.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
thiscase execution has a parent case execution, that parent case execution will be notified thatthiscase 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, ifthiscase 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.TERMINATEDstate.- Throws:
ProcessEngineException- when an internal exception happens during the execution of the command.
-
performExit
void performExit()
Transition to
CaseExecutionState.TERMINATEDstate.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, ifthiscase 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_SUSPENSIONstate.If
thiscase execution is associated with aStageorTask, thenthiscase execution must be inCaseExecutionState.ACTIVEstate to be able to do this transition.
And ifthiscase execution is association withEventListeneror aMilestone, thenthiscase execution must be inCaseExecutionState.AVAILABLEstate to be able to do this transition.For a
Stageinstance the suspension ofthiscase execution will be propagated down to all its containedEventListener,Milestone,Stage, andTaskinstances.Afterwards the method
performSuspension()must be called to complete the transition into the stateCaseExecutionState.SUSPENDED.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.SUSPENDEDstate.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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_SUSPENSIONstate.Thiscase execution must be in one of the following state to be able to do this transition:CaseExecutionState.AVAILABLE,CaseExecutionState.ENABLED,CaseExecutionState.DISABLEDorCaseExecutionState.ACTIVE
It is only possible to execute a parent suspension on a case execution which is associated with a
StageorTask.Afterwards the method
performParentSuspension()must be called to complete the transition into the stateCaseExecutionState.SUSPENDED.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.SUSPENDEDstate.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.ACTIVEstate, ifthiscase execution is associated with aStageorTask, or toCaseExecutionState#AVAILABE, ifthiscase execution is associated with aEventListenerorMilestone.Thiscase execution must be inCaseExecutionState.SUSPENDEDstate to be able to do this transition.For a
Stageinstance the resume ofthiscase execution will be propagated down to all its containedEventListener,Milestone,Stage, andTaskinstances.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.DISABLEDorCaseExecutionState.ACTIVE) when the parentStagetransitions out ofCaseExecutionState.SUSPENDED.Thiscase execution must be inCaseExecutionState.SUSPENDEDstate 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
StageorTask.- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.ACTIVEstate.If
thiscase execution is associated with aStageorTaskand is not a case instance, thenthiscase execution must be inCaseExecutionState.FAILEDstate to be able to do this transition.
And ifthiscase execution is a case instance, thenthiscase instance must be in one of the following state to perform this transition:CaseExecutionState.COMPLETED,CaseExecutionState.SUSPENDED,CaseExecutionState.TERMINATEDorCaseExecutionState.FAILED
In case of a case instance the transition out of
CaseExecutionState.SUSPENDEDstate the resume will be propagated down to all its containedEventListener,Milestone,Stage, andTaskinstances, seeresume()andparentResume().- Throws:
CaseIllegalStateTransitionException- will be thrown, ifthiscase 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.CLOSEDstate 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, ifthiscase 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
thiscase execution is required.- Returns:
- true if
thiscase execution is required.
-
setRequired
void setRequired(boolean required)
Sets
thiscase execution as required or not required.- Parameters:
required- a boolean value whetherthiscase execution is required or not required.
-
remove
void remove()
Removes
thiscase execution from the parent case execution.
-
getCaseExecutions
java.util.List<? extends CmmnExecution> getCaseExecutions()
Returns a
Listof child case executions. Ifthiscase execution has no child case executions an emptyListwill be returned.- Returns:
- a
Listof 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.
Thiscase execution will be the super case execution of the created sub process instance.- Parameters:
processDefinition- ThePvmProcessDefinitionof the subprocess.
-
createSubProcessInstance
PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition, java.lang.String businessKey)
Creates a new sub process instance.
Thiscase execution will be the super case execution of the created sub process instance.- Parameters:
processDefinition- ThePvmProcessDefinitionof 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.
Thiscase execution will be the super case execution of the created sub process instance.- Parameters:
processDefinition- ThePvmProcessDefinitionof 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.
Thiscase execution will be the super case execution of the created sub case instance.- Parameters:
caseDefinition- TheCmmnCaseDefinitionof the sub case instance.
-
createSubCaseInstance
CmmnCaseInstance createSubCaseInstance(CmmnCaseDefinition caseDefinition, java.lang.String businessKey)
Creates a new sub case instance.
Thiscase execution will be the super case execution of the created sub case instance.- Parameters:
caseDefinition- TheCmmnCaseDefinitionof the sub case instance.businessKey- The businessKey to be set on sub case instance.
-
createSentryParts
void createSentryParts()
Creates for each defined
PlanItemOnPartandIfPartinside the specifiedSentriesaCmmnSentryPart.
-
isSentrySatisfied
boolean isSentrySatisfied(java.lang.String sentryId)
Returns
true, if eachCmmnSentryPartof the givensentryIdis satisfied.- Parameters:
sentryId- the id of the sentry to check- Returns:
trueif the sentry is satisfied.
-
isEntryCriterionSatisfied
boolean isEntryCriterionSatisfied()
The flag
entryCriterionSatisfiedwill only be set totrue, whenthisCmmnActivityExecutionstays in stateCaseExecutionState.NEW.For example:
There exists:
- a
Stage, - the
Stagecontains two tasks (A and B) and - task B has an entry criterion which is satisfied,
when task A performs the transition
create
When the
Stageinstance 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 thecreatetransition 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.NEWand will not be notified, that its' entry criterion has been satisfied. That's why the the flagentryCriterionSatisfiedwill be set totrueon the case execution of task B in such a situation. When task B performs the transition into the stateCaseExecutionState.AVAILABLEit 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.
-
-