예제 #1
0
        public FlowSettings Next(RequestBase request)
        {
            try
            {
                IDialogHandler handler = BaseDialogHandler.Create(request);
                IEnumerable <ValidationResult> errors = handler.GetErrors(request);
                if (errors.Count() > 0)
                {
                    return(new FlowSettings(handler.GetScreenSettings(request, errors)));
                }

                handler.Complete(this);

                previousRepopulateStack.Push(new ViewFieldsListPair {
                    View = request.View, Fields = handler.FieldValues
                });

                this.Director.ExecuteRulesEngine();

                return(this.GetFlowSettings());
            }
            catch (Exception ex)
            {
                //_logger.LogWarning(0, string.Format("Progress Next {0}", Newtonsoft.Json.JsonConvert.SerializeObject(this.Progress)));
                //this._logger.LogError(ex, ex.Message);
                return(this.GetFlowSettings(ex));
            }
        }
예제 #2
0
        public FlowSettings Next(RequestBase request)
        {
            try
            {
                IDialogHandler handler = BaseDialogHandler.Create(request);
                //temporarily disable server-side validation.
                IEnumerable <ValidationResult> errors = new List <ValidationResult>();//handler.GetErrors(request);
                if (errors.Count() > 0)
                {
                    return(new FlowSettings(handler.GetScreenSettings(request, errors)));
                }

                handler.Complete(this, request);
                this.Director.ExecuteRulesEngine();

                return(this.FlowSettings);
            }
            catch (Exception ex)
            {
                _logger.LogWarning(0, string.Format("Progress Next {0}", Newtonsoft.Json.JsonConvert.SerializeObject(this.Progress)));
                this._logger.LogError(ex, ex.Message);
                return(this.GetFlowSettings(ex));
            }
        }