Beispiel #1
0
        public void BreakRequsetHandle(WorkflowResultCode result)
        {
            try
            {
                if (result == WorkflowResultCode.ACDS301 || result == WorkflowResultCode.ACDS4032)
                {
                    IsAgentBreakGranted = true;
                    if (AgentCurrentState.GetType() == typeof(AgentIdle))
                    {
                        if (OnAgentBreakRequestGranted != null)
                        {
                            OnAgentBreakRequestGranted(AgentCurrentState);
                        }
                    }
                    return;
                }

                IsAgentBreakeRequest = (result == WorkflowResultCode.ACDS302 || result == WorkflowResultCode.ACDS301);
                if (IsAgentBreakeRequest && OnAgentBreakRequestQueued != null)
                {
                    OnAgentBreakRequestQueued(AgentCurrentState);
                }
            }
            catch (Exception exception)
            {
                Logger.Instance.LogMessage(Logger.LoggerFiles.DuoDefault, "BreakRequsetHandle", exception,
                                           Logger.LogLevel.Error);
            }
        }
Beispiel #2
0
 public void SendStatusChangeRequestBreak(string breakReason)
 {
     try
     {
         IsBreakRequest = ardsHandler.BreakRequest(breakReason);
         if (!IsBreakRequest)
         {
             return;
         }
         if (AgentCurrentState.GetType() != typeof(AgentIdle))
         {
             return;
         }
         IsBreakRequest    = false;
         AgentCurrentState = new AgentBreak();
     }
     catch (Exception exception)
     {
         Logger.Instance.LogMessage(Logger.LogAppender.DuoLogger2, "SendStatusChangeRequestBreak", exception, Logger.LogLevel.Error);
     }
 }