internal void GetUserRunningProcess(ProcessDetails processDetails) { var rpaService = new RPAService(); var result = rpaService.GetApiResult("getUserRunningProcess", processDetails.User.UserId); if (!result.IsSuccess) { processDetails.Error = JsonConvert.DeserializeObject <ProcessModel>(result.Content).Error; processDetails.Processes = new List <ProcessModel>(); } else { var processes = JsonConvert.DeserializeObject <List <ProcessModel> >(result.Content); processDetails.Processes = processes; } }
internal void GetUserProcess(ProcessDetails processDetails) { var rpaService = new RPAService(); var result = rpaService.GetApiResult("userProcesses", processDetails.User.UserId); if (!result.IsSuccess) { processDetails.Error = JsonConvert.DeserializeObject <ProcessModel>(result.Content).Error; } else { var processes = JsonConvert.DeserializeObject <List <ProcessModel> >(result.Content); //sort the process processes = processes.OrderBy(p => p.Name).ToList(); processDetails.Processes = processes; } }
private async Task <DialogTurnResult> IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { var processDetails = (ProcessDetails)stepContext.Options; var snConfig = new RPAService(); var result = snConfig.GetApiResult("userProcesses", ""); if (!result.IsSuccess) { processDetails.Error = JsonConvert.DeserializeObject <ProcessModel>(result.Content).Error; } else { var processes = JsonConvert.DeserializeObject <List <ProcessModel> >(result.Content); processDetails.Processes = processes; } return(await stepContext.NextAsync(processDetails, cancellationToken)); }