Hi all,
When a state machine calls a command that return false, its status becomes 'error'. From there, I can deactivate the state machine, but not activate it afterwards (returns fails).
Is there a way to re-initialize the state machine so it can be restarted properly ?
Regards, Max
Getting a state machine out of its error state
Hi,
On Wed, Jun 9, 2010 at 3:53 PM, <max [dot] lekeux [..] ...> wrote:
> When a state machine calls a command that return false, its status becomes 'error'. From there, I can deactivate the state machine, but not activate it afterwards (returns fails).
>
> Is there a way to re-initialize the state machine so it can be restarted properly ?
The actual behaviour of the current StateMachine Engine is obscure to
me too, but I guess what happens is that the "program script" which is
executed in a state (or transition) goes into error state. I can't
find the possible states of such a program script in the docs though.
So I think you would need access to the program script to do what you
want, but I don't know how. Maybe some FSM expert can help you
better.
However, would it help you if you could avoid the error altogether
using the "try" clause instead of the "do" clause?
Klaas
Getting a state machine out of its error state
On Wed, Jun 9, 2010 at 4:39 PM, Klaas Gadeyne <klaas [dot] gadeyne [..] ...> wrote:
> Hi,
>
> On Wed, Jun 9, 2010 at 3:53 PM, <max [dot] lekeux [..] ...> wrote:
>> When a state machine calls a command that return false, its status becomes 'error'. From there, I can deactivate the state machine, but not activate it afterwards (returns fails).
>>
>> Is there a way to re-initialize the state machine so it can be restarted properly ?
>
> The actual behaviour of the current StateMachine Engine is obscure to
> me too, but I guess what happens is that the "program script" which is
> executed in a state (or transition) goes into error state. I can't
> find the possible states of such a program script in the docs though.
> So I think you would need access to the program script to do what you
> want, but I don't know how. Maybe some FSM expert can help you
> better.
Or maybe even better, you could set a breakpoint at
StateMachine::activate() and see why it fails.
> However, would it help you if you could avoid the error altogether
> using the "try" clause instead of the "do" clause?
>
> Klaas
>
Getting a state machine out of its error state
Hi all,
When a state machine calls a command that return false, its status becomes 'error'. From there, I can deactivate the state machine, but not activate it afterwards (returns fails).
Is there a way to re-initialize the state machine so it can be restarted properly ?
Regards,
Max