toolbus.process
Class ProcessInstance
java.lang.Object
toolbus.process.ProcessInstance
public class ProcessInstance
- extends java.lang.Object
- Author:
- paulk, Jul 23, 2002
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
definition
private final ProcessDefinition definition
processName
private final java.lang.String processName
processId
private final int processId
elements
private final AtomList elements
initialState
private final State initialState
currentState
private State currentState
toolbus
private final ToolBus toolbus
tbfactory
private final TBTermFactory tbfactory
subscriptions
private final java.util.List<aterm.ATerm> subscriptions
notes
private final java.util.List<aterm.ATerm> notes
running
private boolean running
deregistered
private boolean deregistered
ProcessInstance
public ProcessInstance(ToolBus TB,
ProcessCall call,
int processId)
throws ToolBusException
- Throws:
ToolBusException
getProcessDefinition
public ProcessDefinition getProcessDefinition()
getTBTermFactory
public TBTermFactory getTBTermFactory()
getToolBus
public ToolBus getToolBus()
getRunTime
public long getRunTime()
getProcessId
public int getProcessId()
getProcessName
public java.lang.String getProcessName()
terminate
public void terminate()
deregisterCommunicationAtoms
public void deregisterCommunicationAtoms(AtomList atoms)
getNoteFromQueue
public boolean getNoteFromQueue(aterm.ATerm pat,
Environment env)
noNoteInQueue
public boolean noNoteInQueue(aterm.ATerm pat,
Environment env)
subscribe
public void subscribe(aterm.ATerm pat)
unsubscribe
public void unsubscribe(aterm.ATerm pat)
putNoteInQueue
public boolean putNoteInQueue(aterm.ATerm note)
hasNotes
public boolean hasNotes()
getSubscriptions
public java.util.List<aterm.ATerm> getSubscriptions()
getNoteQueue
public java.util.List<aterm.ATerm> getNoteQueue()
getProcessState
public State getProcessState()
contains
public boolean contains(StateElement a)
getCurrentState
public State getCurrentState()
gotoNextStateAndActivate
public void gotoNextStateAndActivate()
gotoNextStateAndActivate
public void gotoNextStateAndActivate(StateElement se)
step
public boolean step()
throws ToolBusException
- Throws:
ToolBusException
debugStep
public toolbus.process.debug.ExecutionResult debugStep()
throws ToolBusException
- Executes on step in debug mode, where the state element that was executed is returned as result.
- Returns:
- The result of the execution (if contains the state element and partners); null if
nothing was executed.
- Throws:
ToolBusException
- Thrown if something went wrong.
isTerminated
public boolean isTerminated()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
showStatus
public java.lang.String showStatus()
showAutomaton
public void showAutomaton()
getStateElements
public java.util.Set<StateElement> getStateElements()
- Returns a complete list of state elements in this process instance.
This method is only required for obtaining a reference to a state element, so we can set a
break point on it when running the toolbus in debug mode.
- Returns:
- A complete list of atoms in this process instance.