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

User Manual    [Previous]   [Next]   

E232 Availability of Events

Umple semantic error related to state machine operators

When an event name is used with a specific name for its state machine, the state machine and event must be available in the trait. The same restriction is applied when the symbol * is used for the name of state machines. If the event is not available in at least one of the state machines existing in the trait, then the Umple compiler raises this error code.

Example

// In this example, there is an error
// because event e2() is not available
// in state machines of trait T.
trait T {
  sm{
    s0{
      e1-> s1;
      s11{ e12-> s12; }
      s12{ e11-> s11; }   
    }
    s1{ e0-> s1;  }  
  }
}
class C {
  isA T<*.e2() as event2>;
}
      

Load the above code into UmpleOnline