.NET Framework 2.0
VS.Net 2005
Windows Workflow Foundation Beta 2_2(EN)
本实例运行测试在beta2.2(en)版本下:
1、新建一个项目,选择workflow 下的workflow console application 项目模板。
创建项目后,接下来你就看到一个SequentialWorkflow类型的流程设计界面
项目中有一个Program.cs文件和Workflow1.cs文件,分别是应用程序文件和流程描述文件。
2、从工具栏中拖一个Code Activity到流程环节中
3、然后双击流程图中codeActivity1在后置代码中书写如下代码:
private void codeActivity1_ExecuteCode(object sender, EventArgs e)
{
Console.WriteLine("Hello WorkFlow");
}
{
Console.WriteLine("Hello WorkFlow");
}
4、然后运行该程序则会看到输出"Hello WorkFlow".很简单吧
本实例参考《Presenting Windows Workflow Foundation》