public ActionResult Index(string tabId, int parentId) { var result = _workflowService.InitList(parentId); var model = WorkflowListViewModel.Create(result, tabId, parentId); return(JsonHtml("Index", model)); }
public dynamic List() { var model = this.Bind <WorkflowListModel>(); var currentUser = _userStore.GetUser(this.Context.CurrentUser.UserName); // get the connection and load the workflows ConnectionModel connection = _userStore.GetConnection(model.ConnectionId); if (connection == null) { return(this.Response.AsJson(new { Message = "No connection found matching the supplied id" }, HttpStatusCode.NotFound)); //throw new Exception("No connection found matching the supplied id."); } IEnumerable <UIWorkflow> workflows = _workflowInfoService.GetIncompleteWorkflows(connection, model.WorkflowCount); WorkflowListViewModel viewModel = new WorkflowListViewModel(); viewModel.ConnectionId = connection.Id; viewModel.Workflows.AddRange(workflows); return(this.View[Views.Store.ListPartial, viewModel]); }