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
// This example shows a simple state machine // without any actions or guards // // In the following, status is a state machine, // and acts like an attribute, whose value is set // by various events. // // Open, Closing, Closed, Opening and HalfOpen are // the possible values, or states, of status. // // buttonOrObstacle, reachBottom and reachTop are // events. These become generated methods that can // be called to cause a state change. // // To make the state diagram appear in // UmpleOnline, select 'Options' then choose // 'GraphViz State Diagram' class GarageDoor { status { Open { buttonOrObstacle -> Closing; } Closing { buttonOrObstacle -> Opening; reachBottom -> Closed; } Closed { buttonOrObstacle -> Opening; } Opening { buttonOrObstacle -> HalfOpen; reachTop -> Open; } HalfOpen { buttonOrObstacle -> Opening; } } }