Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Testing and Tuning EPL monitors | Best practices for writing EPL | Implementing states
 
Implementing states
When you want to write a process that passes through one or more states it is good practice to have one action per state. For example:
action inAuction() {   
on AuctionClosed outOfAuction();
}
 
action outOfAuction() {   
on all Price (stock,*) as p and not InAuction() {
      on Price(stock,>p.price*1.01) and not InAuction() {
         sellStock();
      }
   }
   on InAuction() inAuction();
}

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.