blondacz / scala-fsm-phantom

Finite State Machine Implemented in Scala using Phantom Types

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scala-fsm-phantom

Finite State Machine Implemented in Scala using Phantom Types so there is no need for tests of basic transitions between states because compiler does not allow invalid transitions.

Instruction FSM is actually two FSMs that should be cooperating: One for message state of the Instruction (SWIFT):

    New              =>       Failed
     ||
     \/  
  Published                      ||
     ||                          \/
     \/  
  Instructed 
     ||
     \/
  Cancel Submitted    =>     Not Instructed
     ||
     \/  
  Cancelled
  

One for confirmation state (it is not possible to cancle):

  Unconfirmed             
     ||
     \/  
  Confirmed <==
     ||       ||
     ==========
  

About

Finite State Machine Implemented in Scala using Phantom Types


Languages

Language:Scala 100.0%