08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 9 ■ .<strong>NET</strong> 3.0: WINDOWS WORKFLOW FOUNDATION 223<br />

Figure 9-11. Running the parameterized workflow with age greater than 100<br />

Figure 9-12. Running the parameterized workflow with age less than 100<br />

Out-of-the-Box Activities<br />

If you followed along in the previous examples, you will have noticed that a variety of<br />

out-of-the-box activities were available to you. You used two of them—the Code activity<br />

<strong>and</strong> the IfElse activity. In addition to these, WF offers a few more:<br />

Compensate: This is an activity that you can use in case of an error, <strong>and</strong> is used with<br />

the FaultH<strong>and</strong>ler activity. You use the Compensate activity to undo actions that have<br />

already been performed, in a similar manner to a rollback in database transactions.<br />

ConditionedActivityGroup (CAG): You use a CAG to specify a group of activities where<br />

each one has its own criteria. When a condition for the group as a whole is met, execution<br />

passes out of the group.<br />

Delay: This activity allows you to put pauses of a specified duration into your<br />

workflow.<br />

EventDriven: This contains other activities to execute in response to an event firing.<br />

FaultH<strong>and</strong>ler: This allows you to h<strong>and</strong>le errors. When an error occurs, you can direct<br />

to a fault h<strong>and</strong>ler (like a Catch statement in code) <strong>and</strong> specify the actions to follow.<br />

Invoke<strong>Web</strong>Service: This is used to communicate with a web service via its proxy class.<br />

A proxy class can be generated by the IDE when you make a reference to a web<br />

service.<br />

Parallel: This allows you to specify multiple parallel routes of execution, <strong>and</strong> will not<br />

complete until all routes are complete.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!