list of dots

User Manual    [Previous]   [Next]   

E051 Event Parameters Must Match

Umple semantic error reported when events with the same name have different parameters

When parameters are specified on a state machine event, all transitions with the same event name must have identical parameters, both in name and type. The reason for this is that there is only one event method generated.

Example

// This example generates the error message
class X {
  sm {
    s1 {
      e1(String s) -> s2;
    }
    s2 {
      e1(Float f) -> s2;
    }
  }
}


      

Load the above code into UmpleOnline

 

Another Example

// This example solves the problem
class X {
  sm {
    s1 {
      e1(String s) -> s2;
    }
    s2 {
      e1(String s) -> s2;
    }
  }
}


      

Load the above code into UmpleOnline