1

I know that action starts to execute upon the entry, and the actions executes for do as long it's in the state.

but I think there's a lack of definition for entry, is it similar to do or the action executes upon entry to the state and it keeps executing even after leaving the state?

Mostfa shma
  • 193
  • 1
  • 6
  • what is not clear for you in the norm saying "*A State may have an associated entry Behavior. This Behavior, if defined, is executed **whenever the State is entered through an external Transition***" ? "*it keeps executing even after leaving the state*": no for the entry nor the do nor the exit behaviors, no behavior associated to a state is executed continuously after leaving that state (fortunately) – bruno Jun 12 '20 at 07:39

1 Answers1

1

From UML 2.5 p. 307:

14.2.3.4.3 State entry, exit, and doActivity Behaviors

A State may have an associated entry Behavior. This Behavior, if defined, is executed whenever the State is entered through an external Transition. In addition, a State may also have an associated exit Behavior, which, if defined, is executed whenever the State is exited. A State may also have an associated doActivity Behavior. This Behavior commences execution when the State is entered (but only after the State entry Behavior has completed) and executes concurrently with any other Behaviors that may be associated with the State, until:

  • it completes (in which case a completion event is generated) or
  • the State is exited, in which case execution of the doActivity Behavior is aborted.

The execution of a doActivity Behavior of a State is not affected by the firing of an internal Transition of that State.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86