Sams Teach Yourself Windows Workflow Foundation in 24 Hours (Sams Teach Yourself Series)

( 6 )

Overview

In just 24 sessions of about an hour, you’ll learn how to build robust, efficient business workflows with Windows Workflow Foundation (WF). Using a straightforward, step-by-step approach, each lesson builds the real-world foundation you need to succeed with WF from the ground up.

Filled with hands-on code examples, this book walks you through creating every type of workflow supported by .NET 3.5’s powerful new version of WF. One step at a time, you’ll discover how to host ...

See more details below
Other sellers (Paperback)
  • All (18) from $1.99   
  • New (8) from $19.23   
  • Used (10) from $1.99   
Sams Teach Yourself Windows Workflow Foundation (WF) in 24 Hours

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac

Want a NOOK? Explore Now

NOOK Book (eBook)
$15.49
BN.com price
(Save 44%)$27.99 List Price

Overview

In just 24 sessions of about an hour, you’ll learn how to build robust, efficient business workflows with Windows Workflow Foundation (WF). Using a straightforward, step-by-step approach, each lesson builds the real-world foundation you need to succeed with WF from the ground up.

Filled with hands-on code examples, this book walks you through creating every type of workflow supported by .NET 3.5’s powerful new version of WF. One step at a time, you’ll discover how to host workflows, manage workflow lifecycles, integrate with Web services and WCF applications, create custom activities, and moreeverything you’ll need to solve real-world problems with WF!

Step-by-step instructions carefully walk you through the most common WF questions, issues, and tasks.

Q&As help you build and test your knowledge.

Notes point out shortcuts, solutions, and potential problems to avoid.

New terms are clearly defined and explained.

Learn how to...

  • Understand the value of workflows and their role in general .NET and advanced business process management systems
  • Run workflows from and exchange data with .NET applications
  • Create sequential, state-machine, and data-driven workflows
  • Define multi-level approval workflows that execute in parallel and escalate
  • Develop rulesets and manage them from SQL databases
  • Track your workflows to make them more agile and governable
  • Use Dynamic Update to change running workflows
  • Work with exceptions, compensation, and transactions
  • Expose workflows as Windows Communication Foundation (WCF) services and call Web services from workflows via WCF
  • Expose workflows as Web services and call Web services from workflows
  • Create basic, queued, event-driven, and composite custom activities
Read More Show Less

Product Details

  • ISBN-13: 9780321486998
  • Publisher: Sams
  • Publication date: 1/13/2009
  • Series: Sams Teach Yourself Series
  • Pages: 624
  • Product dimensions: 6.90 (w) x 9.00 (h) x 1.40 (d)

Meet the Author

Robert Eisenberg, principal, RE Associates, has more than twenty years of application development, consulting training, and management experience. Robert is currently an analyst and consultant specializing in WF, WCF, SharePoint, SOA, BizTalk, and Oslo. Robert’s past experience includes the following: CEO and CTO, U.S. operations of the largest Internet professional services firm in Europe; acting director of enterprise systems at a publicly traded manufacturing company, where he architected and implemented all key business systems; founder and president of a software services company that installed and customized midmarket ERP solutions and created custom systems for Fortune 500 and midsize corporations. Clients included SBC, Ameritech, the Federal Reserve Bank, US West, and Cushman & Wakefield. Robert writes articles and frequently speaks about the topics he consults on at CodeCamp, Integration Journal, and Intelligent Enterprise Magazine.

Read More Show Less

Table of Contents

Introduction 1

Book Target Audience 2

How This Book Is Organized 2

Hour Summary 3

Part I The Basics

HOUR 1 Understanding Windows Workflow Foundation 9

Describing Workflow and Workflow Systems 9

A Conceptual Description of Workflow 9

A Sample Expense Report Workflow 10

Workflow Segmentations 12

What Is a Business Process Management System? 13

.NET Framework 3.0 and 3.5 13

Overview of WF 14

Standard Modeling Activities 16

Multiple Workflow Styles 19

Hosting 23

Tracking 24

Rule Capabilities 26

Conditional Rules 26

RuleSets 27

Custom Activities 29

Reason for Custom Activities 29

Types of Custom Activities 30

XAML Workflows and Serialization 33

Dynamic Update 34

WF and WCF 36

WF and WCF: Conceptual Overview 36

WF and WCF: Integration Specifics 37

SharePoint Workflow 38

SharePoint Workflow Overview 38

SharePoint Workflow Visual Studio 40

SharePoint Workflow SharePoint Designer 40

Designer Rehosting and External Modeling 41

Summary 43

Installation Instructions 44

Visual Studio 2005 and .NET Framework 3.0 Installation Directions 44

Visual Studio 2008 and .NET Framework 3.5 Installation Requirements/Directions 45

HOUR 2 A Spin Around Windows Workflow Foundation 47

Creating a Basic Workflow 47

Creating a Workflow Project 47

Building and Running a Workflow 49

Enhancing the Workflow 53

Improving Workflow Transparency 57

Passing Parameters to the Workflow 58

Using Declarative Rules 60

Adding New Activities 60

Creating the Declarative Rule 61

Examining the Project Files 63

Creating a XAML + Code Workflow 64

Adding and Configuring Activities 64

Examining the XAML Workflow 65

Running the XAML + Code Workflow 66

Creating a XAML-Only Workflow 66

Modeling and Preparing the XAML-Only Workflow for Execution 67

Call XAML-Only Workflow from Host 68

Summary 69

Workshop 69

Quiz 69

Answers 70

HOUR 3 Learning Basic Hosting 71

Overview of Hosting 72

Building a Host from Scratch 72

Creating Solution and Projects 73

Create a Simple Workflow 75

Creating the Host 75

Adding the Persistence Service 80

Adding Monitoring Events 83

Creating the Persistence and Tracking Databases 85

Running the Workflow 86

Updating the Host via Configuration 87

Summary 89

Workshop 90

Quiz 90

Answers 90

HOUR 4 Learning Host-Workflow Data Exchange 91

Host-Workflow Data Exchange 91

Creating the Solution and Projects 93

Creating the Solution 94

Creating the Local Service Project 94

Creating the Workflow Project 95

Creating the Windows Forms Project 95

Step 1: Creating the Local Service Interface 96

Step 2: Creating the Payload (EventArgs) Class 97

Step 3: Creating the Workflow 99

Adding the DependencyProperty Type 99

Step 3A: Creating a HandleExternalMethod Activity 101

Handle External Event Activity Property Window 102

Adding an IfElse Activity and Rules 103

Adding CallExternalMethod Activities 103

Creating the Windows Forms Host 108

Adding Controls to the Form 109

Adding the WF Runtime to the Form/Host 109

Step 4A: Creating the Workflow Instance and Raising the Initial Event 112

Step 4B: Implementing the Local Service 113

Building and Running the Project 116

Summary 116

Workshop 117

Quiz 117

Answers 118

HOUR 5 Creating an Escalation Workflow 119

Updating the Local Services 120

Updating the Basic Local Service Interface 120

Creating the Escalation Local Service 121

Extending the Workflow 122

Adding the Activities 122

Configuring CheckCredit’s Activities 125

Updating the Workflow Code-Beside File 127

Update the Forms (Hosts) 128

Implement New Interface Members in the Escalation Form 128

Implement the MoreInfo Method in the Basic Order Form 129

Configure Hosts to Track and Persist 130

Add Tracking to Basic and Escalation Forms 130

Add Persistence to Both Forms 131

Retrieve Tracking Data 132

Retrieve the Workflow from Persistence 135

Running the Solution 137

First-Level Approval or Rejection 137

Second-Level Approval or Rejection 138

Second Level Approval and Tracking 139

Running the WorkflowMonitor SDK Sample 141

Downloading and Installing WorkflowMonitor 141

Summary 143

Workshop 144

Quiz 144

Answers 144

Part II State Machined Workflows and Advanced Control Flow Activities

HOUR 6 Creating Basic State Machine Workflows 147

Explaining State Machine Workflows 147

Investigating State Machine Workflow Components 149

Creating the Project 150

Creating the Workflow 150

Preparatory Work 151

Adding State and EventDriven Activities 151

Updating the EventDriven Activities 153

Running the Basic Workflow 159

Hierarchical States and State Introspection 159

Modifying the Workflow 160

StateMachineWorkflowInstance and State Introspection 165

Run the Enhanced State Machine Workflow 165

Summary 166

Workshop 166

Quiz 166

Answers 167

HOUR 7 Creating Advanced State Machine Workflows 169

Updating the Form and Adding Member Variables 170

Updating the Form Code-Behind Logic to Work with StateMachineWorkflowInstance Members 170

Extract “In Scope” Events 171

SetState Combo Box 174

Historical States 175

Possible State Transitions 176

Override the Current State 176

Update the UI When Workflow Idles 177

Update the UI when Workflow Completes 177

Update the UI When Workflow Terminates 178

Running the Workflow 178

Summary 180

Workshop 180

Quiz 180

Answers 180

HOUR 8 Working with Parallel Activities and Correlation 181

Creating the Solution and First Project 181

Create the Parallel Activity Tester Project 182

Creating the Workflow 182

Standard Parallel Activity Execution 182

Running the Parallel Workflow 183

Synchronized Parallel Execution 185

Parallel Approval and Correlation 187

Opening the Solution and Adding the Projects 188

Local Service with Correlation 188

Create the Event Payload (EventArgs) 190

Concurrent Approver Workflow 191

Summary 200

Workshop 201

Quiz 201

Answers 201

HOUR 9 Working with the Replicator and While Activities 203

Creating Solutions and Projects 204

Creating the Replicator Workflow 204

Adding Member Variables to the Workflow 204

Placing the Activities on the Workflow 205

Configuring the Activities 206

Updating the Host Form 210

Running the Replicator Sequentially 212

Using the While Activity for Sequential Processing 213

Modeling the Workflow 213

Adding Code-Beside for the While Activity 213

Updating the Replicator Workflow to Run in Parallel 215

Adding Parallel Support to the Replicator 215

Running the Parallel Replicator 216

Summary 217

Workshop 217

Quiz 217

Answers 218

HOUR 10 Working with EventHandlingScope and Strongly Typed Activities 219

Learning Basic EventHandlingScope Activity Solution and Project Setup 220

Creating the Basic EventHandlingScope Workflow 220

Placing the Activities on the EventHandlingScope Sequential Section 220

Placing the Activities on the EventHandlingScope Event Handlers Section 221

Configuring the Event Handling Scope Sequential Activities 223

Configuring the EventHandlingScope Event Handling Activities 224

Running the Basic EventHandlingScope Workflow 225

Looking at the EventHandlingScope Activity in XAML 225

Creating a More Advanced EventHandlingScope Workflow 226

Setting up the Advanced EventHandlingScope Activity Solution 226

Add the Activities to the Workflow 227

Running the Advanced EventHandlingScope Workflow 232

Using WCA.exe to Build the Strongly Typed Activities 233

Use Strongly Typed Activities on a Workflow 234

Summary 237

Workshop 238

Quiz 238

Answers 238

Part III Data-Driven Workflows and Rules

HOUR 11 Creating Data-Driven Workflows 241

Describing the CAG 241

Exploring the CAG and Data-Driven Workflows 243

CAG Approval Sample 243

Creating the Project 244

Adding Variable Declarations 244

Add the CAG to the Workflow 245

Configuring the Approver1Lane of the CAG 246

Configuring the Approver2Lane of the CAG 249

Running the Workflow with Two Lanes 251

Configuring the Approver3Lane of the CAG 252

Run the Workflow with Three Lanes 254

Summary 254

Workshop 255

Quiz 255

Answers 255

HOUR 12 Working with the WF RuleSet 257

Creating the RuleSet 258

RuleSet Terminology and Project Ruleset 258

Creating the Project 260

Creating the RuleSet via the Policy Activity 260

Monitoring the RuleSet 264

Adding RuleSet Tracing 265

Evaluating Pre-Execution Results 265

Evaluating Post-Execution Results 267

Calling Methods from Rules 267

Attributing Methods to Detect Dependency 269

Using the External RuleSet Application 271

Downloading the External RuleSet Application 271

Running the Sample Workflow 272

Uploading Rules to the External Database 273

Adding the Custom Policy Activity to the Toolbox 275

Preparing the Workflow to Use External Rules 275

Configuring the Workflow to Use External Rules 276

Running the Workflow with External Rules 277

Summary 278

Workshop 278

Quiz 278

Answers 279

Part IV Intermediate and Advanced Features

HOUR 13 Learning to Track Workflows 283

Tracking Architecture 284

Tracking and Business Activity Monitoring 285

TrackingProfileDesigner SDK Sample 286

Reviewing the TrackingSolution 286

Opening the TrackingProfileDesigner and Loading a Workflow 288

Tracking Workflow Level Events 289

Tracking Activity Level Executed and Completed Events 290

Uploading and Examining the Profile and Running the Workflow 292

Additional Tracking Functionality 294

Manually Updating Tracking Profile and UserTrackingRecords 298

Adding User Tracking Data 299

Retrieving and Saving the TrackingProfile to a File 299

Manually Modifying and Uploading a Tracking Profile 300

Workshop 304

Quiz 304

Answers 305

HOUR 14 Working with Roles 307

Explaining Roles 307

Describing the Role Solution 308

Setting up an ASP.NET Role Provider 308

Updating the Host 311

Updating the Workflow 312

Adding Level2Role Support 315

Adding Level2Role Support to the Workflow 315

Adding Level2Role Support to the Code-Beside 315

Running the Solution with Level 2 Support 316

Summary 317

Workshop 317

Quiz 317

Answers 317

HOUR 15 Working with Dynamic Update 319

Applying Dynamic Update: Outside and Inside 320

Applying Dynamic Update from the Inside 321

Applying Dynamic Update from the Outside Unplanned 324

Explaining Dynamic Update from the Outside Planned 326

Updating Rules Dynamically 327

Selecting Which Version to Run 329

Changing Declarative Rule Conditions with Dynamic Update 329

Changing a RuleSet Rule via the CodeDom 332

Dynamic Update: Exploring Workflow Changes Sample 337

Summary 340

Workshop 341

Quiz 341

Answers 341

HOUR 16 Working with Exceptions, Compensation, and Transactions 343

Creating the Project 344

Basic Exception Handling 344

Modeling the ExceptionWorkflow 345

Adding a Workflow-Level FaultHandlers Activity 345

Handling the Exception 348

Configuring Visual Studio Debugger to Not Trap CLR Exceptions 349

Hierarchical Exception Handling and the Throw Activity 350

Updating the Exception Workflow 350

Catching Exceptions in the IfElse Activity 351

Handling Exceptions in the IfElse Activity 352

Use the Throw Activity 353

Reconfiguring the Throw Activity 353

Activity Handlers Elements and Views 354

Cancellation Handlers 355

Performing Preliminary Setup 355

Modeling the CancellationWorkflow 356

Adding the Cancellation Handler 356

Compensation Overview 357

Performing Preliminary Setup 358

Registering the SQL Persistence Service 358

Modeling the CompensationWorkflow 359

Adding the Compensation Handler 359

Adding a FaultHandlers Activity to the Workflow and Rerunning the Workflow 361

Adding a Compensate Activity to the Fault Handler 361

Moving the Throw Activity into the CompensatableSequence Activity 362

Transactions 363

Performing Preliminary Setup 363

Model and Configure the TransactionWorkflow 364

Running the SQL Script to Create the TestTransaction Database 365

Running the Workflow 365

Summary 366

Workshop 367

Quiz 367

Answers 368

HOUR 17 Learning Advanced Hosting 369

Exploring WorkflowRuntime Events 370

Workflow Events Sample Application 371

Running the AdvancedHostingForms Project 372

Runtime Services 375

Loading Service 377

Workflow Queuing Service 378

Building the Scheduling Service Project 379

Modeling and Configuring the Workflow 379

Updating the Host to Run Three Workflows 380

Running the Workflow with the DefaultWorkflowScheduler Service 381

Updating the Host to Use the ManualWorkflowSchedulerService 381

Running the Workflow with the ManualWorkflowSchedulerService 382

Modifying the Workflow to Use Delay Activities 383

InvokeWorkflow Activity 384

InvokeWorkflow Project: Host Prematurely Exits 385

InvokeWorkflow Project: Host Waits 387

InvokeWorkflow Project: Synchronous Calls and Parameters 387

Summary 394

Workshop 394

Quiz 394

Answers 395

HOUR 18 Working with Web Services and ASP.NET Hosting 397

Creating the Solution and Projects 398

Creating a Workflow and Publishing It as a Web Service 398

Creating Dependency Properties 398

Modeling and Publishing the Workflow 399

Creating the Interface to Produce the WSDL 399

Configure the WebServiceInput Activity 400

Configuring the IfElse Activity 401

Configuring the WebServiceOutput Activity 402

Publishing the Workflow as a Web Service 403

Calling a Web Service from a Workflow 404

Creating Dependency Properties 404

Modeling the Workflow 404

Finishing Configuring the InvokeWebService Activity 405

Running the Basic Workflow Solution 406

Additional Workflow Topics 407

Working with SOAP Faults 407

Exploring Generated Project and Cookie Usage 410

Exploring the WebServiceInvokeActivity.WebServiceProxy Property 412

Learning ASP.NET Hosting 413

Opening the Existing Solution and Creating the ASP.NET Project 413

Instantiating the WorkflowRuntime 414

Creating the ASP.NET Web Form 415

Starting the Workflow Instance 416

Running the ASP.Net Hosted Workflow 418

Summary 418

Workshop 418

Quiz 418

Answers 419

HOUR 19 Learning WF-WCF Integration 421

Overview of Windows Communication Foundation 421

WF and WCF Overview 422

Hosting a Workflow in WCF Using Existing Interface and Receive Activity 424

Creating the Solution and Projects 425

ABCs of WCF and WF Specific Bindings 426

Exploring the ContractsAndWorkflows Project and Bindings 427

Creating the WCF Endpoint and Host 431

Creating the Console Application Client 434

Hosting a Workflow in WCF: Configuring Receive Activity and Updating Interface 437

Modifying the Interface 438

Configuring the Receive Activity 438

Rebuilding the Client 441

Accessing WorkflowRuntime from WorkflowServiceHost 442

Performing Preparatory Work 443

Retrieving the WorkflowRuntime 443

Running the Project 444

Connecting to a WCF Endpoint from WF 445

Updating the Workflow 445

Summary 448

Workshop 449

Quiz 449

Answers 449

Part V Custom Activities

HOUR 20 Creating Basic Custom Activities 453

Custom Activity Conceptual Overview 453

Improve on Out-of-the-Box Activities 454

Create Domain-Specific Activities 454

Custom Control Flow Patterns 454

Custom Activity Technical Overview 455

Basic Custom Activity Overview 456

Creating the Solution and Projects 456

Creating the Solution and Projects 457

Creating the Customer Custom Activity 457

Setting the Base Activity 457

Overriding the Execute Method 458

Adding the Custom Activity to a Workflow 459

Updating the Customer Activity to Receive Input 460

Updating the Customer Activity to Retrieve Information from a Database 462

Adding Existing Custom CreditCheck Activity 465

Adding Event Handlers to Activities 469

Creating Compound Activities 470

Creating and Modeling the Compound Activity 470

Configure the IfElse Activit 471

Configuring the CheckCredit Activity in the CompoundCreditCheck Activity 472

Configuring the Customer Activity in the CompoundCreditCheck Activity 472

Creating a New Sequential Workflow 473

Modeling the Workflow with the CompoundCreditCheck Activity 473

Activity Programming Model 475

Designer Components 475

Creating an Activity Designer Theme 476

ToolboxBitMap Class 478

Adding Graphic as Image and Associating Class 479

Adding the Activity to the Toolbox Across Projects 480

Creating the VSContent File 480

Creating the VSI file 480

Workshop 482

Quiz 482

Answers 482

HOUR 21 Creating Queued Activities 483

Exploring Activity Life Cycle Topics 484

WorkflowQueue 484

ActivityExecutionContext 485

Overview of Samples 486

Creating the Solution and Projects 486

Creating a Basic Custom Queued Activity 487

Performing Preliminary Custom Activity Setup 487

Override the Initialize Method 487

Override the Execute Method 489

Adding Code to the QueueItemAvailable Handler 490

Override the Uninitialize Method 492

Updating Host to Send Data to the Queue 492

Running the Workflow 493

Custom Activity Queued from Service 493

Creating the CustomerQueuedFromService Service 494

Creating the CustomerQueuedFromServiceActivity Custom Activity 498

Updating the Host to Use the New Service 503

Summary 504

Workshop 505

Quiz 505

Answers 505

HOUR 22 Creating Typed Queued and EventDriven-Enabled Activities 507

Creating a Custom Activity that Accesses a Typed Service 507

Preliminary Project Setup 508

Adding the CustomerEventArgs File 508

Modifying the CustomerQueuedFromTypedServiceActivity Custom Activity 09

Modifying the CustomerQueuedFromTypedService Service 510

Updating the Host to Use the Typed Service 513

Creating an EventDriven Activity 513

Creating the CustomerEventDrivenActivity Custom Activity 514

Workshop 522

Quiz 522

Answers 523

HOUR 23 Creating Control Flow Activities Session 1 525

Control Flow Activity Conceptual Overview 525

Creating the Solution and Projects 527

Creating the Control Flow Activity 527

Creating Nonexecuting Control Flow Activity 527

Adding Single Child Activity Execution 529

Executing All Child Activities 532

Designer Hierarchy Overview 535

Adding Parallel Execution Option 536

Adding Cancellation and Early Completion 542

Creating GeneralControlFlowBranch and Adding a Condition 545

Summary 549

Workshop 549

Quiz 549

Answers 549

HOUR 24 Creating Control Flow Activities Session 2 551

Enhancing the GeneralControlFlow Activity 551

Adding a Custom Designer 552

Adding ToolBoxItem 554

Adding Custom Validation 556

Adding Attached Properties and the ActivityCondition Type 561

Reviewing Activity Life Cycle Artifacts 568

Implementing Compensation 570

Summary 572

Workshop 572

Quiz 572

Answers 572

Index 575

Read More Show Less

Preface

INTRODUCTION

I have spent half of my career focused on business and the other half focused on software development. I am—through my business persona—driven by efficiency. Whereas software has led to tremendous efficiency gains, to say the least, it has also left tremendous room for improvement. Applications are hard to create, understand, and change. My quest for more efficient ways to create software led me to business process management a few years back. After watching the BPM and workflow industry for a couple of years, I was very excited when I learned of Windows Workflow Foundation (WF). After learning more about WF, I became more excited and decided to write this book.

I am convinced that we are entering a new phase of software development and that—on the Microsoft platform—WF lies at its core. Let’s look at the key benefits WF will drive:



•Simplified development and improved process comprehensibility are delivered because workflows are graphically created and therefore inherently self-evident.
•There is a built-in infrastructure to monitor running processes that supplies runtime transparency. The same graphical diagram that runs the workflow is used to illustrate its current step, previous executed steps, and potential completion paths.
•There is improved runtime flexibility because WF processes can be loaded at runtime from a database and executed without precompilation. Running processes can be changed. An individual running order, for instance, can have an additional approval step added to facilitate unexpected regulatory concerns.
•Simplified and powerful state management is provided.The workflow engine keeps track of the current process step, idles and persists as necessary, and restarts the workflow when appropriate. The workflow engine also allows for interrupting the prescribed process flow and skipping or redoing a step. For instance, it offers tools to transition an order to the earlier customer service step from the shipping step.
•Domain-specific languages can be created by adding a collection of custom activities (WF building blocks) and potentially a custom workflow designer as well.
•Cloud Service Infrastructure is provided. WF’s integration with WCF permits it to expose itself across the cloud and to access cloud services securely and reliably. When accessing multiple cloud services from a workflow, it becomes a cloud service composition platform.

The goal of this book is twofold: first, to explain what WF is, its value, and how and where its features fit into the product’s overall goal; second, it drills these concepts into you with pervasive hands-on labs. At the end of this book, you should be well-schooled in the “why” and the “how” of WF.

Book Target Audience

This book is targeted at all levels of .NET developers. It covers most aspects of WF. The labs walk you through the exercises step by step. It is appropriate for beginning .NET developers because of the step-by-step nature of the labs. It is appropriate for intermediate and advanced .NET developers because it covers a substantial amount of material that more advanced developers can take time to digest more thoroughly. All developers will also much better understand the “why” of WF. It is much more than a tool to use to create executable diagrams.

How This Book Is Organized

Each hour in this book, with the exception of Hour 1, is packed full of hands-on labs. When a new topic is introduced, it is first explained. The first time an item appears in a lab, you walk through each step and the item is explained in or near where it first appears. When the item appears again later in the hour or in a new hour, it is generally not re-explained. The lab, however, will almost always walk you through the steps to perform the task—although maybe in less detail. The reason I walk you through steps again (and sometimes again) is based on my own experience. I frequently am absorbed learning a new topic and do not want to divert the mental resources from learning the task at hand to remembering or looking up past topics. A contrary viewpoint is that not rewalking through the steps each time a topic reappears in a subsequent lab provides a better learning experience, because readers must learn how to perform the task on their own. This viewpoint is perfectly valid; when and if you want to take this approach, I recommend attempting to perform repetitive actions without reading step-by-step instructions.

Hour Summary

In Hour 1, “Understanding Windows Workflow Foundation,” a conceptual overview of workflow is provided first. Then WF, the product, is covered in whole. Finally, WF’s main components are covered individually.

In Hour 2, “A Spin Around Windows Workflow Foundation,” you learn how to build a basic sequential workflow by dragging and dropping activities (WF’s building blocks) onto the workflow designer. You also learn to create workflows declaratively using XAML.

In Hour 3, “Learning Basic Hosting,” you dig into hosting a workflow. WF workflows run in the process spaces of another application, referred to as a host. You learn to register events to interact with the host and to register runtime services to change the host’s behavior.

In Hour 4, “Learning Host-Workflow Data Exchange,” you learn how to send data from the host to the workflow and vice versa. Workflows send data to the host via synchronous methods, and hosts send data to the workflow via asynchronous events.

In Hour 5, “Creating an Escalation Workflow,” you learn how to create a workflow that is accessed by two different hosts, which is a very likely scenario. The first host invokes the workflow and allows approval or rejection to be specified. If the process requires further (managerial) approval, the workflow is accessed from the second host.

In Hour 6, “Creating Basic State Machine Workflows,” you learn how to create StateMachineWorkflows. StateMachineWorkflows hold a series of states that each contains a collection of valid events. They are the second most popular type of workflow style (behind sequential workflows).

In Hour 7, “Creating Advanced State Machine Workflows,” you learn how to interact with the state machine workflow using capabilities available only to state machine workflows. These include accessing the current state and overriding the current state to perform the skip and rework pattern.

In Hour 8, “Working with Parallel Activities and Correlation,” you learn to perform tasks concurrently. The workflow runtime handles the logistics of performing the tasks in parallel (or interleaved, as you learn in the hour). You then reconfigure the approval workflow to call for concurrent approval, which requires learning about correlation.

In Hour 9, “Working with the Replicator and While Activities,” you learn to use activities that perform a task n number of times, where n is specified at runtime. The Replicator—one of WF’s advanced control flow activities—can perform the tasks sequentially or in parallel and also features an early termination clause. The While activity is similar to the C# while statement.

In Hour 10, “Working with EventHandlingScope and Strongly Typed Activities,” you learn to use the EventHandlingScope activity that allows one or more events to be received throughout the lifetime of the workflow, such as cancellation and approver maintenance.

In Hour 11, “Creating Data-Driven Workflows,” you learn to use the ConditionedActivityGroup (CAG) activity. The CAG is another advanced control flow activity. It allows concurrent processing, like the Parallel activity, with a few additions. Most noteworthy, each branch has a When condition, and the CAG has an overall Until condition.

In Hour 12, “Working with the WF RuleSet,” you learn to use WF RuleSet technology and add-on products to access RuleSets from a database. RuleSets are a collection of rules that can be prioritized and configured to reevaluate in case a dependent rule changes. Each rule in a RuleSet has a Then and an optional Else action. The first is executed when the rule evaluates to true and the second when it evaluates to false. You then work with third-party add-ons that allow RuleSets to be stored and analyzed in a database and loaded at runtime.

In Hour 13, “Learning to Track Workflows,” you learn to monitor running workflows. First, the tracking architecture is covered. Then you learn to create custom tracking profiles to filter the information that is tracked. Then you learn to augment the extracted information with business information, such as the order number and order amount. This information is useful to produce more meaningful reports and create alerts when, for example, the order amount falls below a threshold amount.

In Hour 14, “Working with Roles,” you learn to control access to the workflow. Each incoming event can be wired to an Active Directory or ASP.NET role provider. Then only users existing in the role provider are permitted access.

In Hour 15, “Working with Dynamic Update,” you learn to modify running workflows. Activities can be added and removed, and declarative rules can be changed. Changing running workflows are one of WF’s primary capabilities. Using this capability in conjunction with WF’s tracking is particularly intriguing.

In Hour 16, “Working with Exceptions, Compensation, and Transactions,” you learn to trap and handle errors and to create transactions. Exceptions and transactions work similarly to the way they work in standard .NET. Compensation is a WF-only capability that is used to correct already completed work in WF.

In Hour 17, “Learning Advanced Hosting,” you learn to use most workflow events to control the workflow from the host, add additional capabilities to alter the workflow runtime, and invoke another workflow from a workflow. You will experiment with the suspended, aborted, and other events. You will add runtime services that control transactions, threading, and other functions. Finally, you learn to call a workflow from another workflow.

In Hour 18, “Working with Web Services and ASP.NET Hosting,” you learn to expose a workflow as a web service, call a web service from a workflow, and to run workflows from ASP.NET.

In Hour 19, “Learning WF-WCF Integration,” you learn to integrate WF with Windows Communication Foundation (WCF), Microsoft’s new distributed technology. WCF can expose WF workflows as services accessible in the cloud and can be used to call out to services from WF workflows. These two products appear to be merging into one unified application server.

In Hour 20, “Creating Basic Custom Activities,” you begin to create your own custom activities. In WF, you are not limited to the activities provided out-of-the-box. Custom activities are a major part of WF. Therefore, five hours are devoted to them. In this hour you will create Customer and CreditCheck activities that encapsulate this “domain” functionality in activities that can be placed on workflows just as can be done with the activities that ship with WF.

In Hour 21, “Creating Queued Activities,” you learn to create activities that execute in multiple bursts and to work with WF’s queuing system, which underlies all WF communication.

In Hour 22, “Creating Typed Queued and EventDriven-Enabled Activities,” you learn to strongly type the data accessed in queues and to create a special type of queued activity called an EventDriven activity.

In Hour 23, “Creating Control Flow Activities Session 1,” you learn to create activities that serve as placeholders for child activities and that schedule their child activities for execution. You can create your own control flow patterns that match the need of your domain. You can also implement general workflow patterns like those found at http://www.workflowpatterns.com.

In Hour 24, “Creating Control Flow Activities Session 2,” you also learn to implement compensation at the activity level. Then you implement activity validation. Finally, you learn to use attached properties that allow a property, such as a condition, to be passed down from a parent activity to a child activity.


© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Average Rating 4
( 6 )
Rating Distribution

5 Star

(3)

4 Star

(1)

3 Star

(0)

2 Star

(2)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 6 Customer Reviews
  • Anonymous

    Posted April 11, 2014

    MAP OF WHOLE FOODS

    Res 1- map <br> Res 2- rp <br> Res 3- bios <br> Res 4- rules!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 6, 2014

    Spottedfur

    Blazeclan moved to blcl res one

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 26, 2013

    Feildsong

    Fine im light blue with gold eyea.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 1, 2014

    Whisperfeather

    K...i can work with that =]

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted February 22, 2013

    Will

    Thiiiiis plaaace?

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted September 30, 2009

    Book is okay, but supporting code is incomplete

    The book is just okay for teach WF concepts. What bothers me is a lot of the code supplied on their web site is incomplete. The Tracking Service stuff will not run. Most importantly the ASP.Net (Hour 18) section is not included in the download. I realize mistakes will be made in a book, but not correcting these errors is stupid.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 6 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)