Sparx Systems Forum
Enterprise Architect => Uml Process => Topic started by: MrDX on September 10, 2007, 02:41:53 am
-
Hi,
I am trying to model a cyclic action in a state machine, for example for this scenario:
Machine is in state 'A', so send all 2 seconds a message until the state is changed.
How can I model it?
-
Hi,
I am trying to model a cyclic action in a state machine, for example for this scenario:
Machine is in state 'A', so send all 2 seconds a message until the state is changed.
How can I model it?
Which cycle are you trying to model, the "cycle from and to state 'A' ", or the repetitive "send all 2 seconds" ?
It would not appear that the "send all 2 seconds" causes any state change so the repetitve action would apear in an Activity diagram. If you are modeling in and out of state 'A', there would be triggers that initiate those state changes.
Another approach would involve the use of a Timer event.
-
Your question isn't entirely clear, but it sounds like every 2 seconds you want to do something until there is a state change.
The "Do Action" is used for such repetitive tasks. You can have a reflexive transition (a transition that starts and ends at the current state). Label the transition with a "2 second" note and the modeling is complete.
revdev
-
Thank you, that was very helpfully.