|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A node in the graph representing the deterministic finite automaton implementing a
process
.
Gates are the points at which user communication and control flow branching take place. A process can
stay at a gate as long as may be necessary, but must be aware that it can be interrupted and
suspended at any time. In contrast, a process can never be interrupted when in a Transition
, but
transitions must be very short and must not comprise any user communication.
As every process begins and ends at a gate, there are special gates for special occasions. See
the getXXXGate()
methods in SaleProcess
.
Method Summary | |
Transition |
getNextTransition(SaleProcess pOwner,
User usr)
Determine the next Transition. |
Method Detail |
public Transition getNextTransition(SaleProcess pOwner, User usr) throws InterruptedException
This is the key (and sole) method of the gate. By entering this method, the calling process
enters the gate. This method must do anything that is necessary to determine the next transition
and must then return this transition. It is invalid, to return a null
transition,
except in the special cases noted below.
The method must be interruptible by calls to Thread.interrupt()
on the executing
thread and it must propagate these interrupts as a InterruptedException. In this case it is obviously no
problem, if the method returns a null
transition.
Also, if any other exception causes the method to be left, or in the case of an explicit call
to the process' SaleProcess.error(int)
method, the result may be null
.
pOwner
- the process that entered the gate and triggered the method.usr
- the user currently active in the process' ProcessContext
InterruptedException
- if an interrupt ocurred while at the gate.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |