Hi, Community,
I'm trying to model my app logic with mina-sm framework and reading
StateMachineProxyFactoryTest as the start point, like what was suggested by
Niklas.
There are lines like this:
@Handler( on = "eject", in = "s4", next = "s1" )
public void ejected()
{
messages.add( "Tape ejected" );
}
I'm not sure I understand the above code correctly:
If current state is "s4" and event "eject" is received, the method ejected()
of the hander will be called and then the state will be changed to "s1".
Also, I can't figure out how to model this scenario:
conditioned state transition, like:
if(condition met){
// next state is "stateA"
}else{
// next state is "stateB"
}
It seems to me that the state transition is predefine in
on = "eject", in = "s4", next = "s1"
Anyone can shed light on this? Thanks a lot!
--
View this message in context:
http://www.nabble.com/a-question-when-learning-mina-sm-tf3543552.html#a9892328
Sent from the mina dev mailing list archive at Nabble.com.