Example #1
0
        public static BasicWorkflow Create(string sourceEmailAddress, string requestId, int expiresIn)
        {
            var workflow = new BasicWorkflow(
                sourceEmailAddress,
                requestId,
                expiresIn,
                new List <IWorkflowStep>
            {
                PersonalStep.Create(WorkflowSteps.Steps.Personal.ToString(), "Please tell us about yourself.", string.Empty, string.Empty, string.Empty),
                ResultStep.Create(WorkflowSteps.Steps.Result.ToString(), "Thank you for your time", false)
            });

            return(workflow);
        }
Example #2
0
        public static OnboardingWorkflow Create(string sourceEmailAddress, string requestId, int expiresIn)
        {
            var workflow = new OnboardingWorkflow(
                sourceEmailAddress,
                requestId,
                expiresIn,
                new List <IWorkflowStep>
            {
                PersonalStep.Create(WorkflowSteps.Steps.Personal.ToString(), "Please tell us about yourself.", string.Empty, string.Empty, string.Empty),
                WorkStep.Create(WorkflowSteps.Steps.Work.ToString(), "What do u do?", string.Empty),
                AddressStep.Create(WorkflowSteps.Steps.Address.ToString(), "Where do u live?", string.Empty, string.Empty, string.Empty, string.Empty),
                ResultStep.Create(WorkflowSteps.Steps.Result.ToString(), "Thank you for your time", false)
            });

            return(workflow);
        }
        public static IWorkflowStep Create(string stepName, string title, FormData formData)
        {
            switch (stepName)
            {
            case "Personal":
                return(PersonalStep.Create(stepName, title, formData.FirstName, formData.LastName, formData.Email));

            case "Work":
                return(WorkStep.Create(stepName, title, formData.Work));

            case "Address":
                return(AddressStep.Create(stepName, title, formData.Street, formData.City, formData.State, formData.Zip));

            case "Result":
                return(ResultStep.Create(stepName, title, formData.IsValid));    //may be if needed we can bring this value in from db.

            default:
                throw new ArgumentOutOfRangeException(stepName, $"{stepName} is not valid.");
            }
        }