コード例 #1
0
 /// <summary>
 /// Perform Action
 /// </summary>
 /// <param name="action">StateEngine.ACTION_*</param>
 /// <returns>true if valid</returns>
 public bool Perform(String action)
 {
     if (!_state.IsValidAction(action))
     {
         log.Log(Level.SEVERE, "Ignored Invalid Transformation - Action=" + action + " - " + ToString());
         return(false);
     }
     log.Fine(action);
     //	Action is Valid
     if (StateEngine.ACTION_START.Equals(action))
     {
         return(StartWork());
     }
     //	Set new State
     SetWFState(_state.GetNewStateIfAction(action));
     return(true);
 }