Class ScopeImpl
java.lang.Object
org.camunda.bpm.engine.impl.core.model.CoreModelElement
org.camunda.bpm.engine.impl.core.model.CoreActivity
org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
- All Implemented Interfaces:
Serializable
,PvmProcessElement
,PvmScope
- Direct Known Subclasses:
ActivityImpl
,ProcessDefinitionImpl
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Represents the backlog error callback interface. -
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
ScopeImpl.BacklogErrorCallback> The key identifies the activity which is referenced but not read yet.protected Set<ActivityImpl>
activities for which this is the event scopeprotected List<ActivityImpl>
The activities for which the flow scope is this scopeprotected boolean
protected Map<String,
ActivityImpl> protected ProcessDefinitionImpl
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExecutionListener
(String eventName, ExecutionListener executionListener) Deprecated.void
addExecutionListener
(String eventName, ExecutionListener executionListener, int index) Deprecated.void
addToBacklog
(String activityRef, ScopeImpl.BacklogErrorCallback callback) Add's the given activity reference and the error callback to the backlog.boolean
contains
(ActivityImpl activity) createActivity
(String activityId) findActivity
(String activityId) searches for the activity recursivelyfindActivityAtLevelOfSubprocess
(String activityId) Finds an activity at the same level of subprocess.findTransition
(String transitionId) Recursively finds a transition.Returns the flow activities of this scope.Returns the backlog error callback's.getChildActivity
(String activityId) searches for the activity locallyDeprecated.getExecutionListeners
(String eventName) Deprecated.The process definition scope, root of the scope hierarchy.boolean
isAncestorFlowScopeOf
(ScopeImpl other) boolean
Returns true if the backlog is empty.boolean
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.PvmProcessElement
getId, getProperties, getProperty
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmScope
getEventScope, getFlowScope, getLevelOfSubprocessScope, isScope
-
Field Details
-
isSubProcessScope
protected boolean isSubProcessScope -
flowActivities
The activities for which the flow scope is this scope -
namedFlowActivities
-
eventActivities
activities for which this is the event scope -
processDefinition
-
BACKLOG
The key identifies the activity which is referenced but not read yet. The value is the error callback, which is called if the activity is not read till the end of parsing.
-
-
Constructor Details
-
ScopeImpl
-
-
Method Details
-
findActivity
Description copied from class:CoreActivity
searches for the activity recursively- Specified by:
findActivity
in interfacePvmScope
- Overrides:
findActivity
in classCoreActivity
- Parameters:
activityId
- the id of the activity to find.- Returns:
- the activity or null
-
findTransition
Description copied from interface:PvmScope
Recursively finds a transition.- Specified by:
findTransition
in interfacePvmScope
- Parameters:
transitionId
- the transiton to find- Returns:
- the transition or null
-
findActivityAtLevelOfSubprocess
Description copied from interface:PvmScope
Finds an activity at the same level of subprocess.- Specified by:
findActivityAtLevelOfSubprocess
in interfacePvmScope
- Parameters:
activityId
- the id of the activity to find.- Returns:
- the activity or null
-
getChildActivity
searches for the activity locally- Specified by:
getChildActivity
in classCoreActivity
-
getBacklogErrorCallbacks
Returns the backlog error callback's.- Returns:
- the callback's
-
isBacklogEmpty
public boolean isBacklogEmpty()Returns true if the backlog is empty.- Returns:
- true if empty, false otherwise
-
addToBacklog
Add's the given activity reference and the error callback to the backlog.- Parameters:
activityRef
- the activity reference which is not read until nowcallback
- the error callback which should called if activity will not be read
-
createActivity
- Specified by:
createActivity
in classCoreActivity
-
isAncestorFlowScopeOf
-
contains
-
getExecutionListeners
Deprecated. -
addExecutionListener
Deprecated. -
addExecutionListener
@Deprecated public void addExecutionListener(String eventName, ExecutionListener executionListener, int index) Deprecated. -
getExecutionListeners
Deprecated. -
getActivities
Description copied from interface:PvmScope
Returns the flow activities of this scope. This is the list of activities for which this scope is theflow scope
.- Specified by:
getActivities
in interfacePvmScope
- Specified by:
getActivities
in classCoreActivity
- Returns:
- the list of flow activities for this scope.
-
getEventActivities
-
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:- a multi instance body scope
- leaf scope activities which are pure event scopes (Example: User task with attached boundary event)
- Specified by:
isSubProcessScope
in interfacePvmScope
- Returns:
- true if this is a sub process scope
-
setSubProcessScope
public void setSubProcessScope(boolean isSubProcessScope) -
getProcessDefinition
Description copied from interface:PvmProcessElement
The process definition scope, root of the scope hierarchy.- Specified by:
getProcessDefinition
in interfacePvmProcessElement
- Returns:
-