Draw on the right, write (Umple) model code on the left. Analyse models and generate code. This tool stores your data in cookies and on a server. I understand. Click to learn about privacy. Download Donate For help: User manual Ask questions Report issue
// In this example, the system will transition to state b // when the value of the attribute count drops below 5 // An attempt to make this transition is taken every second // The do activity slowly drops the value of count class X { Integer count = 10; sm { a { entry / { System.out.println("entering a"); } do { while (count > 0) { System.out.println("Count = " + count); Thread.sleep(1000); count --; } } afterEvery(1) [count<5] -> b; } b { entry / { System.out.println("entering b"); } } } public static void main(String [] args) { X x = new X(); } } //$?[End_of_model]$? // @@@skipcppcompile - Has Java code // @@@skipphpcompile - Has Java code // @@@skiprubycompile - Has Java code // @@@skippythoncompile - Has Java code