private void UpdateMilestoneRequirement(WorkRequest workRequest, WorkPacket workPacket, Models.DTO.MilestoneRequirement mreq)
        {
            Console.WriteLine("[WR:" + workPacket.WorkRequestId + " " + "WP:" + workPacket.WorkPacketId + "][BEGIN--]-updating invalid data STORMS milestone requirement");

            HttpResponseMessage hrm = _workRequestMilestoneRequirementRequestor.Put(
                new Uri(BaseManagedWorkApiUri + ResolveCurlyBrackets(Properties.Settings.Default.ManagedWorkOrderApiResourse_MilestoneRequirement, workRequest.Id.ToString(), "624")),
                mreq
                );

            Console.WriteLine("[WR:" + workPacket.WorkRequestId + " " + "WP:" + workPacket.WorkPacketId + "][SUCCESS]-updated invalid data STORMS milestone requirement");
        }
        private void ValidationInvalid(WorkPacket workPacket, WorkRequest workRequest, List <ValidationResult> validationResults)
        {
            //add STORMS exception to the Job owner's Work Queue
            AddStormsWorkQueue(workRequest, workPacket, "Failed Forestry data validation");

            //add STORMS tracking Audit Log
            AddStormsTracking(workRequest, workPacket, "FOBATCH", "FODATCHK", "Forestry data validation Failed");

            //add STORMS requirement to say that the data is invalid
            StormsMilestoneRequirement(workRequest, workPacket);

            //create remedy ticket for invalid data
            CreateRemedyTicket(workRequest, workPacket, validationResults);
        }
        private void ValidationSuccess(WorkPacket workPacket, WorkRequest workRequest)
        {
            //add to tracking
            AddStormsTracking(workRequest, workPacket, "FOBATCH", "FODATCHK", "Forestry data validation Passed");

            //convert STORMS into forestry model
            Forestry.Models.ForestryRequest forestry = MapToForestry(workRequest, workPacket);

            //add to tracking
            AddStormsTracking(workRequest, workPacket, "FOBATCH", "FOCREATE", "Forestry order creation request sent");

            //send to Forestry to MQ
            ProcessForestry(workRequest, workPacket, forestry);
        }
        private void CreateMilestoneRequirement(WorkRequest workRequest, WorkPacket workPacket)
        {
            Console.WriteLine("[WR:" + workPacket.WorkRequestId + " " + "WP:" + workPacket.WorkPacketId + "][BEGIN--]-adding invalid data STORMS milestone requirement");

            //add to STORMS TWMIFREQUIREMENT table.. then an existing STORMS process will automatically run to add it to STORMS
            HttpResponseMessage hrm = _workRequestMilestoneRequirementRequestor.Post(
                new Uri(BaseManagedWorkApiUri + ResolveCurlyBrackets(Properties.Settings.Default.ManagedWorkOrderApiResourse_MilestoneRequirements, workRequest.Id.ToString())),
                new MilestoneRequirement()
            {
                WorkRequestId = workRequest.Id.ToString(),
                District      = workRequest.District,
                RequirementId = "624",
                Description   = "Forestry Data Invalid",
                Status        = "R"
            }
                );

            Console.WriteLine("[WR:" + workPacket.WorkRequestId + " " + "WP:" + workPacket.WorkPacketId + "][SUCCESS]-added invalid data STORMS milestone requirement");
        }