- Microsoft Windows Workflow Foundation 4.0 Cookbook
- Andrew Zhu
- 313字
- 2021-04-13 17:00:34
In this task we will create our first workflow to print "Hello Workflow" to the console application.
- Create a Workflow Console Application project:
After starting Visual Studio 2010, select File | New Project. A dialog is presented, as shown in the following screenshot. Under the Visual C# section, select Workflow, and choose Workflow Console Application. Name the project
HelloWorkflow
. Name the solutionChapter01
and make sure to create a directory for the solution. - Author the workflow program:
First, drag a
Sequence
activity to the designer from Toolbox, next drag a WriteLine activity into the Sequence activity. Finally, input "Hello Workflow" in the expression box of theWriteLine
activity. We can see in the following screenshot: - Run it:
Press Ctrl+F5 to run the project without debugging. The result is as shown in the following screenshot:
When we press Ctrl+F5, Visual Studio saves the current project, and then it runs the project from the Main
method in the Program.cs
file.
WorkflowInvoker.Invoke(new Workflow1());
The preceding statement starts the workflow. After the workflow starts running, the WriteLine
activity prints the "Hello Workflow" to the Console Application.
The workflow we created in WF Designer is actually an XML file. We can open Workflow1.xaml
with an XML editor to check it.
All XAML files will be compiled to .dll
or .exe
files. That is why when we press Ctrl+F5, the program just runs like a normal C# program.
- Oracle SOA Suite Developer's Guide
- Photoshop CS5平面設(shè)計(jì)入門與提高
- Procreate繪畫創(chuàng)作從入門到精通
- 微信小程序開發(fā)入門與實(shí)踐
- Dreamweaver CC實(shí)例教程(第5版·微課版)
- SolidWorks 2018快速入門及應(yīng)用技巧
- 邊做邊學(xué):Photoshop CS6數(shù)碼藝術(shù)照片后期處理教程
- Midjourney商業(yè)設(shè)計(jì)完全教程
- Vue.js實(shí)戰(zhàn)
- Building Websites with XOOPS : A step/by/step tutorial
- Mastercam 2019 完全自學(xué)寶典
- Science Teaching with Moodle 2.0
- Photoshop CS6圖像處理立體化教程
- AutoCAD 2016從入門到精通
- Building Websites with Mambo