Considering an FSM actor that starts at state Idle
startWith(Idle, IdleData)
I'd like to monitor the transition to this first state (from no state?)
I tried
onTransition {
case _ -> Idle => // Wasn't called
}
According to the relevant FSM documentation:
It is also possible to pass a function object accepting two states to onTransition, in case your transition handling logic is implemented as a method:
onTransition(handler _)
def handler(from: StateType, to: StateType) {
// handle it here ...
}
Given that the from type is StateType and not Option[StateType] I think that it may not be possible, but maybe I'm missing something.