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
//The class Machine uses both deep history //and regular history states. //When the event emergency occurs, the //state of normalOperation is stored. //When the issue is resolved, depending //on the intended behaviour, the state //machine goes back to the specific //substate it was previously in (HStar) //or it restarts the phase it was in (H) class Machine { sm { initializing {readyForOperation -> normalOperation;} normalOperation { phase1 { completePhase1 -> phase2;} phase2 { subphase2a { complete2a -> subphase2b;} subphase2b {} completePhase2 -> phase3; } phase3 {} emergency -> handleEmergency; } handleEmergency { resolveEmergency -> normalOperation.HStar; resolveButCleanup2a -> normalOperation.H; } } } // @@@skipphpcompile Php does not generate proper // history state code (see issue 1338) // @@@skipcppcompile