protected void RunFlow(object sender, CommandEventArgs e) { var dto = new EmailDto() { Subject = txtEmailTitle.Text, Content = txtEmailContent.Text, From = "", To = txtEmailAddress.Text }; var validator = ServiceLocator.Current.GetInstance<IValidator<EmailDto>>(); var result = validator.Validate(dto); // need to output something there var flowInput = new WorkFlowInput() { Email = dto, IsNewRequest = true }; var workflow = new FlowHost(); workflow.OnWfCompleted += workflow_OnWfCompleted; workflow.OnWfError += workflow_OnWfError; workflow.OnIdle += workflow_OnIdle; var workflowId = workflow.CreateOrResume(flowInput); if (workflowId.HasValue) instanceId.Value = workflowId.Value.ToString(); }
public ActionResult InitFlow(EmailDto dto) { if (ModelState.IsValid) { var manager = ServiceLocator.Current.GetInstance<IEmailFlowManager>(); var id = manager.InitEmailFlow(dto); } return View("Index"); }
public Guid? InitEmailFlow(EmailDto dto) { var flowInput = new WorkFlowInput() { Email = dto, IsNewRequest = true }; var workflow = new FlowHost(); workflow.OnWfCompleted += workflow_OnWfCompleted; workflow.OnWfError += workflow_OnWfError; workflow.OnIdle += workflow_OnIdle; var workflowId = workflow.CreateOrResume(flowInput); return workflowId; }
public ActivityOutput SendEmail(EmailDto dto) { return new ActivityOutput() { Status = Base.Constant.Status.Sent, Successful = true, Message = "MB Implementation" }; }
public ActivityOutput SendEmail(EmailDto dto) { return null; }
public ActivityOutput ConfirmEmail(EmailDto dto) { return null; }