uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

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