/// <summary> /// /// </summary> /// <param name="instanceGuid"></param> /// <returns></returns> private WorkflowInstancePoco GetInstance(Guid instanceGuid) { WorkflowInstancePoco instance = _instancesService.GetByGuid(instanceGuid); instance.SetScheduledDate(); // TODO -> fix this List <WorkflowTaskInstancePoco> tasks = _tasksService.GetTasksWithGroupByInstanceGuid(instance.Guid); if (tasks.Any()) { instance.TaskInstances = tasks; } return(instance); }
/// <summary> /// /// </summary> /// <param name="instanceGuid"></param> /// <returns></returns> private static WorkflowInstancePoco GetInstance(Guid instanceGuid) { WorkflowInstancePoco instance = Pr.InstanceByGuid(instanceGuid); instance.SetScheduledDate(); // TODO -> fix this List <WorkflowTaskInstancePoco> tasks = Pr.TasksAndGroupByInstanceId(instance.Guid); if (tasks.Any()) { instance.TaskInstances = tasks; } return(instance); }
/// <summary> /// /// </summary> /// <param name="instanceGuid"></param> /// <returns></returns> private WorkflowInstancePoco GetInstance(Guid instanceGuid) { WorkflowInstancePoco instance = _instancesService.GetByGuid(instanceGuid); instance.SetScheduledDate(); // TODO -> fix this List <WorkflowTaskInstancePoco> tasks = _tasksService.GetTasksWithGroupByInstanceGuid(instance.Guid); if (tasks.Any()) { // ordering by descending id to allow for cases with multiple rejections // most recent will be highest id, obviously... instance.TaskInstances = tasks.OrderByDescending(t => t.Id).ToList(); } return(instance); }