Suchen und Finden
Contents at a Glance
5
Contents
6
About the Author
20
About the Technical Reviewers
21
Acknowledgments
22
Introduction
23
Who Should Read This Book
23
An Overview of This Book
24
What You Need to Use This Book
27
Obtaining This Book’s Source Code
27
How to Reach Me
27
A Quick Tour of Windows Workflow Foundation
28
Why Workflow?
28
Your Development Environment
30
Hello Workflow
31
Passing Parameters
39
Making Decisions
42
Summary
55
Foundation Overview
56
Workflow Types
56
Foundation Deliverables
59
Runtime Environment
62
Design-Time Environment
73
Summary
90
Activities
91
Understanding Activities
91
Exploring Standard Activities
93
Standard Activities Summary
103
Adding Workflow Logic
104
Using the CodeActivity
105
Developing Custom Activities
119
Enhancing the Design Experience
140
Summary
154
Hosting the Workflow Runtime
155
Overview of Hosting
155
Simple Workflow Hosting
156
Improved Workflow Hosting
163
Controlling a Workflow Instance
185
Synchronous Workflow Execution
188
Summary
191
Flow Control
192
Condition Types
192
Using the IfElseActivity
193
Using the WhileActivity
205
Using the ParallelActivity
211
Using the ReplicatorActivity
219
Using the ConditionedActivityGroup
231
Using the InvokeWorkflowActivity
237
Using the TerminateActivity
238
Using the SuspendActivity
239
Summary
239
Local Services
240
Understanding Local Services
240
Implementing and Using a Local Service
242
Loading from App. config
250
Using a Custom Activity
252
Using the CallExternalMethodActivity
257
Summary
260
Event-Driven Activities
261
Using Event-Driven Activities
261
Using the HandleExternalEventActivity
263
Generating Communication Activities
280
Manually Controlling Correlation
282
Using the EventHandlingScopeActivity
291
Developing Custom Event- Driven Activities
302
Summary
320
Workflow Persistence
321
Understanding Persistence
321
Using the SqlWorkflowPersistenceService
324
Implementing a Custom Persistence Service
343
Summary
355
State Machine Workflows
356
Understanding State Machine Workflows
356
Implementing a State Machine Workflow
361
Eliminating Duplicate Event Handlers
383
Identifying Available Events
385
Accessing Runtime Information
388
Summary
391
Transactions and Compensation
392
Understanding Transactions
392
Using the TransactionScopeActivity
395
Understanding Compensation
410
Using Compensatable Activities
412
Participating in a Batch of Work
432
Using the IPendingWork Interface
432
Summary
439
Workflow Rules
440
Understanding Workflow Rules
440
Using Rules in WF
442
Defining Rules with a PolicyActivity
450
Tracing Rules
462
Adjusting Rule Sequence
464
Using Methods Within Rules
467
Executing a RuleSet in Code
470
Constructing a RuleSet in Code
473
Summary
477
Exception and Error Handling
479
Understanding Workflow Exception Handling
479
Reviewing Default Behavior
482
Using FaultHandlerActivity
486
Containing the Exception
491
Rethrowing an Exception
493
Compensation and Exceptions
495
Using CancellationHandlerActivity
500
Summary
503
Advanced Custom Activities
504
Developing a Fit- for- Purpose Composite Activity
504
Developing a General- Purpose Composite Activity
510
Developing a Priority Sequence Activity
520
Developing Long- Running Activities
528
Summary
538
Dynamic Workflow Updates
539
Understanding Dynamic Updates
539
Applying Updates from the Host Application
542
Restricting Dynamic Updates
551
Applying Updates from Within a Workflow
552
Updating a Rule Condition
558
Replacing a Rule Definition
564
Summary
568
Workflow Tracking
569
Understanding Workflow Tracking
569
Using the SqlTrackingService
573
Creating User Track Points
588
Tracking Rules Evaluation
589
Extracting Data with a Custom Tracking Profile
592
Maintaining the SQL Tracking Database
602
Developing a Tracking Service
604
Summary
613
Web Services and ASP.NET
614
Publishing a Workflow As a Web Service
614
Developing a Web Service Workflow
617
Returning a Web Service Fault
624
Developing a Stateful Web Service
626
Invoking a Web Service from a Workflow
631
Using Workflows from ASP. NET
637
Summary
643
Workflow Services and WCF Integration
644
Understanding WCF
644
Understanding Workflow Services
647
Developing a Stateless Workflow Service
653
Hosting in IIS and Developing a Client
659
Self- hosting the Workflow Service
665
Defining a Workflow-First Service
669
Developing a Stateful Workflow Service
671
Using SendActivity
681
Context and Conversations
687
Summary
711
Workflow Serialization and Markup
712
Understanding Workflow Authoring Modes
712
Developing a Code- Only Workflow
717
Developing a Code- Separation Workflow
722
Developing a No- Code Workflow
724
Using Rules with a No- Code Workflow
731
Serializing to Markup
734
Compiling a Workflow
738
Compiling a Workflow with Rules
741
Compiling from the Command Line
744
Deserializing Markup
745
Summary
749
Hosting the Workflow Designers
750
Understanding the Workflow Designers
750
Building a Designer Application
753
Using the Designer
806
Summary
811
Index
812
Alle Preise verstehen sich inklusive der gesetzlichen MwSt.