Class ActivityImpl
- 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
-
- org.camunda.bpm.engine.impl.pvm.process.ActivityImpl
-
- All Implemented Interfaces:
Serializable,HasDIBounds,PvmActivity,PvmProcessElement,PvmScope
public class ActivityImpl extends ScopeImpl implements PvmActivity, HasDIBounds
- Author:
- Tom Baeyens, Daniel Meyer, Christopher Zell
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceActivityImpl.AsyncAfterUpdateDelegate interface for the asyncAfter property updatestatic interfaceActivityImpl.AsyncBeforeUpdateDelegate interface for the asyncBefore property update.-
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
ScopeImpl.BacklogErrorCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected ActivityBehavioractivityBehaviorthe inner behavior of an activity.protected ActivityStartBehavioractivityStartBehaviorThe start behavior for this activity.protected ActivityImpl.AsyncAfterUpdatedelegateAsyncAfterUpdateThe delegate for the async after attribute update.protected ActivityImpl.AsyncBeforeUpdatedelegateAsyncBeforeUpdateThe delegate for the async before attribute update.protected ScopeImpleventScopeprotected ScopeImplflowScopeprotected intheightprotected List<TransitionImpl>incomingTransitionsprotected booleanisAsyncAfterprotected booleanisAsyncBeforeprotected booleanisScopeprotected Map<String,TransitionImpl>namedOutgoingTransitionsprotected List<TransitionImpl>outgoingTransitionsprotected intwidthprotected intxprotected inty-
Fields inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
BACKLOG, eventActivities, 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, name, properties, variableListeners
-
-
Constructor Summary
Constructors Constructor Description ActivityImpl(String id, ProcessDefinitionImpl processDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransitionImplcreateOutgoingTransition()TransitionImplcreateOutgoingTransition(String transitionId)ActivityImplfindCompensationHandler()Find the compensation handler of this activity.TransitionImplfindOutgoingTransition(String transitionId)Finds and returns an outgoing sequence flow (transition) by it's id.ActivityBehaviorgetActivityBehavior()The inner behavior of an activity.StringgetActivityId()ActivityStartBehaviorgetActivityStartBehavior()The start behavior of an activity.ActivityImpl.AsyncAfterUpdategetDelegateAsyncAfterUpdate()ActivityImpl.AsyncBeforeUpdategetDelegateAsyncBeforeUpdate()ScopeImplgetEventScope()The event scope for an activity is the scope in which the activity listens for events.ScopeImplgetFlowScope()The flow scope of the activity.intgetHeight()List<PvmTransition>getIncomingTransitions()PvmScopegetLevelOfSubprocessScope()The "level of subprocess scope" as defined in bpmn: this is the subprocess containing the activity.List<PvmTransition>getOutgoingTransitions()ActivityImplgetParentFlowScopeActivity()intgetWidth()intgetX()intgetY()booleanisAsyncAfter()Indicates whether execution after this execution should continue asynchronously.booleanisAsyncBefore()Indicates whether the activity is executed asynchronously.booleanisCompensationHandler()Indicates whether activity is for compensation.booleanisMultiInstance()Indicates whether activity is a multi instance activity.booleanisScope()Indicates whether this is a local scope for variables and events if true, there will _always_ be a scope execution created for it.booleanisTriggeredByEvent()voidsetActivityBehavior(ActivityBehavior activityBehavior)voidsetActivityStartBehavior(ActivityStartBehavior activityStartBehavior)voidsetAsyncAfter(boolean isAsyncAfter)voidsetAsyncAfter(boolean isAsyncAfter, boolean exclusive)voidsetAsyncBefore(boolean isAsyncBefore)voidsetAsyncBefore(boolean isAsyncBefore, boolean exclusive)voidsetDelegateAsyncAfterUpdate(ActivityImpl.AsyncAfterUpdate delegateAsyncAfterUpdate)voidsetDelegateAsyncBeforeUpdate(ActivityImpl.AsyncBeforeUpdate delegateAsyncBeforeUpdate)voidsetEventScope(ScopeImpl eventScope)voidsetHeight(int height)protected voidsetIncomingTransitions(List<TransitionImpl> incomingTransitions)protected voidsetOutgoingTransitions(List<TransitionImpl> outgoingTransitions)voidsetScope(boolean isScope)voidsetWidth(int width)voidsetX(int x)voidsetY(int y)StringtoString()-
Methods inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
addExecutionListener, addExecutionListener, addToBacklog, contains, createActivity, findActivity, findActivityAtLevelOfSubprocess, findTransition, getActivities, getBacklogErrorCallbacks, getChildActivity, getEventActivities, getExecutionListeners, getExecutionListeners, getProcessDefinition, isAncestorFlowScopeOf, isBacklogEmpty, isSubProcessScope, 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.PvmProcessElement
getId, getProcessDefinition, getProperties, getProperty
-
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmScope
findActivity, findActivityAtLevelOfSubprocess, findTransition, getActivities, isSubProcessScope
-
-
-
-
Field Detail
-
outgoingTransitions
protected List<TransitionImpl> outgoingTransitions
-
namedOutgoingTransitions
protected Map<String,TransitionImpl> namedOutgoingTransitions
-
incomingTransitions
protected List<TransitionImpl> incomingTransitions
-
activityBehavior
protected ActivityBehavior activityBehavior
the inner behavior of an activity. For activities which are flow scopes, this must be a CompositeActivityBehavior.
-
activityStartBehavior
protected ActivityStartBehavior activityStartBehavior
The start behavior for this activity.
-
eventScope
protected ScopeImpl eventScope
-
flowScope
protected ScopeImpl flowScope
-
isScope
protected boolean isScope
-
isAsyncBefore
protected boolean isAsyncBefore
-
isAsyncAfter
protected boolean isAsyncAfter
-
x
protected int x
-
y
protected int y
-
width
protected int width
-
height
protected int height
-
delegateAsyncBeforeUpdate
protected ActivityImpl.AsyncBeforeUpdate delegateAsyncBeforeUpdate
The delegate for the async before attribute update.
-
delegateAsyncAfterUpdate
protected ActivityImpl.AsyncAfterUpdate delegateAsyncAfterUpdate
The delegate for the async after attribute update.
-
-
Constructor Detail
-
ActivityImpl
public ActivityImpl(String id, ProcessDefinitionImpl processDefinition)
-
-
Method Detail
-
createOutgoingTransition
public TransitionImpl createOutgoingTransition()
-
createOutgoingTransition
public TransitionImpl createOutgoingTransition(String transitionId)
-
findOutgoingTransition
public TransitionImpl findOutgoingTransition(String transitionId)
Description copied from interface:PvmActivityFinds and returns an outgoing sequence flow (transition) by it's id.- Specified by:
findOutgoingTransitionin interfacePvmActivity- Parameters:
transitionId- the id of the transition to find- Returns:
- the transition or null in case it cannot be found
-
toString
public String toString()
- Overrides:
toStringin classCoreActivity
-
setOutgoingTransitions
protected void setOutgoingTransitions(List<TransitionImpl> outgoingTransitions)
-
setIncomingTransitions
protected void setIncomingTransitions(List<TransitionImpl> incomingTransitions)
-
getOutgoingTransitions
public List<PvmTransition> getOutgoingTransitions()
- Specified by:
getOutgoingTransitionsin interfacePvmActivity- Returns:
- the list of outgoing sequence flows (transitions)
-
getActivityBehavior
public ActivityBehavior getActivityBehavior()
Description copied from interface:PvmActivityThe inner behavior of an activity. The inner behavior is the logic which is executed after thestartlisteners have been executed. In case the activityis scope, a new execution will be created- Specified by:
getActivityBehaviorin interfacePvmActivity- Specified by:
getActivityBehaviorin classCoreActivity- Returns:
- the inner behavior of the activity
-
setActivityBehavior
public void setActivityBehavior(ActivityBehavior activityBehavior)
-
getActivityStartBehavior
public ActivityStartBehavior getActivityStartBehavior()
Description copied from interface:PvmActivityThe start behavior of an activity. The start behavior is executed before thestartlisteners of the activity are executed.- Specified by:
getActivityStartBehaviorin interfacePvmActivity- Returns:
- the start behavior of an activity.
-
setActivityStartBehavior
public void setActivityStartBehavior(ActivityStartBehavior activityStartBehavior)
-
getIncomingTransitions
public List<PvmTransition> getIncomingTransitions()
- Specified by:
getIncomingTransitionsin interfacePvmActivity- Returns:
- the list of incoming sequence flows (transitions)
-
isScope
public boolean isScope()
Description copied from interface:PvmScopeIndicates 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.
-
setScope
public void setScope(boolean isScope)
-
isAsyncBefore
public boolean isAsyncBefore()
Description copied from interface:PvmActivityIndicates whether the activity is executed asynchronously. This can be done after theactivity start behaviorand before thestartlisteners are invoked.- Specified by:
isAsyncBeforein interfacePvmActivity- Returns:
- true if the activity is executed asynchronously.
-
setAsyncBefore
public void setAsyncBefore(boolean isAsyncBefore)
-
setAsyncBefore
public void setAsyncBefore(boolean isAsyncBefore, boolean exclusive)
-
isAsyncAfter
public boolean isAsyncAfter()
Description copied from interface:PvmActivityIndicates whether execution after this execution should continue asynchronously. This can be done after theendlisteners are invoked.- Specified by:
isAsyncAfterin interfacePvmActivity- Returns:
- true if execution after this activity continues asynchronously.
-
setAsyncAfter
public void setAsyncAfter(boolean isAsyncAfter)
-
setAsyncAfter
public void setAsyncAfter(boolean isAsyncAfter, boolean exclusive)
-
getActivityId
public String getActivityId()
-
getFlowScope
public ScopeImpl getFlowScope()
Description copied from interface:PvmScopeThe 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:
getFlowScopein interfacePvmScope
-
getEventScope
public ScopeImpl getEventScope()
Description copied from interface:PvmScopeThe event scope for an activity is the scope in which the activity listens for events. This may or may not be theflow scope.. Consider: boundary events have a different event scope than flow scope.The event scope is always a
scope.- Specified by:
getEventScopein interfacePvmScope- Returns:
- the event scope of the activity
-
setEventScope
public void setEventScope(ScopeImpl eventScope)
-
getLevelOfSubprocessScope
public PvmScope getLevelOfSubprocessScope()
Description copied from interface:PvmScopeThe "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:
getLevelOfSubprocessScopein interfacePvmScope- Returns:
- the level of subprocess scope as defined in bpmn
-
getX
public int getX()
- Specified by:
getXin interfaceHasDIBounds
-
setX
public void setX(int x)
- Specified by:
setXin interfaceHasDIBounds
-
getY
public int getY()
- Specified by:
getYin interfaceHasDIBounds
-
setY
public void setY(int y)
- Specified by:
setYin interfaceHasDIBounds
-
getWidth
public int getWidth()
- Specified by:
getWidthin interfaceHasDIBounds
-
setWidth
public void setWidth(int width)
- Specified by:
setWidthin interfaceHasDIBounds
-
getHeight
public int getHeight()
- Specified by:
getHeightin interfaceHasDIBounds
-
setHeight
public void setHeight(int height)
- Specified by:
setHeightin interfaceHasDIBounds
-
getParentFlowScopeActivity
public ActivityImpl getParentFlowScopeActivity()
-
isCompensationHandler
public boolean isCompensationHandler()
Indicates whether activity is for compensation.- Returns:
- true if this activity is for compensation.
-
findCompensationHandler
public ActivityImpl findCompensationHandler()
Find the compensation handler of this activity.- Returns:
- the compensation handler or
null, if this activity has no compensation handler.
-
isMultiInstance
public boolean isMultiInstance()
Indicates whether activity is a multi instance activity.- Returns:
- true if this activity is a multi instance activity.
-
isTriggeredByEvent
public boolean isTriggeredByEvent()
-
getDelegateAsyncBeforeUpdate
public ActivityImpl.AsyncBeforeUpdate getDelegateAsyncBeforeUpdate()
-
setDelegateAsyncBeforeUpdate
public void setDelegateAsyncBeforeUpdate(ActivityImpl.AsyncBeforeUpdate delegateAsyncBeforeUpdate)
-
getDelegateAsyncAfterUpdate
public ActivityImpl.AsyncAfterUpdate getDelegateAsyncAfterUpdate()
-
setDelegateAsyncAfterUpdate
public void setDelegateAsyncAfterUpdate(ActivityImpl.AsyncAfterUpdate delegateAsyncAfterUpdate)
-
-