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

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.variable.CoreVariableScope
      extended by org.camunda.bpm.engine.impl.core.instance.CoreExecution
          extended by org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
All Implemented Interfaces:
Serializable, BaseDelegateExecution, DelegatePlanItem, ProcessEngineServicesAware, VariableScope, CmmnActivityExecution, CmmnCaseInstance
Direct Known Subclasses:
PlanItemImpl

public abstract class CmmnExecution
extends CoreExecution
implements CmmnCaseInstance

Author:
Roman Smirnov
See Also:
Serialized Form

Field Summary
protected  CmmnActivity activity
          current activity
protected  String activityInstanceId
          the unique id of the current activity instance
protected  CmmnCaseDefinition caseDefinition
           
protected  CmmnActivity nextActivity
          the activity which is to be started next
protected  int previousState
           
protected  int state
           
 
Fields inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
businessKey, eventName, eventSource, id, listenerIndex
 
Fields inherited from class org.camunda.bpm.engine.impl.core.variable.CoreVariableScope
cachedElContext
 
Constructor Summary
CmmnExecution()
           
 
Method Summary
 void complete()
           
 void create()
          Creates new case instance without businessKey and variables
 void create(List<CmmnActivity> activities)
           
 void create(Map<String,Object> variables)
          Creates new case instance with variables but without businessKey
 void create(String businessKey)
          Creates new case instance with businessKey but without variables
 void create(String businessKey, Map<String,Object> variables)
          Creates new case instance with businessKey and variables
protected abstract  CmmnExecution createPlanItem(CmmnActivity activity)
           
 void disable()
           
 void enable()
           
 CmmnExecution findPlanItem(String activityId)
           
protected abstract  String generateActivityInstanceId(String activityId)
           
 CmmnActivity getActivity()
          ensures initialization and returns the activity
 String getActivityInstanceId()
           
 String getCaseBusinessKey()
           
 CmmnCaseDefinition getCaseDefinition()
           
abstract  CmmnExecution getCaseInstance()
          ensures initialization and returns the process instance.
 String getCaseInstanceId()
          ensures initialization and returns the process instance.
 CmmnActivity getNextActivity()
           
abstract  CmmnExecution getParent()
          ensures initialization and returns the parent
 String getParentActivityInstanceId()
           
protected  CoreVariableScope getParentVariableScope()
           
abstract  List<? extends CmmnExecution> getPlanItems()
           
 int getPreviousState()
           
 int getState()
           
protected  String getToStringIdentity()
           
 boolean isActive()
           
 boolean isAvailable()
           
 boolean isCaseInstance()
           
 boolean isClosed()
           
 boolean isCompleted()
           
 boolean isDisabled()
           
 boolean isEnabled()
           
 boolean isFailed()
           
 boolean isSuspended()
           
 boolean isTerminated()
           
 void manualStart()
           
protected abstract  CmmnExecution newPlanItem()
           
 void reenable()
           
 void setActivity(CmmnActivity activity)
           
 void setActivityInstanceId(String activityInstanceId)
           
 void setCaseDefinition(CmmnCaseDefinition caseDefinition)
           
abstract  void setCaseInstance(CmmnExecution caseInstance)
           
 void setNextActivity(CmmnActivity nextActivity)
           
abstract  void setParent(CmmnExecution parent)
           
 void setPreviousState(int previousState)
           
 void setState(int state)
           
 void setState(PlanItemState state)
           
 void start()
           
 String toString()
           
protected  void transition(PlanItemState from, PlanItemState to, CmmnAtomicOperation nextOperation)
           
 
Methods inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
getBusinessKey, getEventName, getEventSource, getId, getListenerIndex, invokeListener, performOperation, performOperationSync, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex
 
Methods inherited from class org.camunda.bpm.engine.impl.core.variable.CoreVariableScope
collectVariableNames, collectVariables, createVariableInstance, createVariableLocal, createVariableLocal, createVariablesLocal, getCachedElContext, getSourceActivityVariableScope, getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariableStore, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal, updateVariableInstance
 
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.DelegatePlanItem
getActivityId, getActivityName, getCaseDefinitionId, getEventName, getId, getParentId
 
Methods inherited from interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
getBusinessKey
 
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
 
Methods inherited from interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
getProcessEngineServices
 

Field Detail

caseDefinition

protected transient CmmnCaseDefinition caseDefinition

activity

protected transient CmmnActivity activity
current activity


nextActivity

protected transient CmmnActivity nextActivity
the activity which is to be started next


activityInstanceId

protected String activityInstanceId
the unique id of the current activity instance


previousState

protected int previousState

state

protected int state
Constructor Detail

CmmnExecution

public CmmnExecution()
Method Detail

getPlanItems

public abstract List<? extends CmmnExecution> getPlanItems()

findPlanItem

public CmmnExecution findPlanItem(String activityId)
Specified by:
findPlanItem in interface CmmnCaseInstance

getCaseBusinessKey

public String getCaseBusinessKey()
Specified by:
getCaseBusinessKey in interface DelegatePlanItem

getCaseDefinition

public CmmnCaseDefinition getCaseDefinition()

setCaseDefinition

public void setCaseDefinition(CmmnCaseDefinition caseDefinition)

getCaseInstance

public abstract CmmnExecution getCaseInstance()
ensures initialization and returns the process instance.


setCaseInstance

public abstract void setCaseInstance(CmmnExecution caseInstance)

isCaseInstance

public boolean isCaseInstance()

getCaseInstanceId

public String getCaseInstanceId()
ensures initialization and returns the process instance.

Specified by:
getCaseInstanceId in interface DelegatePlanItem

getParent

public abstract CmmnExecution getParent()
ensures initialization and returns the parent


setParent

public abstract void setParent(CmmnExecution parent)

getActivity

public CmmnActivity getActivity()
ensures initialization and returns the activity

Specified by:
getActivity in interface CmmnActivityExecution

setActivity

public void setActivity(CmmnActivity activity)

getActivityInstanceId

public String getActivityInstanceId()
Specified by:
getActivityInstanceId in interface DelegatePlanItem

setActivityInstanceId

public void setActivityInstanceId(String activityInstanceId)

generateActivityInstanceId

protected abstract String generateActivityInstanceId(String activityId)

getNextActivity

public CmmnActivity getNextActivity()

setNextActivity

public void setNextActivity(CmmnActivity nextActivity)

getParentActivityInstanceId

public String getParentActivityInstanceId()
Specified by:
getParentActivityInstanceId in interface DelegatePlanItem

getParentVariableScope

protected CoreVariableScope getParentVariableScope()
Specified by:
getParentVariableScope in class CoreVariableScope

getState

public int getState()

setState

public void setState(PlanItemState state)

setState

public void setState(int state)

isAvailable

public boolean isAvailable()
Specified by:
isAvailable in interface DelegatePlanItem

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface DelegatePlanItem

isDisabled

public boolean isDisabled()
Specified by:
isDisabled in interface DelegatePlanItem

isActive

public boolean isActive()
Specified by:
isActive in interface DelegatePlanItem

isCompleted

public boolean isCompleted()
Specified by:
isCompleted in interface DelegatePlanItem

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface DelegatePlanItem

isTerminated

public boolean isTerminated()
Specified by:
isTerminated in interface DelegatePlanItem

isFailed

public boolean isFailed()
Specified by:
isFailed in interface DelegatePlanItem

isClosed

public boolean isClosed()
Specified by:
isClosed in interface DelegatePlanItem

getPreviousState

public int getPreviousState()

setPreviousState

public void setPreviousState(int previousState)

create

public void create()
Creates new case instance without businessKey and variables

Specified by:
create in interface CmmnCaseInstance

create

public void create(Map<String,Object> variables)
Creates new case instance with variables but without businessKey

Specified by:
create in interface CmmnCaseInstance

create

public void create(String businessKey)
Creates new case instance with businessKey but without variables

Specified by:
create in interface CmmnCaseInstance

create

public void create(String businessKey,
                   Map<String,Object> variables)
Creates new case instance with businessKey and variables

Specified by:
create in interface CmmnCaseInstance

create

public void create(List<CmmnActivity> activities)
Specified by:
create in interface CmmnActivityExecution

createPlanItem

protected abstract CmmnExecution createPlanItem(CmmnActivity activity)

newPlanItem

protected abstract CmmnExecution newPlanItem()

enable

public void enable()
Specified by:
enable in interface CmmnActivityExecution

disable

public void disable()
Specified by:
disable in interface CmmnActivityExecution

reenable

public void reenable()
Specified by:
reenable in interface CmmnActivityExecution

manualStart

public void manualStart()
Specified by:
manualStart in interface CmmnActivityExecution

start

public void start()
Specified by:
start in interface CmmnActivityExecution

complete

public void complete()
Specified by:
complete in interface CmmnActivityExecution

transition

protected void transition(PlanItemState from,
                          PlanItemState to,
                          CmmnAtomicOperation nextOperation)

toString

public String toString()
Overrides:
toString in class Object

getToStringIdentity

protected String getToStringIdentity()


Copyright © 2014 camunda services GmbH. All Rights Reserved.