org.camunda.bpm.engine.impl.pvm.process
Class ProcessDefinitionImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.model.CoreModelElement
      extended by org.camunda.bpm.engine.impl.core.model.CoreActivity
          extended by org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
              extended by org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
All Implemented Interfaces:
Serializable, PvmProcessDefinition, PvmProcessElement, PvmScope, ReadOnlyProcessDefinition
Direct Known Subclasses:
ProcessDefinitionEntity

public class ProcessDefinitionImpl
extends ScopeImpl
implements PvmProcessDefinition

Author:
Tom Baeyens, Daniel Meyer
See Also:
Serialized Form

Field Summary
protected  String description
           
protected  ActivityImpl initial
           
protected  Map<ActivityImpl,List<ActivityImpl>> initialActivityStacks
           
protected  List<LaneSet> laneSets
           
protected  String name
           
protected  ParticipantProcess participantProcess
           
 
Fields inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
flowActivities, isSubProcessScope, namedFlowActivities, processDefinition
 
Fields inherited from class org.camunda.bpm.engine.impl.core.model.CoreActivity
ioMapping
 
Fields inherited from class org.camunda.bpm.engine.impl.core.model.CoreModelElement
builtInListeners, builtInVariableListeners, id, listeners, properties, variableListeners
 
Constructor Summary
ProcessDefinitionImpl(String id)
           
 
Method Summary
 void addLaneSet(LaneSet newLaneSet)
           
 PvmProcessInstance createProcessInstance()
           
protected  PvmExecutionImpl createProcessInstance(ActivityImpl startActivity)
           
 PvmProcessInstance createProcessInstance(String businessKey)
           
 PvmProcessInstance createProcessInstance(String businessKey, String caseInstanceId)
           
 PvmProcessInstance createProcessInstanceForInitial(ActivityImpl initial)
          creates a process instance using the provided activity as initial
 CoreActivityBehavior<? extends BaseDelegateExecution> getActivityBehavior()
           
 String getDeploymentId()
           
 String getDescription()
           
 String getDiagramResourceName()
           
 PvmScope getEventScope()
          The event scope for an activity is the scope in which the activity listens for events.
 ScopeImpl getFlowScope()
          The flow scope of the activity.
 ActivityImpl getInitial()
           
 List<ActivityImpl> getInitialActivityStack()
           
 List<ActivityImpl> getInitialActivityStack(ActivityImpl startActivity)
           
 Lane getLaneForId(String id)
           
 List<LaneSet> getLaneSets()
           
 PvmScope getLevelOfSubprocessScope()
          The "level of subprocess scope" as defined in bpmn: this is the subprocess containing the activity.
 ParticipantProcess getParticipantProcess()
           
protected  void insertProcessInstance(PvmExecutionImpl processInstance)
           
 boolean isScope()
          Indicates whether this is a local scope for variables and events if true, there will _always_ be a scope execution created for it.
 boolean isSubProcessScope()
          Indicates whether this scope is a sub process scope.
 void setInitial(ActivityImpl initial)
           
 void setParticipantProcess(ParticipantProcess participantProcess)
           
 String toString()
           
 
Methods inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
addExecutionListener, addExecutionListener, contains, createActivity, findActivity, findActivityAtLevelOfSubprocess, findTransition, getActivities, getChildActivity, getExecutionListeners, getExecutionListeners, getProcessDefinition, setSubProcessScope
 
Methods inherited from class org.camunda.bpm.engine.impl.core.model.CoreActivity
createActivity, getIoMapping, setIoMapping
 
Methods inherited from class org.camunda.bpm.engine.impl.core.model.CoreModelElement
addBuiltInListener, addBuiltInListener, addBuiltInVariableListener, addBuiltInVariableListener, addListener, addListener, addListenerToMap, addVariableListener, addVariableListener, getBuiltInListeners, getBuiltInListeners, getBuiltInVariableListeners, getBuiltInVariableListenersLocal, getId, getListeners, getListeners, getName, getProperties, getProperty, getVariableListeners, getVariableListenersLocal, setId, setName, setProperties, setProperty
 
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.impl.pvm.ReadOnlyProcessDefinition
getName
 
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmScope
findActivity, findActivityAtLevelOfSubprocess, findTransition, getActivities
 
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmProcessElement
getId, getProcessDefinition, getProperty
 

Field Detail

name

protected String name

description

protected String description

initial

protected ActivityImpl initial

initialActivityStacks

protected Map<ActivityImpl,List<ActivityImpl>> initialActivityStacks

laneSets

protected List<LaneSet> laneSets

participantProcess

protected ParticipantProcess participantProcess
Constructor Detail

ProcessDefinitionImpl

public ProcessDefinitionImpl(String id)
Method Detail

createProcessInstance

public PvmProcessInstance createProcessInstance()
Specified by:
createProcessInstance in interface PvmProcessDefinition

createProcessInstance

public PvmProcessInstance createProcessInstance(String businessKey)
Specified by:
createProcessInstance in interface PvmProcessDefinition

createProcessInstance

public PvmProcessInstance createProcessInstance(String businessKey,
                                                String caseInstanceId)
Specified by:
createProcessInstance in interface PvmProcessDefinition

createProcessInstanceForInitial

public PvmProcessInstance createProcessInstanceForInitial(ActivityImpl initial)
creates a process instance using the provided activity as initial


getInitialActivityStack

public List<ActivityImpl> getInitialActivityStack()

getInitialActivityStack

public List<ActivityImpl> getInitialActivityStack(ActivityImpl startActivity)

createProcessInstance

protected PvmExecutionImpl createProcessInstance(ActivityImpl startActivity)

insertProcessInstance

protected void insertProcessInstance(PvmExecutionImpl processInstance)

getDiagramResourceName

public String getDiagramResourceName()
Specified by:
getDiagramResourceName in interface ReadOnlyProcessDefinition

getDeploymentId

public String getDeploymentId()
Specified by:
getDeploymentId in interface PvmProcessDefinition

addLaneSet

public void addLaneSet(LaneSet newLaneSet)

getLaneForId

public Lane getLaneForId(String id)

getActivityBehavior

public CoreActivityBehavior<? extends BaseDelegateExecution> getActivityBehavior()
Specified by:
getActivityBehavior in class CoreActivity

getInitial

public ActivityImpl getInitial()
Specified by:
getInitial in interface ReadOnlyProcessDefinition

setInitial

public void setInitial(ActivityImpl initial)

toString

public String toString()
Overrides:
toString in class CoreActivity

getDescription

public String getDescription()
Specified by:
getDescription in interface ReadOnlyProcessDefinition

getLaneSets

public List<LaneSet> getLaneSets()
Returns:
all lane-sets defined on this process-instance. Returns an empty list if none are defined.

setParticipantProcess

public void setParticipantProcess(ParticipantProcess participantProcess)

getParticipantProcess

public ParticipantProcess getParticipantProcess()

isScope

public boolean isScope()
Description copied from interface: PvmScope
Indicates whether this is a local scope for variables and events if true, there will _always_ be a scope execution created for it.

Note: the fact that this is a scope does not mean that it is also a sub process scope.

Specified by:
isScope in interface PvmScope

getEventScope

public PvmScope getEventScope()
Description copied from interface: PvmScope
The event scope for an activity is the scope in which the activity listens for events. This may or may not be the flow scope.. Consider: boundary events have a different event scope than flow scope.

The event scope is always a scope.

Specified by:
getEventScope in interface PvmScope
Returns:
the event scope of the activity

getFlowScope

public ScopeImpl getFlowScope()
Description copied from interface: PvmScope
The flow scope of the activity. The scope in which the activity itself is executed.

Note: in order to ensure backwards compatible behavior, a flow scope is not necessarily a a scope. Example: event sub processes.

Specified by:
getFlowScope in interface PvmScope

getLevelOfSubprocessScope

public PvmScope getLevelOfSubprocessScope()
Description copied from interface: PvmScope
The "level of subprocess scope" as defined in bpmn: this is the subprocess containing the activity. Usually this is the same as the flow scope, instead if the activity is multi instance: in that case the activity is nested inside a mutli instance body but "at the same level of subprocess" as other activities which are siblings to the mi-body.

Specified by:
getLevelOfSubprocessScope in interface PvmScope
Returns:
the level of subprocess scope as defined in bpmn

isSubProcessScope

public boolean isSubProcessScope()
Description copied from interface: PvmScope
Indicates whether this scope is a sub process scope. A sub process scope is a scope which contains "normal flow".Scopes which are flow scopes but not sub process scopes:

Specified by:
isSubProcessScope in interface PvmScope
Overrides:
isSubProcessScope in class ScopeImpl
Returns:
true if this is a sub process scope


Copyright © 2015 camunda services GmbH. All rights reserved.