public CompleteVerificationResponse CompleteVerification(CompleteVerificationRequest request)
        {
            var verification = this.PersistenceContext.Load <VerificationStep>(request.ReportingStepRef, EntityLoadFlags.CheckVersion);
            var supervisor   = ResolveSupervisor(verification, request.SupervisorRef);

            SaveReportHelper(request.ReportPartExtendedProperties, verification, supervisor, true);
            UpdatePriority(verification, request.Priority);

            ValidateReportTextExists(verification);

            var op          = new Operations.CompleteVerification();
            var publication = op.Execute(verification, this.CurrentUserStaff, new PersistentWorkflow(this.PersistenceContext));

            this.PersistenceContext.SynchState();

            return(new CompleteVerificationResponse
            {
                VerificationStepRef = verification.GetRef(),
                PublicationStepRef = publication.GetRef()
            });
        }
 private void ExecuteHelper(string procedureStepName, EntityRef procedureStepRef, EntityRef supervisorRef)
 {
     if (procedureStepName == StepType.Interpretation || procedureStepName == StepType.TranscriptionReview)
     {
         Platform.GetService <IReportingWorkflowService>(
             delegate(IReportingWorkflowService service)
         {
             CompleteInterpretationAndVerifyRequest request = new CompleteInterpretationAndVerifyRequest(procedureStepRef);
             request.SupervisorRef = supervisorRef;
             service.CompleteInterpretationAndVerify(request);
         });
     }
     else if (procedureStepName == StepType.Verification)
     {
         Platform.GetService <IReportingWorkflowService>(
             delegate(IReportingWorkflowService service)
         {
             CompleteVerificationRequest request = new CompleteVerificationRequest(procedureStepRef);
             request.SupervisorRef = supervisorRef;
             service.CompleteVerification(request);
         });
     }
 }