org.jbpm.workflow.instance.impl
Class NodeInstanceImpl

java.lang.Object
  extended by org.jbpm.workflow.instance.impl.NodeInstanceImpl
All Implemented Interfaces:
Serializable, NodeInstance
Direct Known Subclasses:
ActionNodeInstance, CatchLinkNodeInstance, CompositeNodeInstance.CompositeNodeEndInstance, CompositeNodeInstance.CompositeNodeStartInstance, ExtendedNodeInstanceImpl, FaultNodeInstance, ForEachNodeInstance.ForEachJoinNodeInstance, ForEachNodeInstance.ForEachSplitNodeInstance, JoinInstance, SplitInstance, StartNodeInstance, ThrowLinkNodeInstance

public abstract class NodeInstanceImpl
extends Object
implements NodeInstance, Serializable

Default implementation of a RuleFlow node instance.

See Also:
Serialized Form

Nested Class Summary
protected  class NodeInstanceImpl.NodeInstanceTrigger
           
 
Constructor Summary
NodeInstanceImpl()
           
 
Method Summary
 void cancel()
           
protected  NodeInstance followConnection(Connection connection)
           
 long getId()
          The id of the node instance.
 Map<String,Object> getMetaData()
           
 Node getNode()
          Return the node this node instance refers to.
 long getNodeId()
          The id of the node this node instance refers to.
 NodeInstanceContainer getNodeInstanceContainer()
          The node instance container that this node instance is part of.
 String getNodeName()
          The name of the node this node instance refers to.
 WorkflowProcessInstance getProcessInstance()
          The process instance that this node instance is executing in.
 String getUniqueId()
           
 Object getVariable(String variableName)
           
abstract  void internalTrigger(NodeInstance from, String type)
           
 boolean isInversionOfControl()
           
 Context resolveContext(String contextId, Object param)
           
 ContextInstance resolveContextInstance(String contextId, Object param)
           
 void setId(long id)
           
 void setMetaData(String name, Object data)
           
 void setNodeId(long nodeId)
           
 void setNodeInstanceContainer(NodeInstanceContainer nodeInstanceContainer)
           
 void setProcessInstance(WorkflowProcessInstance processInstance)
           
 void setVariable(String variableName, Object value)
           
 void trigger(NodeInstance from, String type)
           
protected  void triggerCompleted(String type, boolean remove)
           
protected  void triggerConnection(Connection connection)
           
protected  void triggerNodeInstance(NodeInstance nodeInstance, String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeInstanceImpl

public NodeInstanceImpl()
Method Detail

setId

public void setId(long id)

getId

public long getId()
Description copied from interface: NodeInstance
The id of the node instance. This is unique within the node instance container this node instance lives in.

Specified by:
getId in interface NodeInstance
Returns:
the id of the node instance

setNodeId

public void setNodeId(long nodeId)

getNodeId

public long getNodeId()
Description copied from interface: NodeInstance
The id of the node this node instance refers to. The node represents the definition that this node instance was based on.

Specified by:
getNodeId in interface NodeInstance
Returns:
the id of the node this node instance refers to

getNodeName

public String getNodeName()
Description copied from interface: NodeInstance
The name of the node this node instance refers to.

Specified by:
getNodeName in interface NodeInstance
Returns:
the name of the node this node instance refers to

setProcessInstance

public void setProcessInstance(WorkflowProcessInstance processInstance)

getProcessInstance

public WorkflowProcessInstance getProcessInstance()
Description copied from interface: NodeInstance
The process instance that this node instance is executing in.

Specified by:
getProcessInstance in interface NodeInstance
Returns:
the process instance that this node instance is executing in

getNodeInstanceContainer

public NodeInstanceContainer getNodeInstanceContainer()
Description copied from interface: NodeInstance
The node instance container that this node instance is part of. If the node was defined in the top-level process scope, this is the same as the process instance. If not, it is the node instance container this node instance is executing in.

Specified by:
getNodeInstanceContainer in interface NodeInstance
Returns:
the process instance that this node instance is executing in

setNodeInstanceContainer

public void setNodeInstanceContainer(NodeInstanceContainer nodeInstanceContainer)

getNode

public Node getNode()
Description copied from interface: NodeInstance
Return the node this node instance refers to. The node represents the definition that this node instance was based on.

Specified by:
getNode in interface NodeInstance
Returns:
the node this node instance refers to

isInversionOfControl

public boolean isInversionOfControl()

cancel

public void cancel()

trigger

public final void trigger(NodeInstance from,
                          String type)

internalTrigger

public abstract void internalTrigger(NodeInstance from,
                                     String type)

triggerCompleted

protected void triggerCompleted(String type,
                                boolean remove)

followConnection

protected NodeInstance followConnection(Connection connection)

triggerNodeInstance

protected void triggerNodeInstance(NodeInstance nodeInstance,
                                   String type)

triggerConnection

protected void triggerConnection(Connection connection)

resolveContext

public Context resolveContext(String contextId,
                              Object param)

resolveContextInstance

public ContextInstance resolveContextInstance(String contextId,
                                              Object param)

getVariable

public Object getVariable(String variableName)
Specified by:
getVariable in interface NodeInstance

setVariable

public void setVariable(String variableName,
                        Object value)
Specified by:
setVariable in interface NodeInstance

getUniqueId

public String getUniqueId()

getMetaData

public Map<String,Object> getMetaData()

setMetaData

public void setMetaData(String name,
                        Object data)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.