[erlang-questions] Erlang gen_fsm transition to a new state

Mazen Harake <>
Tue May 24 10:36:48 CEST 2011


The state transitions are not automatic. You have to send an event to the
FSM to "drive" it.

Look at the documentation for various "send_event" functions.

/M

On 24 May 2011 10:10, Alexander Kuleshov <> wrote:

> Hello,
>
> I have erlang gen_fsm, my first state:
>
> begin({Nick}, _From, State) ->
>            {reply, true, next_state, State}.
> Then i have:
>
> next_state(_Event, _From, State) ->
>        io:format("Test \n")
>        {reply, ok, begin, State}.
> But i don't seen Test note in shell
>
> How correctly transit to a new state?
>
> Thank you.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110524/e271aa56/attachment.html>


More information about the erlang-questions mailing list