Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Windows Workflow Foundation : Get Started tutorial

leave a comment »

When I first saw the title WIndows Workflow Foundation, I thought that it is related to some workflow but what’s need for the workflow and how can we use it in practical scenario. By reading two or three article regarding workflow, I am posting the article regarding basic points about Workflow Foundation.

What’s the Workflow Foundation
In current .NET programming, we are just developing whole application as bunch of code. You write classes, methods, calling instance of those classes in the same order as per your requirement to achive the business goal. Generally you would use UML diagram or flow chart for starting of coding. Then you define each step and write all code by your self. Now, In your business logic, there are predefined workflows. In workflow, there are predefined activities which can be executed one after another or parallelly as per defined criteria.

This same thing is given in .NET 3.0’s Workflow foundation. Where you can define workflow and it’s activities in two possible way.

  • XAML : The use of XAML allows for workflows to be developed and modified in visual designers without requiring traditional C# or Visual Basic code.Pure XAML workflows have the advantage of being directly loadable at run time without a separate compilation step
  • By using C# or Visual basic code.

Activities can be thought of as little blocks of active code that are invoked by the workflow runtime when it is a given activity’s turn to run

Now, When you start making Workflow in the Visual Studio, you are given some predefined workflow project. We will talk about Sequencial workflow project.

Sequencial Workflow

Suppose, You are developing application for Customer Shopping Cart. In that there are “retrieve customer data,” “check account status,” “compute discount based on subscription level” and “process trade” may be activities that you identify as part of a flowchart representing a sequential processing workflow

Now, you have activities. You can make the activity classes derived from Sequencial Activity class. Now, in that activity class you take the input data and output the data for the next activity. This way you program the required activities and join them as per your requirement in the Workflow using XAML. In this scenario, you can also use the conditions to define working of your activities.

This is just a theoritical information to get you started with the workflow. You can make any example as per your requirement. You can use following links to get more from this:

http://www.theserverside.net/tt/articles/showartic…
http://msdn.microsoft.com/msdnmag/issues/06/01/Win…
http://community.bartdesmet.net/blogs/bart/archive…

Advertisements

Written by Manish

March 2, 2007 at 5:37 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: