private void ExecuteHelper(EntityRef procedureStepRef, EntityRef supervisorRef) { Platform.GetService<IReportingWorkflowService>( delegate(IReportingWorkflowService service) { CompleteInterpretationForTranscriptionRequest request = new CompleteInterpretationForTranscriptionRequest(procedureStepRef); request.SupervisorRef = supervisorRef; service.CompleteInterpretationForTranscription(request); }); }
public CompleteInterpretationForTranscriptionResponse CompleteInterpretationForTranscription(CompleteInterpretationForTranscriptionRequest request) { var interpretation = this.PersistenceContext.Load<ReportingProcedureStep>(request.ReportingStepRef, EntityLoadFlags.CheckVersion); var supervisor = ResolveSupervisor(interpretation, request.SupervisorRef); SaveReportHelper(request.ReportPartExtendedProperties, interpretation, supervisor, true); UpdatePriority(interpretation, request.Priority); ValidateReportTextExists(interpretation); var op = new Operations.CompleteInterpretationForTranscription(); var nextStep = op.Execute(interpretation, this.CurrentUserStaff, new PersistentWorkflow(this.PersistenceContext)); this.PersistenceContext.SynchState(); return new CompleteInterpretationForTranscriptionResponse { InterpretationStepRef = interpretation.GetRef(), TranscriptionStepRef = nextStep.GetRef() }; }