uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

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, and 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

 

Another Example

// 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