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
// Sample UML state machine written in Umple // Shows nested states and transitions among those states. // This has a main program, so can be executed // Supply arguments, or use the default arguments class BigStateMachineTest { depend java.lang.reflect.InvocationTargetException; depend java.lang.reflect.Method; sm { Zxab { Zx { Z { e3-> X; e2 -> A; } X { } e5 -> G; } A { e5 -> D; e3 -> B; } B { e3 -> Ge; } e1 -> E; e4 -> Ge; } D { e5 -> X; e2 -> E; } Ge { G { e1 -> B; } E { e1 -> G; e2 -> G; } } } depend java.lang.reflect.Method; depend java.util.*; public static void main(String [ ] args) { String[] altargs= {"2","3", "1", "5", "1"}; String[] realargs = null; if(args.length == 0 || args[0].length()==0) { realargs=altargs; } else { realargs=args; } BigStateMachineTest b = new BigStateMachineTest(); Class c = b.getClass(); System.out.println("Initial " +b.getSmFullName()); Method[] mlist = c.getDeclaredMethods(); String ev; for (int i=0; i