1. A computer-implemented method comprising: displaying a statechart on a display in response to user input, wherein the statechart comprises a plurality of state icons connected by connector elements, wherein the state icons represent states and wherein the connector elements represent transitions between the states; displaying a graphical user interface enabling a user to select from a plurality of event modes for the statechart, wherein the plurality of event modes includes a synchronous mode and an asynchronous mode; receiving user input selecting an event mode from the plurality of event modes, wherein the selected event mode is one of the synchronous mode or the asynchronous mode; storing information indicating the selected event mode; and executing the statechart, wherein said executing comprises: synchronously receiving one or more trigger events if the selected event mode is the synchronous mode; asynchronously receiving one or more trigger events if the selected execution mode is the asynchronous mode.