MDrivenStart StateMachines
Once you have a StateMachine attribute, you will get a State diagram for it. The State diagram contains states that are the only allowed values of the state attribute string.
The State diagram also defines transitions between these states.
This brings structure in many ways:
- Only a limited set of values are possible.
- Change between values must follow the defined order.
- You may have rules (guards) that must be fulfilled to allow the transition.
- You can add "things to happen" when you enter a state.
A Class may have many state attributes, but each state must be uniquely named within the class. This is because we can ask an object "self.oclIsInState(#SomeState)" regardless of the attribute holding the state.
This page was edited more than 1 years ago on 05/12/2023. What links here