public void Execute(ProtocolAssignmentStep assignmentStep, Staff rejectedBy, ProtocolRejectReasonEnum reason)
            {
                if (assignmentStep.State == ActivityStatus.SC)
                {
                    assignmentStep.Start(rejectedBy);
                }
                assignmentStep.Discontinue();
                assignmentStep.Protocol.Reject(reason);

                // TODO: one resolution step or one per procedure?
                ProtocolResolutionStep resolutionStep = new ProtocolResolutionStep(assignmentStep.Protocol);

                assignmentStep.Procedure.AddProcedureStep(resolutionStep);
            }
            public ProtocolAssignmentStep Execute(ProtocolAssignmentStep assignmentStep, Staff author)
            {
                assignmentStep.Protocol.Status     = ProtocolStatus.PN;
                assignmentStep.Protocol.Supervisor = null;
                assignmentStep.Discontinue();

                // Replace with new step scheduled step
                ProtocolAssignmentStep replacementStep = new ProtocolAssignmentStep(assignmentStep.Protocol);

                assignmentStep.Procedure.AddProcedureStep(replacementStep);
                replacementStep.Assign(author);
                replacementStep.Start(author);

                return(replacementStep);
            }
            public void Execute(ProtocolAssignmentStep assignmentStep, Staff reassignToStaff)
            {
                assignmentStep.Discontinue();

                // if it's an approval step, replace the assignment step but keep the existing protocol
                if (assignmentStep.Protocol.Status == ProtocolStatus.AA)
                {
                    // replace the step and unclaim the protocol
                    ReplaceAssignmentStep(assignmentStep.Procedure, assignmentStep.Protocol, reassignToStaff);
                }
                // other wise, create a new assignment step with its own new protocol for each procedure in the old protocol
                else
                {
                    assignmentStep.Protocol.Cancel();

                    List <Procedure> procedures = new List <Procedure>(assignmentStep.Protocol.Procedures);
                    foreach (Procedure procedure in procedures)
                    {
                        Protocol protocol = new Protocol(procedure);
                        ReplaceAssignmentStep(procedure, protocol, reassignToStaff);
                        PersistenceScope.CurrentContext.Lock(protocol, DirtyState.New);
                    }
                }
            }