zoukankan      html  css  js  c++  java
  • completed solution matches microsoft sequential workflow tutorial

    microsoft sequential workflow tutorial website:http://msdn.microsoft.com/en-us/library/ms734794(v=vs.90).aspx.

    after reading this tutorial,i found three bugs:

    1.the name of workflow project is the same as a class file name,both of them named "ExpenseReportWorkflow",which can cause compilction failed。

    for example:

    this.rejectEvent.InterfaceType = typeof(ExpenseReportWorkflow.IExpenseReportService);

    please modify any of them;

    2.the attribute of the interface IExpenseReportService should be ExternalDataExchangeAttribute

        [ExternalDataExchangeAttribute]
        public interface IExpenseReportService
        {
            /// <summary>
            /// host appliation implements the Methods which will be called by workflow
            /// </summary>
            /// <param name="message"></param>
            void GetLeadApproval(string message);
            void GetManagerApproval(string message);
            /// <summary>
            /// 用于通知工作流特定的事件已经发生
            /// 例如用户在界面中点击了同意按钮
            /// </summary>
            event EventHandler<ExternalDataEventArgs> ExpenseReportApproved;
            event EventHandler<ExternalDataEventArgs> ExpenseReportRejected;
        }

    3.for running this demo continuously,you'd better modify the submitButton_Click method as below:

                if (properties.ContainsKey("Amount"))
                {
                    //properties.Add("Amount", Int32.Parse(this.amount.Text));
                    properties["Amount"] = Int32.Parse(this.amount.Text);
                }
                else
                    properties.Add("Amount", Int32.Parse(this.amount.Text));
                
                Type type =typeof(ExpenseReportWorkflowProject.ExpenseReportWorkflow);
                this.workflowInstance = workflowRuntime.CreateWorkflow(type, properties);
                this.workflowInstance.Start();

    finally,u can download the completed solution here

  • 相关阅读:
    【Luogu】P3369 【模板】普通平衡树(树状数组)
    文艺平衡树 lg3391(splay维护区间入门)
    普通平衡树 lg3369
    noip2018游记
    webview与壳交互的几种方式
    iOS、Android 之类的如何调试 Web APP
    box-sizing属性
    Hybridapp /webapp调试工具
    DOS 批处理高级教程精选合编
    瀑布流Masonry学习
  • 原文地址:https://www.cnblogs.com/jjhe369/p/3535826.html
Copyright © 2011-2022 走看看