MDrivenStart StateMachines
No edit summary
No edit summary
Line 1: Line 1:
Once you have a state-machine-attribute, you will get a state-diagram for it. The State diagram contains States are the only allowed values of the state attribute string.  
Once you have a state-machine-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.  
The state diagram also defines transitions between these states.  


This brings structure in many ways:
This brings structure in many ways:
# Only a limited set of values are possible
# Only a limited set of values are possible.
# Change between values must follow the defined order
# Change between values must follow the defined order.
# You may have rules (guards) that must be fulfilled in order to allow transition
# You may have rules (guards) that must be fulfilled in order to allow transition.
# You can add "things to happen" when you enter a state
# 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 attribute holding the 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.  


{{Template:MDrivenStart_Template}}
{{Template:MDrivenStart_Template}}
[[Category:MDrivenStart]]
[[Category:MDrivenStart]]

Revision as of 11:06, 10 January 2023

Once you have a state-machine-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:

  1. Only a limited set of values are possible.
  2. Change between values must follow the defined order.
  3. You may have rules (guards) that must be fulfilled in order to allow transition.
  4. 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.

Back One Back to Start Chat Updated!

This page was edited more than 1 years ago on 05/12/2023. What links here