org.jbpm.graph.exe
Class ExecutionContext

java.lang.Object
  extended by org.jbpm.graph.exe.ExecutionContext

public class ExecutionContext
extends java.lang.Object


Field Summary
protected  Action action
           
protected  Event event
           
protected  GraphElement eventSource
           
protected  java.lang.Throwable exception
           
protected  ProcessInstance subProcessInstance
           
protected  Task task
           
protected  TaskInstance taskInstance
           
protected  Timer timer
           
protected  Token token
           
protected  Transition transition
           
protected  Node transitionSource
           
 
Constructor Summary
ExecutionContext(ExecutionContext other)
           
ExecutionContext(Token token)
           
 
Method Summary
static ExecutionContext currentExecutionContext()
           
 Action getAction()
           
 ContextInstance getContextInstance()
           
 ModuleDefinition getDefinition(java.lang.Class clazz)
           
 Event getEvent()
           
 GraphElement getEventSource()
           
 java.lang.Throwable getException()
           
 ModuleInstance getInstance(java.lang.Class clazz)
           
 JbpmContext getJbpmContext()
           
 Node getNode()
           
 ProcessDefinition getProcessDefinition()
           
 ProcessInstance getProcessInstance()
           
 ProcessInstance getSubProcessInstance()
           
 Task getTask()
           
 TaskInstance getTaskInstance()
           
 TaskMgmtInstance getTaskMgmtInstance()
           
 Timer getTimer()
           
 Token getToken()
           
 Transition getTransition()
           
 Node getTransitionSource()
           
 java.lang.Object getVariable(java.lang.String name)
          get a process variable.
 void leaveNode()
          leave this node over the default transition.
 void leaveNode(java.lang.String transitionName)
          leave this node over the given transition.
 void leaveNode(Transition transition)
          leave this node over the given transition.
static void popCurrentContext(ExecutionContext executionContext)
           
static void pushCurrentContext(ExecutionContext executionContext)
           
 void setAction(Action action)
           
 void setEvent(Event event)
           
 void setEventSource(GraphElement eventSource)
           
 void setException(java.lang.Throwable exception)
           
 void setSubProcessInstance(ProcessInstance subProcessInstance)
           
 void setTask(Task task)
           
 void setTaskInstance(TaskInstance taskInstance)
           
 void setTimer(Timer timer)
           
 void setTransition(Transition transition)
           
 void setTransitionSource(Node transitionSource)
           
 void setVariable(java.lang.String name, java.lang.Object value)
          set a process variable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

token

protected Token token

event

protected Event event

eventSource

protected GraphElement eventSource

action

protected Action action

exception

protected java.lang.Throwable exception

transition

protected Transition transition

transitionSource

protected Node transitionSource

task

protected Task task

timer

protected Timer timer

taskInstance

protected TaskInstance taskInstance

subProcessInstance

protected ProcessInstance subProcessInstance
Constructor Detail

ExecutionContext

public ExecutionContext(Token token)

ExecutionContext

public ExecutionContext(ExecutionContext other)
Method Detail

getNode

public Node getNode()

getProcessDefinition

public ProcessDefinition getProcessDefinition()

setAction

public void setAction(Action action)

getProcessInstance

public ProcessInstance getProcessInstance()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setVariable

public void setVariable(java.lang.String name,
                        java.lang.Object value)
set a process variable.


getVariable

public java.lang.Object getVariable(java.lang.String name)
get a process variable.


leaveNode

public void leaveNode()
leave this node over the default transition. This method is only available on node actions. Not on actions that are executed on events. Actions on events cannot change the flow of execution.


leaveNode

public void leaveNode(java.lang.String transitionName)
leave this node over the given transition. This method is only available on node actions. Not on actions that are executed on events. Actions on events cannot change the flow of execution.


leaveNode

public void leaveNode(Transition transition)
leave this node over the given transition. This method is only available on node actions. Not on actions that are executed on events. Actions on events cannot change the flow of execution.


getDefinition

public ModuleDefinition getDefinition(java.lang.Class clazz)

getInstance

public ModuleInstance getInstance(java.lang.Class clazz)

getContextInstance

public ContextInstance getContextInstance()

getTaskMgmtInstance

public TaskMgmtInstance getTaskMgmtInstance()

getJbpmContext

public JbpmContext getJbpmContext()

setTaskInstance

public void setTaskInstance(TaskInstance taskInstance)

getToken

public Token getToken()

getAction

public Action getAction()

getEvent

public Event getEvent()

setEvent

public void setEvent(Event event)

getException

public java.lang.Throwable getException()

setException

public void setException(java.lang.Throwable exception)

getTransition

public Transition getTransition()

setTransition

public void setTransition(Transition transition)

getTransitionSource

public Node getTransitionSource()

setTransitionSource

public void setTransitionSource(Node transitionSource)

getEventSource

public GraphElement getEventSource()

setEventSource

public void setEventSource(GraphElement eventSource)

getTask

public Task getTask()

setTask

public void setTask(Task task)

getTaskInstance

public TaskInstance getTaskInstance()

getSubProcessInstance

public ProcessInstance getSubProcessInstance()

setSubProcessInstance

public void setSubProcessInstance(ProcessInstance subProcessInstance)

getTimer

public Timer getTimer()

setTimer

public void setTimer(Timer timer)

pushCurrentContext

public static void pushCurrentContext(ExecutionContext executionContext)

popCurrentContext

public static void popCurrentContext(ExecutionContext executionContext)

currentExecutionContext

public static ExecutionContext currentExecutionContext()


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.