FREE BOOK

Chapter 1: Workflow Program

Posted by Packt Publishing Free Book | WF October 15, 2010
In this chapter we will see how to create WF program with different methods.
Download Files:
 

In this chapter, we will cover:

  • Creating the first WF program: HelloWorkflow
  • Creating a WF program using C# code
  • Initializing a WF program using InArguments
  • Creating a WF program using OutArgument
  • Creating a WF Program using InOutArgument
  • Using Variable in a WF program
  • Running a WF program asynchronously
  • Customizing a MyReadLine activity with Bookmark
  • Converting a WF program instance to XAML
  • Loading up a WF program from an XAML file
  • Testing a WF program with a unit test framework
  • Debugging a WF program

Introduction

Considering Workflow programs as imperative programs, we need to think of three fundamental things:

  • How to define Workflow programs
  • How to build (compile) Workflow programs
  • How to execute Workflow programs

Workflow Program

In WF4, we can define a Workflow in either managed .NET code or in XAML. There are two kinds of code Workflow authoring styles:

  • Creating a Custom Activity class
  • Creating Workflow dynamically in the runtime

There are also two ways to author Workflow in XAML:

  • By WF designer (recommended)
  • Typing XML tags manually

Essentially, a Workflow program is a .NET program, no matter how we create it.

After defining Workflows, we can build Workflow applications as we build normal .NET applications.

When it comes to Workflow execution, we need to consider three basic things:

  • How to flow data into and out of a Workflow
  • How to store temporary data when a Workflow is executing
  • How to manipulate data in a Workflow

This chapter is going to focus on answering these questions.

Before moving ahead, make sure we have the following installed on our computer:

  • Windows Vista/7 or Windows Server 2008
  • Visual Studio 2010 and .NET framework 4.0

We can also use Windows XP; however, its usage is not recommended.

Total Pages : 13 12345
COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.