SOURCECODE

How to... select a Transition that changes to a special Gate


Description:
There are six predefined Process Gates. All of them except the ErrorGate have a predefined Transition, leading to it.
(See also: HowTo..create a Transition that just changes to a Gate )



ToDo's:
  1. If you need the singelton instance of a special Process Gate, use the get-method of class SaleProcess:
    getCommitGate()
    getErrorGate(int nErrorNesting)
    getLogGate()
    getRollbackGate()
    getStopGate()
    getQuitGate()

  2. If you need a Transition, leading to a special Process Gate, use the static attributes of class GateChangeTransition:
    GateChangeTransition.CHANGE_TO_COMMIT_GATE
    GateChangeTransition.CHANGE_TO_LOG_GATE
    GateChangeTransition.CHANGE_TO_ROLLBACK_GATE
    GateChangeTransition.CHANGE_TO_STOP_GATE
    GateChangeTransition.CHANGE_TO_QUIT_GATE


Uses:
SaleProcess  GateChangeTransition  



SourceCode


      // ...

         Gate myGate1 =
            new Gate()
            {
               public Transition getNextTransition(SaleProcess pOwner, User usr)
               throws InterruptedException
               {
                  return GateChangeTransition.CHANGE_TO_QUIT_GATE;
               }
            };

      // ...