list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

E053 No Concurrency At Top Level

Umple semantic error reported when concurrent substates are placed at the top level of a state machine

A state machine must be in one top level state at all times. Concurrent substates can exist in any substate at any level, but not directly in a top level state. The second example below shows how this can be handled simply by adding a level of nesting.

If the intent is simply to create concurrent do activities, an alternative is to use Umple's active objects notation.

Example

// This example generates the message
class X53conctoplevel {
  sm {
    s1 {
      do {System.out.println(
        "Reached s1");}
    }
    ||
    s2
    {
      do {System.out.println(
        "Reached s1");}
    }
  }
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// The following shows how to avoid the message
class X53conctoplevel {
  sm {
    s0 {
      s1 {
        do {System.out.println(
          "Reached s1");}
      }
      ||
      s2
      {
        do {System.out.println(
          "Reached s1");}
      }
    }
  }
}
      

Load the above code into UmpleOnline