Chapter 2. Built-in Flow Control Activities

In this chapter we will cover:

  • Using the Foreach Activity
  • A number guessing game in Sequence
  • A number guessing game in a flowchart
  • Using the InvokeMethod activity
  • Using the Switch<T> activity in Sequence workflows
  • Using the FlowSwitch<T> activity
  • Using the Parallel activity
  • Using ParallelForEach<T> activity
  • Using the Pick activity
  • Handling errors

Introduction

The Flow is the center of workflow itself, and how to control the Flow is what we will see in this chapter. WF is a lot like an imperative programming language such as C# when it comes to flow control; we have many similar concepts in WF4 such as "if-else", "foreach", "switch", "try-catch", and so on. Additionally, there are some other flow control activities ...

Get Microsoft Windows Workflow Foundation 4.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.