You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
I'm new to the appccelerate state machine library and am impressed with its interface and features, especially in support of hierarchical state machines.
I have a couple of questions:
How do I determine the currently active state, other than through OnEntry methods or handling the TransactionCompleted event? Is there a function available to return the current state?
In the case of a hierarchical state machine, is there a way to get a list of the currently active states, or, alternatively, a way to determine if a specified state is active, e.g., a IsActive(state) boolean function?
In general, I'm looking for ways to programmatically determine the internal state of my state machine as I develop/test my code. This helps verify that my state machine's behavior matches its configuration.
Thanks,
Paul
The text was updated successfully, but these errors were encountered:
If possible, I'd test for the side effects that the state machine executes with its actions - not the internal state. This gives you better easier refactoring possibilities because the tests are not coupled to the internal states of the state machine.
A second option is to externalise some states (providing a property on the class containing the state machine that you can check for. This makes sense if your production code needs to know about some states. This decoupling of internal and external states again helps later refactoring.
I'm new to the appccelerate state machine library and am impressed with its interface and features, especially in support of hierarchical state machines.
I have a couple of questions:
How do I determine the currently active state, other than through OnEntry methods or handling the TransactionCompleted event? Is there a function available to return the current state?
In the case of a hierarchical state machine, is there a way to get a list of the currently active states, or, alternatively, a way to determine if a specified state is active, e.g., a IsActive(state) boolean function?
In general, I'm looking for ways to programmatically determine the internal state of my state machine as I develop/test my code. This helps verify that my state machine's behavior matches its configuration.
Thanks,
Paul
The text was updated successfully, but these errors were encountered: