コード例 #1
0
ファイル: Index.aspx.cs プロジェクト: kanewanggit/MbTcsClone
        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();
        }
コード例 #2
0
        public ActionResult InitFlow(EmailDto dto)
        {
            if (ModelState.IsValid)
            {
                var manager = ServiceLocator.Current.GetInstance<IEmailFlowManager>();
                var id = manager.InitEmailFlow(dto);

            }
            return View("Index");
        }
コード例 #3
0
        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;
        }
コード例 #4
0
 public ActivityOutput SendEmail(EmailDto dto)
 {
     return new ActivityOutput() { Status = Base.Constant.Status.Sent, Successful = true, Message = "MB Implementation" };
 }
コード例 #5
0
 public ActivityOutput SendEmail(EmailDto dto)
 {
     return null;
 }
コード例 #6
0
 public ActivityOutput ConfirmEmail(EmailDto dto)
 {
     return null;
 }