protected void AddEventAction(string eventName, string taskName, object[] args)
        {
            EnsureName();

            IStateMachineEvent evt = StateMachine.FindEventByName(eventName);

            if (evt != null)
            {
                if (CurrentState != null)
                {
                    CurrentState.AddNewEventAction(taskName, evt, args);
                }
                else
                {
                    StateMachine.AddNewEventAction(taskName, evt, args);
                }
            }
        }