org.jbpm.workflow.instance.impl
Class WorkflowProcessInstanceImpl

java.lang.Object
  extended by org.jbpm.process.instance.impl.ProcessInstanceImpl
      extended by org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl
All Implemented Interfaces:
Serializable, EventListener, NodeInstanceContainer, ProcessInstance, WorkflowProcessInstance, ContextableInstance, ContextInstanceContainer
Direct Known Subclasses:
RuleFlowProcessInstance

public abstract class WorkflowProcessInstanceImpl
extends ProcessInstanceImpl
implements WorkflowProcessInstance, NodeInstanceContainer

Default implementation of a RuleFlow process instance.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.drools.runtime.process.ProcessInstance
STATE_ABORTED, STATE_ACTIVE, STATE_COMPLETED, STATE_PENDING, STATE_SUSPENDED
 
Constructor Summary
WorkflowProcessInstanceImpl()
           
 
Method Summary
 void addEventListener(String type, EventListener listener, boolean external)
           
 void addNodeInstance(NodeInstance nodeInstance)
           
 void disconnect()
           
 List<String> getActiveNodeIds()
           
 String[] getEventTypes()
           
 NodeInstance getFirstNodeInstance(long nodeId)
           
 NodeContainer getNodeContainer()
           
 NodeInstance getNodeInstance(long nodeInstanceId)
           
 NodeInstance getNodeInstance(Node node)
           
 long getNodeInstanceCounter()
           
 Collection<NodeInstance> getNodeInstances()
           
 Collection<NodeInstance> getNodeInstances(boolean recursive)
           
 List<NodeInstance> getNodeInstances(long nodeId)
           
 Object getVariable(String name)
           
 Map<String,Object> getVariables()
           
 WorkflowProcess getWorkflowProcess()
           
 void internalSetNodeInstanceCounter(long nodeInstanceCounter)
           
 void nodeInstanceCompleted(NodeInstance nodeInstance, String outType)
           
 void reconnect()
           
 void removeEventListener(String type, EventListener listener, boolean external)
           
 void removeNodeInstance(NodeInstance nodeInstance)
           
 void setState(int state)
           
 void setVariable(String name, Object value)
           
 void signalEvent(String type, Object event)
           
 void start()
           
 String toString()
           
 
Methods inherited from class org.jbpm.process.instance.impl.ProcessInstanceImpl
addContextInstance, getAgenda, getContextContainer, getContextInstance, getContextInstance, getContextInstance, getContextInstances, getId, getKnowledgeRuntime, getMetaData, getProcess, getProcessId, getProcessName, getState, internalSetState, internalStart, removeContextInstance, setContextInstance, setId, setKnowledgeRuntime, setMetaData, setProcess, setProcessId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbpm.process.instance.ProcessInstance
getKnowledgeRuntime, getProcess, setId, setKnowledgeRuntime, setProcess
 
Methods inherited from interface org.jbpm.process.instance.ContextInstanceContainer
addContextInstance, getContextContainer, getContextInstance, getContextInstance, getContextInstances, removeContextInstance
 
Methods inherited from interface org.jbpm.process.instance.ContextableInstance
getContextInstance
 
Methods inherited from interface org.drools.runtime.process.ProcessInstance
getId, getProcessId, getProcessName, getState
 

Constructor Detail

WorkflowProcessInstanceImpl

public WorkflowProcessInstanceImpl()
Method Detail

getNodeContainer

public NodeContainer getNodeContainer()

addNodeInstance

public void addNodeInstance(NodeInstance nodeInstance)

removeNodeInstance

public void removeNodeInstance(NodeInstance nodeInstance)

getNodeInstances

public Collection<NodeInstance> getNodeInstances()
Specified by:
getNodeInstances in interface NodeInstanceContainer

getNodeInstances

public Collection<NodeInstance> getNodeInstances(boolean recursive)

getNodeInstance

public NodeInstance getNodeInstance(long nodeInstanceId)
Specified by:
getNodeInstance in interface NodeInstanceContainer

getActiveNodeIds

public List<String> getActiveNodeIds()

getFirstNodeInstance

public NodeInstance getFirstNodeInstance(long nodeId)

getNodeInstances

public List<NodeInstance> getNodeInstances(long nodeId)

getNodeInstance

public NodeInstance getNodeInstance(Node node)

getNodeInstanceCounter

public long getNodeInstanceCounter()

internalSetNodeInstanceCounter

public void internalSetNodeInstanceCounter(long nodeInstanceCounter)

getWorkflowProcess

public WorkflowProcess getWorkflowProcess()

getVariable

public Object getVariable(String name)
Specified by:
getVariable in interface WorkflowProcessInstance

getVariables

public Map<String,Object> getVariables()

setVariable

public void setVariable(String name,
                        Object value)
Specified by:
setVariable in interface WorkflowProcessInstance

setState

public void setState(int state)
Overrides:
setState in class ProcessInstanceImpl

disconnect

public void disconnect()
Overrides:
disconnect in class ProcessInstanceImpl

reconnect

public void reconnect()
Overrides:
reconnect in class ProcessInstanceImpl

toString

public String toString()
Overrides:
toString in class ProcessInstanceImpl

start

public void start()
Overrides:
start in class ProcessInstanceImpl

signalEvent

public void signalEvent(String type,
                        Object event)
Specified by:
signalEvent in interface EventListener
Overrides:
signalEvent in class ProcessInstanceImpl

addEventListener

public void addEventListener(String type,
                             EventListener listener,
                             boolean external)

removeEventListener

public void removeEventListener(String type,
                                EventListener listener,
                                boolean external)

getEventTypes

public String[] getEventTypes()
Specified by:
getEventTypes in interface EventListener
Overrides:
getEventTypes in class ProcessInstanceImpl

nodeInstanceCompleted

public void nodeInstanceCompleted(NodeInstance nodeInstance,
                                  String outType)


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