Sunday, May 31, 2009

WF 4.0 New Activities Tour.

In Windows Workflow 4.0 we see lot of new activities image. i just wanted to show you how to use them in series of Blog post.

ForEach /ForEach<T>:

ForEach activity contains a list of Values and a Body. At runtime, the list is iterated and the body is executed for each value in the list.

image

I created the variable called names as a array of string  with the following default values as shown below.

image 

using ForEach activity i loop through the names.

image 

Sequence :

The Sequence activity allows for the execution of one or more Activities in order.  in the above example  inside the Sequence Activity i placed ForEach and WriteLine activities .

image

Assign :

The Assign activity assigns the value of its Value argument to its To argument. The types of both arguments must be compatible. This compatibility is verified at runtime. 

Create a counter variable use assign activity to increment the value . 

image

IF :

The If activity selects a child activity for execution based on the value of a Boolean expression.

If the Boolean expression Condition yields True  “Then” activity is executed. If the expressions yields False  “Else” expression is executed.

image

 

While:

The While activity executes it's Body while a Boolean Condition is True.

image

Nandri(Thanks)

SeenivasaRagavan

No comments: