Hi,

I'm re-posting this from scala-user.

I have a problem with FSM Actors in Akka. Say I have a bunch of states and 
the transitions look something like this:

   Waiting -> Active -> Expired

You can't get from Waiting to Expired directly. But when in "Waiting" I 
still need to be able to send an "Expire" message to the actor, at which 
point I need the actor to execute the transition changes for both (Waiting 
-> Active) and for (Active -> Expired).

So I basically want something like this (making stuff up):


   when(Waiting) {
      case Event(Expire, _) =>
         goto(Active).andThen(Expired)
   }

   onTransition {
     case Waiting -> Active => /* activate */
     case Active -> Expired => /* expiry */
   }

This is basically a non-deterministic finite automaton.

Looking at the documentation and in the source-code, I don't believe this 
is possible. It would have been great though, because the goto() on the 
Expire event would make it perfectly clear that the actor first goes into 
Active before being Expired. So what choices do I have?

Thanks,


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to