UML 2.5 FTF Avatar
  1. OMG Issue

UML25 — Location: p. 329 State Configurations

  • Key: UML25-378
  • Legacy Issue Number: 17992
  • Status: closed  
  • Source: University of Texas ( Omar Badreddin)
  • Summary:

    Title: What state are you in when the entry action is being executed?
    As I remember, this is new in this version (UML 2.5). This line implies that a state is not active until the entry action has been executed and completed (or the entry method has returned). This is also how Umple (try.umple.org) implements state machines. The issue with this choice is that if you query the state machine while the entry action is being executed, the return value will be outdated. This is a concern even if the entry action takes insignificant amount of time.
    For example, what if the entry action code queries the state machine? In that case, the query will return the source state (and not the current state). Here is the example using Umple

    stateMachine {
    State1

    { event1 -> State2; }

    State2 {
    entry /

    {defaultEntryActionMethod();}


    }
    }

    private void defaultEntryActionMathod() {
    if (currentState == State1)

    {.. .. ..}
    if (currentState == State2)
    {.. .. ..}

    }

  • Reported: UML 2.4.1 — Thu, 27 Sep 2012 04:00 GMT
  • Disposition: Resolved — UML 2.5
  • Disposition Summary:

    This requires a clarification. The revised text below is based on the view that a state machine is always “in”
    some state configuration, even while undergoing a transition. That is, the state machine is “in” a particular
    state as soon as it reaches that state through an incoming transition. This in turn means that any behaviors
    that are associated with that transition have been completed.
    This resolution also resolves issues 17994 and 17995.

  • Updated: Fri, 6 Mar 2015 20:59 GMT