org.camunda.bpm.engine.impl.cmmn.execution
Class CaseExecutionImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
      extended by org.camunda.bpm.engine.impl.core.instance.CoreExecution
          extended by org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
              extended by org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl
All Implemented Interfaces:
Serializable, BaseDelegateExecution, CmmnModelExecutionContext, DelegateCaseExecution, ProcessEngineServicesAware, VariableScope, CmmnActivityExecution, CmmnCaseInstance, VariableEventDispatcher

public class CaseExecutionImpl
extends CmmnExecution
implements Serializable

Author:
Roman Smirnov
See Also:
Serialized Form

Field Summary
protected  List<CaseExecutionImpl> caseExecutions
           
protected  CaseExecutionImpl caseInstance
           
protected  List<CaseSentryPartImpl> caseSentryParts
           
protected  CaseExecutionImpl parent
           
protected  CaseExecutionImpl subCaseInstance
           
protected  ExecutionImpl subProcessInstance
           
protected  CaseExecutionImpl superCaseExecution
           
protected  SimpleVariableStore variableStore
           
 
Fields inherited from class org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
activity, caseDefinition, currentState, nextActivity, previousState, required, satisfiedSentries, task, variableEventsQueue
 
Fields inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
businessKey, eventName, eventSource, id, listenerIndex, skipCustomListeners
 
Fields inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
cachedElContext
 
Constructor Summary
CaseExecutionImpl()
           
 
Method Summary
protected  void addSentryPart(CmmnSentryPart sentryPart)
           
protected  CaseExecutionImpl createCaseExecution(CmmnActivity activity)
           
 CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition)
          Creates a new sub case instance.
 CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey)
          Creates a new sub case instance.
 PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition)
          Creates a new sub process instance.
 PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey)
          Creates a new sub process instance.
 PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId)
          Creates a new sub process instance.
protected  List<CaseSentryPartImpl> findSentry(String sentryId)
           
 String getActivityId()
           
 String getActivityName()
           
 String getCaseDefinitionId()
           
 List<CaseExecutionImpl> getCaseExecutions()
          Returns a List of child case executions.
protected  List<CaseExecutionImpl> getCaseExecutionsInternal()
           
 CaseExecutionImpl getCaseInstance()
          ensures initialization and returns the process instance.
 List<CaseSentryPartImpl> getCaseSentryParts()
           
 org.camunda.bpm.model.cmmn.instance.CmmnElement getCmmnModelElementInstance()
          Returns the currently executed Element in the Cmmn Model.
 org.camunda.bpm.model.cmmn.CmmnModelInstance getCmmnModelInstance()
          Returns the CmmnModelInstance for the currently executed Cmmn Model
 String getId()
          Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states.
 CaseExecutionImpl getParent()
          ensures initialization and returns the parent
 String getParentId()
           
 ProcessEngineServices getProcessEngineServices()
          Returns the ProcessEngineServices providing access to the public API of the process engine.
protected  Map<String,List<CmmnSentryPart>> getSentries()
           
 CaseExecutionImpl getSubCaseInstance()
           
 ExecutionImpl getSubProcessInstance()
           
 CaseExecutionImpl getSuperCaseExecution()
           
protected  String getToStringIdentity()
           
protected  CoreVariableStore getVariableStore()
           
protected  CaseExecutionImpl newCaseExecution()
           
protected  CmmnSentryPart newSentryPart()
           
 void setCaseInstance(CmmnExecution caseInstance)
           
 void setParent(CmmnExecution parent)
           
 void setSubCaseInstance(CmmnExecution subCaseInstance)
           
 void setSubProcessInstance(PvmExecutionImpl subProcessInstance)
           
 void setSuperCaseExecution(CmmnExecution superCaseExecution)
           
 String toString()
           
 
Methods inherited from class org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
checkAndFireEntryCriteria, checkAndFireExitCriteria, close, collectAffectedSentries, complete, containsIfPart, create, create, createChildExecutions, createIfPart, createOnPart, createSentryPart, createSentryParts, createTask, deleteCascade, disable, dispatchEvent, enable, exit, findCaseExecution, fireEntryCriteria, fireExitCriteria, fireSentries, forceUpdateOnCaseSentryPart, getActivity, getCaseBusinessKey, getCaseDefinition, getCaseInstanceId, getCurrentState, getNextActivity, getParentVariableScope, getPrevious, getPreviousState, getSatisfiedSentries, getState, getTask, getVariableEventQueue, getVariableScopeKey, handleChildTransition, invokeVariableListeners, isActive, isAvailable, isCaseInstanceExecution, isClosed, isCompleted, isDisabled, isEnabled, isFailed, isNew, isRequired, isSentrySatisfied, isSuspended, isSuspending, isTerminated, isTerminating, manualComplete, manualStart, occur, parentResume, parentSuspend, parentTerminate, performExit, performParentSuspension, performParentTerminate, performSuspension, performTerminate, queueVariableEvent, reactivate, reenable, remove, resume, setActivity, setCaseDefinition, setCurrentState, setNextActivity, setPrevious, setRequired, setState, setTask, start, suspend, terminate, triggerChildExecutionsLifecycle
 
Methods inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
getBusinessKey, getEventName, getEventSource, getListenerIndex, invokeListener, isSkipCustomListeners, performOperation, performOperationSync, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners
 
Methods inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
collectVariableNames, collectVariables, getCachedElContext, getSourceActivityVariableScope, getValueFromVariableInstance, getVariable, getVariable, getVariableInstance, getVariableInstanceLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.camunda.bpm.engine.delegate.DelegateCaseExecution
getEventName
 
Methods inherited from interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
getBusinessKey
 
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
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
 

Field Detail

caseExecutions

protected List<CaseExecutionImpl> caseExecutions

caseSentryParts

protected List<CaseSentryPartImpl> caseSentryParts

caseInstance

protected CaseExecutionImpl caseInstance

parent

protected CaseExecutionImpl parent

subProcessInstance

protected ExecutionImpl subProcessInstance

subCaseInstance

protected CaseExecutionImpl subCaseInstance

superCaseExecution

protected CaseExecutionImpl superCaseExecution

variableStore

protected SimpleVariableStore variableStore
Constructor Detail

CaseExecutionImpl

public CaseExecutionImpl()
Method Detail

getCaseDefinitionId

public String getCaseDefinitionId()
Specified by:
getCaseDefinitionId in interface DelegateCaseExecution

getParent

public CaseExecutionImpl getParent()
Description copied from class: CmmnExecution
ensures initialization and returns the parent

Specified by:
getParent in interface CmmnActivityExecution
Specified by:
getParent in class CmmnExecution
Returns:
a parent or null.

setParent

public void setParent(CmmnExecution parent)
Specified by:
setParent in class CmmnExecution

getParentId

public String getParentId()
Specified by:
getParentId in interface DelegateCaseExecution

getActivityId

public String getActivityId()
Specified by:
getActivityId in interface DelegateCaseExecution

getActivityName

public String getActivityName()
Specified by:
getActivityName in interface DelegateCaseExecution

getCaseExecutions

public List<CaseExecutionImpl> getCaseExecutions()
Description copied from interface: CmmnActivityExecution

Returns a List of child case executions. If this case execution has no child case executions an empty List will be returned.

Specified by:
getCaseExecutions in interface CmmnActivityExecution
Specified by:
getCaseExecutions in class CmmnExecution
Returns:
a List of child case executions.

getCaseExecutionsInternal

protected List<CaseExecutionImpl> getCaseExecutionsInternal()
Specified by:
getCaseExecutionsInternal in class CmmnExecution

getCaseInstance

public CaseExecutionImpl getCaseInstance()
Description copied from class: CmmnExecution
ensures initialization and returns the process instance.

Specified by:
getCaseInstance in class CmmnExecution

setCaseInstance

public void setCaseInstance(CmmnExecution caseInstance)
Specified by:
setCaseInstance in class CmmnExecution

getSubProcessInstance

public ExecutionImpl getSubProcessInstance()
Specified by:
getSubProcessInstance in class CmmnExecution

setSubProcessInstance

public void setSubProcessInstance(PvmExecutionImpl subProcessInstance)
Specified by:
setSubProcessInstance in class CmmnExecution

createSubProcessInstance

public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition)
Description copied from interface: CmmnActivityExecution

Creates a new sub process instance.

This case execution will be the super case execution of the created sub process instance.

Specified by:
createSubProcessInstance in interface CmmnActivityExecution
Specified by:
createSubProcessInstance in class CmmnExecution
Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.

createSubProcessInstance

public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition,
                                                 String businessKey)
Description copied from interface: CmmnActivityExecution

Creates a new sub process instance.

This case execution will be the super case execution of the created sub process instance.

Specified by:
createSubProcessInstance in interface CmmnActivityExecution
Specified by:
createSubProcessInstance in class CmmnExecution
Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.
businessKey - The businessKey to be set on sub process instance.

createSubProcessInstance

public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition,
                                                 String businessKey,
                                                 String caseInstanceId)
Description copied from interface: CmmnActivityExecution

Creates a new sub process instance.

This case execution will be the super case execution of the created sub process instance.

Specified by:
createSubProcessInstance in interface CmmnActivityExecution
Specified by:
createSubProcessInstance in class CmmnExecution
Parameters:
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.

getSubCaseInstance

public CaseExecutionImpl getSubCaseInstance()
Specified by:
getSubCaseInstance in class CmmnExecution

setSubCaseInstance

public void setSubCaseInstance(CmmnExecution subCaseInstance)
Specified by:
setSubCaseInstance in class CmmnExecution

createSubCaseInstance

public CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition)
Description copied from interface: CmmnActivityExecution

Creates a new sub case instance.

This case execution will be the super case execution of the created sub case instance.

Specified by:
createSubCaseInstance in interface CmmnActivityExecution
Specified by:
createSubCaseInstance in class CmmnExecution
Parameters:
caseDefinition - The CmmnCaseDefinition of the subprocess.

createSubCaseInstance

public CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition,
                                               String businessKey)
Description copied from interface: CmmnActivityExecution

Creates a new sub case instance.

This case execution will be the super case execution of the created sub case instance.

Specified by:
createSubCaseInstance in interface CmmnActivityExecution
Specified by:
createSubCaseInstance in class CmmnExecution
Parameters:
caseDefinition - The CmmnCaseDefinition of the subprocess.
businessKey - The businessKey to be set on sub case instance.

getSuperCaseExecution

public CaseExecutionImpl getSuperCaseExecution()
Specified by:
getSuperCaseExecution in class CmmnExecution

setSuperCaseExecution

public void setSuperCaseExecution(CmmnExecution superCaseExecution)
Specified by:
setSuperCaseExecution in class CmmnExecution

getCaseSentryParts

public List<CaseSentryPartImpl> getCaseSentryParts()
Specified by:
getCaseSentryParts in class CmmnExecution

getSentries

protected Map<String,List<CmmnSentryPart>> getSentries()
Specified by:
getSentries in class CmmnExecution

findSentry

protected List<CaseSentryPartImpl> findSentry(String sentryId)
Specified by:
findSentry in class CmmnExecution

addSentryPart

protected void addSentryPart(CmmnSentryPart sentryPart)
Specified by:
addSentryPart in class CmmnExecution

newSentryPart

protected CmmnSentryPart newSentryPart()
Specified by:
newSentryPart in class CmmnExecution

createCaseExecution

protected CaseExecutionImpl createCaseExecution(CmmnActivity activity)
Specified by:
createCaseExecution in class CmmnExecution

newCaseExecution

protected CaseExecutionImpl newCaseExecution()
Specified by:
newCaseExecution in class CmmnExecution

getVariableStore

protected CoreVariableStore getVariableStore()
Specified by:
getVariableStore in class AbstractVariableScope

toString

public String toString()
Overrides:
toString in class CmmnExecution

getToStringIdentity

protected String getToStringIdentity()
Overrides:
getToStringIdentity in class CmmnExecution

getId

public String getId()
Description copied from interface: BaseDelegateExecution
Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states.

Specified by:
getId in interface BaseDelegateExecution
Specified by:
getId in interface DelegateCaseExecution
Overrides:
getId in class CoreExecution

getProcessEngineServices

public ProcessEngineServices getProcessEngineServices()
Description copied from interface: ProcessEngineServicesAware
Returns the ProcessEngineServices providing access to the public API of the process engine.

Specified by:
getProcessEngineServices in interface ProcessEngineServicesAware
Returns:
the ProcessEngineServices.

getCmmnModelElementInstance

public org.camunda.bpm.model.cmmn.instance.CmmnElement getCmmnModelElementInstance()
Description copied from interface: CmmnModelExecutionContext

Returns the currently executed Element in the Cmmn Model. This method returns a CmmnElement which may be casted to the concrete type of the Cmmn Model Element currently executed.

Specified by:
getCmmnModelElementInstance in interface CmmnModelExecutionContext
Returns:
the CmmnElement corresponding to the current Cmmn Model Element

getCmmnModelInstance

public org.camunda.bpm.model.cmmn.CmmnModelInstance getCmmnModelInstance()
Description copied from interface: CmmnModelExecutionContext
Returns the CmmnModelInstance for the currently executed Cmmn Model

Specified by:
getCmmnModelInstance in interface CmmnModelExecutionContext
Returns:
the current CmmnModelInstance


Copyright © 2014 camunda services GmbH. All rights reserved.