Пример #1
0
        private static void SetTaskWorkflows(ESSTask task, IncidentTask incidentTask)
        {
            var workflows = new[]
            {
                new TaskWorkflow {
                    Name = "digital-processing", Enabled = incidentTask.Status == IncidentTaskStatus.Active
                },
                new TaskWorkflow {
                    Name = "paper-data-entry", Enabled = true
                },
                new TaskWorkflow {
                    Name = "remote-extensions", Enabled = false
                },
            };

            task.Workflows = workflows;
        }
        public ActionResult <ESSTask> GetTask(string taskId)
        {
            //var reply = await messagingClient.Send(new TeamMembersQueryCommand { TeamId = teamId, MemberId = memberId, IncludeActiveUsersOnly = false });
            //var teamMember = reply.TeamMembers.SingleOrDefault();
            //if (teamMember == null) return NotFound(memberId);
            //return Ok(mapper.Map<TeamMember>(teamMember));

            var activeTask = new ESSTask
            {
                Id            = "123456",
                StartDate     = DateTime.Now,
                EndDate       = DateTime.Now.AddDays(3),
                CommunityCode = "6e69dfaf-9f97-ea11-b813-005056830319", //100 Mile House
                Description   = "Task Description",
                Status        = "Active"
            };

            return(Ok(activeTask));
        }