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

User Manual    [Previous]   [Next]   

E052 State Machine Name Clash

Umple semantic error reported when a state machine name matches the name of another element such as an association or attribute

Since, in effect, a state machine defines a special kind of attribute (whose value is enumerated as one of the states and is controlled by events) it is not allowed to have an attribute or association with the same name as a state machine.

Example

// This example generates the message
// because the state machine a
// clashes with the attribute a
class X52assattnamestatemachine1 {
  a;
  a {
    s1 {}
    s2 {}
  }
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// The sample generates the message
// because the state machine a
// clashes with the association role name a
class X52assattnamestatemachine2 {
  1 -- 0..1 B a;
  a {
    s1 {}
    s2 {}
  }
}
class B {}
      

Load the above code into UmpleOnline