- 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.
- 自己動手寫分布式搜索引擎
- 中文版3ds Max 2016/VRay效果圖制作實戰基礎教程
- AI繪畫教程:Midjourney關鍵詞靈感手冊
- Photoshop CS6 商業應用案例實戰
- Excel 數據處理與分析實例教程(第2版)
- 零基礎學后期:Photoshop+Lightroom數碼照片處理從新手到高手
- 平面設計綜合教程:Photoshop+Illustrator+CorelDRAW +InDesign(微課版)
- 我為PS狂 Photoshop照片處理一分鐘秘笈
- 高等院校電腦美術教材:CorelDRAW X7中文版基礎教程
- Choosing an Open Source CMS: Beginner's Guide
- 中文版Photoshop 2023從入門到精通
- Excel數據處理與分析:數據思維+分析方法+場景應用
- Building SOA/Based Composite Applications Using NetBeans IDE 6
- Building Enterprise Ready Telephony Systems with sipXecs 4.0
- VMware Virtual SAN實戰