##Introduction##
Many software systems use the event driven state model which means they wait continuously for the occurrence of some external events to start doing some activity. Each activity that needs to be performed by the software system shall be modeled in the form of states each one of which can exist independently. Also grouping of activities can be possible through the use of hierarchical state model, where each states can be grouped in to a set of parent states. This not only enhances the performance of the system but also increases the maintainability of the system. It will become much more easier to adapt in the projects when the code can be auto generated. In this repository a hierarchical state machine library and automatic code generation tool for the generating the HSM using the UML XMI export from Enterprise architect is provided.