/// <summary>
        /// Re-assigns this step to the specified scheduled performer.
        /// </summary>
        /// <remarks>
        /// If this step is currently Scheduled, the scheduled performer is simply changed
        /// to the specified performer.  If this step is in-progress or suspended, then
        /// it is discontinued, and a new step is scheduled and assigned to the specified performer.
        /// </remarks>
        /// <param name="performer"></param>
        /// <returns>A new step with the assigned performer.</returns>
        public virtual ProcedureStep Reassign(Staff performer)
        {
            if (this.IsTerminated)
            {
                throw new WorkflowException("Cannot re-assign a terminated procedure step.");
            }

            if (this.State == ActivityStatus.SC)
            {
                this.Assign(performer);
                return(this);
            }
            else
            {
                this.Discontinue();
                ProcedureStep newStep = CreateScheduledCopy();

                if (this.Scheduling != null)
                {
                    newStep.Schedule(this.Scheduling.StartTime, this.Scheduling.EndTime);
                }

                newStep.Assign(performer);
                return(newStep);
            }
        }