*/
public void run()
{
startState = findStartState(model);
disableAnyEventTransition(startState);
engine.getEventManager().handleAndWait(new Event("_INIT_"), new DefaultContext(null));
while (notInFinalState)
{
Event event = null;
if (returnFromSubMachineName != null)
{
event = new Event(RETURN_EVENT_NAME + returnFromSubMachineName);
returnFromSubMachineName = null;
}
else
{
event = produceEvent();