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

User Manual    [Previous]   [Next]   

W069 Auto Transition Conflict

Umple semantic warning issued when an auto-transition has a conflict with a previously defined transition

An auto-transition in a state that is declared after another auto-transition will be ignored, and only the first auto-transition will be executed. No warning is issued if the destination state of both auto-transitions is the same.

Example

  1. //The warning is generated due  
  2. //to the auto-transition to s2  
  3. //conflicting with the auto-  
  4. //transition to s3  
  5. class A {  
  6.   sm {  
  7.     s1 {  
  8.       entry /{doSomething();}  
  9.       -> s2;  
  10.         
  11.       do {doSomethingElse();}  
  12.       -> s3;  
  13.     }  
  14.     s2 {  
  15.     }  
  16.     s3 {  
  17.     }  
  18.   }  
  19.   void doSomething() {}  
  20.   void doSomethingElse() {}  
  21. }  
  22.   
  23.         

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

  1. //The warning is avoided here  
  2. //by keeping only one auto-  
  3. //transition  
  4. class A {  
  5.   sm {  
  6.     s1 {  
  7.       entry /{doSomething();}  
  8.       do {doSomethingElse();}  
  9.       -> s2;  
  10.     }  
  11.     s2 {  
  12.     }  
  13.   }  
  14.   void doSomething() {}  
  15.   void doSomethingElse() {}  
  16. }  
  17.   
  18.         

Load the above code into UmpleOnline