[erlang-questions] gen_statem state enter call and changing t oanother state
Tue Jun 12 12:31:51 CEST 2018
Could it be so that you are trying to solve the problem in the wrong place?
State enter actions are good for example starting a timer, but I think it
is illogical to change the state.
It sound to me like you could do so pattern matching, maybe in conjunction
with some guards in the your state function clauses and if your conditions
are meet maybe
all that clause does is to change state.
Regards Ingela Erlang/OTP team - Ericsson AB
2018-06-12 10:31 GMT+02:00 Frans Schneider <fchschneider@REDACTED>:
> On 06/12/2018 10:06 AM, Raimo Niskanen wrote:
>> I agree. State enter calls were introduced to allow code to be run when a
>> state is entered, without having to duplicate that code at every state
>> from the previous state. It is a feature existing in other state machine
>> description languages e.g OpenBSD's ifstated.
>> This is the exact reason for bringing up the whole issue. And sometimes,
> that requires a next_state NewState.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions