- 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.
- 突破平面Photoshop UI界面設計與制作剖析
- HTML5 Multimedia Development Cookbook
- AI繪畫教程:Midjourney關鍵詞靈感手冊
- UG NX 8.0基礎與實例教程
- Oracle VM Manager 2.1.2
- Authorware應用案例教程
- Illustrator 2024從入門到精通
- CMS Design Using PHP and jQuery
- Photoshop CS6案例教程(第3版)
- 中文版AutoCAD 2022從入門到精通
- CINEMA 4D新手快速進階實例教學
- Apache JMeter
- AutoCAD 2019中文版實戰(zhàn)從入門到精通
- Java EE 5 Development with NetBeans 6
- Linux Shell腳本攻略(第3版)