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

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
All Implemented Interfaces:
Serializable, PvmProcessElement, PvmScope
Direct Known Subclasses:
ActivityImpl, ProcessDefinitionImpl

public abstract class ScopeImpl
extends CoreActivity
implements PvmScope

A Bpmn scope. The scope has references to two lists of activities: - the flow activities (activities for which the flow scope is this scope - event listener activities (activities for which the event scope is this scope.

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

Field Summary
protected  List<ActivityImpl> flowActivities
          The activities for which the flow scope is this scope
protected  boolean isSubProcessScope
           
protected  Map<String,ActivityImpl> namedFlowActivities
           
protected  ProcessDefinitionImpl 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, name, properties, variableListeners
 
Constructor Summary
ScopeImpl(String id, ProcessDefinitionImpl processDefinition)
           
 
Method Summary
 void addExecutionListener(String eventName, ExecutionListener executionListener)
          Deprecated. 
 void addExecutionListener(String eventName, ExecutionListener executionListener, int index)
          Deprecated. 
 boolean contains(ActivityImpl activity)
           
 ActivityImpl createActivity(String activityId)
           
 ActivityImpl findActivity(String activityId)
          searches for the activity recursively
 ActivityImpl findActivityAtLevelOfSubprocess(String activityId)
          Finds an activity at the same level of subprocess.
 TransitionImpl findTransition(String transitionId)
          Recursively finds a transition.
 List<ActivityImpl> getActivities()
          Returns the flow activities of this scope.
 ActivityImpl getChildActivity(String activityId)
          searches for the activity locally
 Map<String,List<ExecutionListener>> getExecutionListeners()
          Deprecated. 
 List<ExecutionListener> getExecutionListeners(String eventName)
          Deprecated. 
 ProcessDefinitionImpl getProcessDefinition()
          The process definition scope, root of the scope hierarchy.
 boolean isAncestorFlowScopeOf(ScopeImpl other)
           
 boolean isSubProcessScope()
          Indicates whether this scope is a sub process scope.
 void setSubProcessScope(boolean isSubProcessScope)
           
 
Methods inherited from class org.camunda.bpm.engine.impl.core.model.CoreActivity
createActivity, getActivityBehavior, getIoMapping, setIoMapping, toString
 
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.PvmScope
getEventScope, getFlowScope, getLevelOfSubprocessScope, isScope
 
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmProcessElement
getId, getProperties, getProperty
 

Field Detail

isSubProcessScope

protected boolean isSubProcessScope

flowActivities

protected List<ActivityImpl> flowActivities
The activities for which the flow scope is this scope


namedFlowActivities

protected Map<String,ActivityImpl> namedFlowActivities

processDefinition

protected ProcessDefinitionImpl processDefinition
Constructor Detail

ScopeImpl

public ScopeImpl(String id,
                 ProcessDefinitionImpl processDefinition)
Method Detail

findActivity

public ActivityImpl findActivity(String activityId)
Description copied from class: CoreActivity
searches for the activity recursively

Specified by:
findActivity in interface PvmScope
Overrides:
findActivity in class CoreActivity
Parameters:
activityId - the id of the activity to find.
Returns:
the activity or null

findTransition

public TransitionImpl findTransition(String transitionId)
Description copied from interface: PvmScope
Recursively finds a transition.

Specified by:
findTransition in interface PvmScope
Parameters:
transitionId - the transiton to find
Returns:
the transition or null

findActivityAtLevelOfSubprocess

public ActivityImpl findActivityAtLevelOfSubprocess(String activityId)
Description copied from interface: PvmScope
Finds an activity at the same level of subprocess.

Specified by:
findActivityAtLevelOfSubprocess in interface PvmScope
Parameters:
activityId - the id of the activity to find.
Returns:
the activity or null

getChildActivity

public ActivityImpl getChildActivity(String activityId)
searches for the activity locally

Specified by:
getChildActivity in class CoreActivity

createActivity

public ActivityImpl createActivity(String activityId)
Specified by:
createActivity in class CoreActivity

isAncestorFlowScopeOf

public boolean isAncestorFlowScopeOf(ScopeImpl other)

contains

public boolean contains(ActivityImpl activity)

getExecutionListeners

@Deprecated
public List<ExecutionListener> getExecutionListeners(String eventName)
Deprecated. 


addExecutionListener

@Deprecated
public void addExecutionListener(String eventName,
                                            ExecutionListener executionListener)
Deprecated. 


addExecutionListener

@Deprecated
public void addExecutionListener(String eventName,
                                            ExecutionListener executionListener,
                                            int index)
Deprecated. 


getExecutionListeners

@Deprecated
public Map<String,List<ExecutionListener>> getExecutionListeners()
Deprecated. 


getActivities

public List<ActivityImpl> getActivities()
Description copied from interface: PvmScope
Returns the flow activities of this scope. This is the list of activities for which this scope is the flow scope.

Specified by:
getActivities in interface PvmScope
Specified by:
getActivities in class CoreActivity
Returns:
the list of flow activities for this scope.

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
Returns:
true if this is a sub process scope

setSubProcessScope

public void setSubProcessScope(boolean isSubProcessScope)

getProcessDefinition

public ProcessDefinitionImpl getProcessDefinition()
Description copied from interface: PvmProcessElement
The process definition scope, root of the scope hierarchy.

Specified by:
getProcessDefinition in interface PvmProcessElement
Returns:


Copyright © 2015 camunda services GmbH. All rights reserved.