/// <summary> /// Method to get the list of templates /// </summary> /// <returns></returns> public static List<WorkflowTemplateItem> GetListOfTemplates(IWorkflowsQueryService client) { List<WorkflowTemplateItem> templateList = new List<WorkflowTemplateItem>(); WorkflowTypeGetReplyDC replyDC = null; replyDC = client.WorkflowTypeGet(); if (null != replyDC && null != replyDC.StatusReply && 0 == replyDC.StatusReply.Errorcode) { foreach (WorkflowTypesGetBase wfType in replyDC.WorkflowActivityType) { // Create a Workflow Template Item without XAML and add it to the Template list WorkflowTemplateItem newItem = new WorkflowTemplateItem(wfType.WorkflowTemplateId, wfType.Name); templateList.Add(newItem); } } // Return the list return templateList; }
/// <summary> /// Method to get the list of templates /// </summary> /// <returns></returns> public void GetListOfTemplates(IWorkflowsQueryService client) { var templateList = new List<WorkflowTemplateItem>(); WorkflowTypeGetReplyDC replyDC = null; replyDC = client.WorkflowTypeGet(); if (null != replyDC && null != replyDC.StatusReply && 0 == replyDC.StatusReply.Errorcode) { // Create a Workflow Template Item without XAML and add it to the Template list if (replyDC.WorkflowActivityType.Any()) { templateList.AddRange( replyDC.WorkflowActivityType.Select( workflowType => new WorkflowTemplateItem(workflowType.WorkflowTemplateId, workflowType.Name))); } } this.SelectWorkflowTemplates = templateList; }
private void LoadLiveData(IWorkflowsQueryService client) { WorkflowTypes = client.WorkflowTypeGet().WorkflowActivityType; var categories = client.ActivityCategoryGet(new ActivityCategoryByNameGetRequestDC().SetIncaller()); ActivityCategories.Assign(from category in categories select category.Name); var status = client.StatusCodeGet(new StatusCodeGetRequestDC().SetIncaller()).List; StatusCodes.Assign(from item in status select item.Name); }