A method, system and apparatus are directed to application generation, and more particularly, to generating a user interface enabled application for an embedded device. A configuration file defining at least a hierarchical state machine (HSM) is received and/or pre-loaded. Based on the received configuration file, an intermediate version of the HSM is generated, wherein a child state of the intermediate version is enabled to pass an unconsumed event to a parent state of the child state. Based on the intermediate version, an invocation of at least one user interface (UI) element associated with a state of the intermediate version is enabled. The intermediate version may be executed and/or interpreted by an event-state engine on an embedded device.