User Tools

Site Tools


Sidebar

Welcome to DIDO WIKI

dido:public:s_cli:05_contents:01_prt:06_dddl:exchanges

5.6 Exchanges

Return to DidoDLL

     CREATE exchange UniDido.TopOffDining
        ( FromAccount Hash.
          ToAccount   Hash
        ) AS
       FROM OurDido.StudentAccount
         TO OurDido.DinningHallAccount
     ( AccountsID  : Hash;
       StudentId   : SELECT genesis 
                       FROM OurDido.StudentAccount STUDENT_ACCT
                      WHERE STUDENT_ACCT.AccountId = $FromAccount.;
       AccountId   : SELECT genesis 
                       FROM OurDido.DinningHallAccount DINING_ACCT
                      WHERE DINING_ACCT.AccountId = $ToAccount.;
     )
     AS TRANSACTION
     ( TRANSFER FROM StudentId::CURRENT
                  TO OurDido.DinningHallAccount
              AMOUNT $AmountToTransfer.
       TIMEOUT = 10*60000 --- 10 minutes
       WHEN    Success
          THEN POST INFORMATION
            TO Log, Notify  
       OBJECTS OurDido.StudentAccount,
               OurDido.DinningHallAccount
          TEXT The $AmountToTransfer. successful BETWEEN $FromDido. AND $toDido
      WHEN     failure
          THEN POST WARNING
            TO log, Notify, Alert
       OBJECTS OurDido.StudentAccount,
               OurDido.DinningHallAccount,
               OurDido.Administrator
     );
dido/public/s_cli/05_contents/01_prt/06_dddl/exchanges.txt · Last modified: 2021/06/15 13:36 by nick
Translations of this page: