+612 9045 4394
 
CHECKOUT
Pro WF : Windows Workflow in .NET 3.0 - Bruce Bukovics

Pro WF

Windows Workflow in .NET 3.0

Paperback Published: 1st February 2007
ISBN: 9781590597781
Number Of Pages: 744

Share This Book:
Ships in 5 to 9 business days

Other Available Editions (Hide)

  • Paperback View Product Published: 5th July 2010
    Ships in 5 to 9 business days
    $74.91
  • Paperback View Product Published: 1st August 2008
    Ships in 5 to 9 business days
    $72.59

I started working with the new Microsoft WinFX technology stack early in the beta and CTP (Community Technology Preview) stage. The foundations in WinFX (Windows Presentation, Windows Communication, and Windows Workflow) have now finally made their way into a shipping Microsoft product: .NET 3.0. I actually started to learn and use all three of these foundations at the same time in my day job. Talk about a massive learning curve. While I was impressed with the flexibility and capabilities of Windows Presentation Foundation and Windows Communication Foundation, I was somehow inexplicably drawn to Windows Workflow Foundation (WF). WF isn't just a new way to implement a user interface, or a new way to communicate between applications and services. WF represents a completely new way to develop applications. It is declarative, visual, and infinitely flexible. It promotes a model that cleanly separates what to do from when to do it. This separation allows you to change the workflow model (the when) without affecting the what. Business logic is implemented as a set of discrete, testable components that are assembled into workflows like building blocks. Workflow isn't a new concept. But when Microsoft spends years developing a workflow foun- tion and provides it to us without cost, it is an event worth noting. Other workflow frameworks exist, but WF will soon become the de facto standard workflow framework for Windows applications.

About the Authorp. xix
About the Technical Reviewerp. xxi
Acknowledgmentsp. xxiii
Introductionp. xxv
A Quick Tour of Windows Workflow Foundationp. 1
Why Workflow?p. 1
Workflows Are Differentp. 1
Why Windows Workflow Foundation?p. 2
Your Development Environmentp. 3
Hello Workflowp. 3
Creating the Workflow Projectp. 4
Introducing the Workflow Designerp. 5
Using Workflow Activitiesp. 6
Entering Codep. 7
Hosting the Workflow Runtimep. 9
Running the Applicationp. 11
Passing Parametersp. 11
Declaring the Propertiesp. 11
Passing Values at Runtimep. 12
Making Decisionsp. 14
Creating a Workflow Libraryp. 14
Adding Workflow Propertiesp. 15
Adding IfElse Activitiesp. 16
Adding Calculation Logicp. 19
Creating the Calculator Clientp. 22
Testing and Debugging the Calculatorp. 25
Summaryp. 28
Foundation Overviewp. 29
Workflow Typesp. 29
Sequential Workflowsp. 29
State Machine Workflowsp. 30
Choosing a Workflow Typep. 31
Foundation Deliverablesp. 32
Class Libraries and Frameworkp. 33
Runtime Enginep. 34
Runtime Servicesp. 34
Design Time Toolsp. 35
.NET 2.0 Runtimep. 35
Runtime Environmentp. 35
Application Host Processp. 36
Runtime Enginep. 37
Registered Core Servicesp. 39
Registered Local Servicesp. 42
Workflow Instancep. 44
Design Time Environmentp. 46
Workflow Authoring Modesp. 46
Project Templatesp. 48
Workflow Designerp. 48
Activity Designerp. 54
Rule Condition Editorp. 55
RuleSet Editorp. 57
Workflow Debuggerp. 61
Command-Line Workflow Compilerp. 62
Summaryp. 62
Activitiesp. 63
Understanding Activitiesp. 63
A Dual Audience for Activitiesp. 64
Class Hierarchyp. 64
Exploring Standard Activitiesp. 65
Custom Workflow Logicp. 66
Flow Controlp. 66
State Managementp. 68
Event Handlingp. 69
Local Service Communicationp. 70
Rulesp. 71
Web Servicesp. 71
Transactions, Compensation, and Synchronizationp. 72
Exceptions and Error Handlingp. 73
Standard Activities Summaryp. 74
Adding Workflow Logicp. 75
Using the CodeActivityp. 76
Creating the Projectp. 77
Defining the Workflow Parametersp. 77
Validating the Accountp. 81
Validating the Productp. 82
Entering the Orderp. 83
Running the Workflowp. 87
Evaluating the Approachp. 90
Developing Custom Activitiesp. 90
Why Custom Activities?p. 91
Designing for Two Audiencesp. 91
Creating the Projectp. 91
Implementing the Account Validation Activityp. 92
Implementing the Product Validation Activityp. 95
Implementing the Order Entry Activityp. 98
Defining the Workflow Parametersp. 101
Defining the Workflowp. 102
Running the Workflowp. 107
Evaluating the Approachp. 111
Enhancing the Design Experiencep. 111
Validating the Activityp. 112
Customizing Toolbox Behaviorp. 116
Customizing the Designerp. 120
Summaryp. 125
Hosting the Workflow Runtimep. 127
Overview of Hostingp. 127
Simple Workflow Hostingp. 128
Implementing a Test Workflowp. 128
Implementing a Simple Host Applicationp. 131
Improved Workflow Hostingp. 136
Implementing the Workflow Instance Wrapperp. 136
Implementing the Workflow Manager Classp. 139
Hosting with the Workflow Managerp. 147
Configuring the Runtime with App.Configp. 153
Controlling a Workflow Instancep. 158
Synchronous Workflow Executionp. 162
Summaryp. 165
Flow Controlp. 167
Condition Typesp. 167
Using the IfElseActivityp. 168
Using an IfElseActivity with Code Conditionsp. 169
Using an IfElseActivity with Rule Conditionsp. 176
Using the WhileActivityp. 180
Implementing the Workflowp. 180
Testing the Workflowp. 184
Using the ParallelActivityp. 186
Implementing the Workflowp. 186
Testing the Workflowp. 190
Adding a DelayActivityp. 192
Using the ReplicatorActivityp. 194
Implementing the Sequence Workflowp. 195
Testing the Sequence Workflowp. 199
Implementing the Parallel Workflowp. 200
Testing the Parallel Workflowp. 204
Using ReplicatorActivity Eventsp. 206
Interrupting Executionp. 206
Using the ConditionedActivityGroupp. 207
Implementing the Workflowp. 207
Testing the Workflowp. 211
Using the InvokeWorkflowActivityp. 213
Using the TerminateActivityp. 214
Using the SuspendActivityp. 214
Summaryp. 215
Local Servicesp. 217
Understanding Local Servicesp. 217
Implementing a Local Servicep. 218
Using a Local Servicep. 219
Implementing and Using a Local Servicep. 219
Implementing the Account Classp. 219
Declaring the Service Contractp. 220
Implementing the Local Service Classp. 221
Implementing the Workflowp. 223
Testing the Workflowp. 226
Loading from App.configp. 228
Using a Custom Activityp. 231
Implementing a Custom Activityp. 231
Modifying the Workflowp. 234
Testing the Workflowp. 235
Using the CallExternalMethodActivityp. 236
Implementing the Workflowp. 236
Testing the Workflowp. 238
Summaryp. 239
Event-Driven Activitiesp. 241
Using Event-Driven Activitiesp. 241
Using the HandleExternalEventActivityp. 243
Creating the Projectp. 244
Implementing the Event Arguments Classp. 244
Defining the Service Interfacep. 245
Implementing the Local Servicep. 246
Implementing the Workflowp. 248
Implementing the Host Applicationp. 255
Testing the Workflowp. 259
Generating Communication Activitiesp. 260
Generating the Activitiesp. 260
Modifying the Workflowp. 261
Manually Controlling Correlationp. 262
Implementing the Event Arguments Classp. 264
Defining the Service Interfacep. 265
Implementing the Local Servicep. 265
Implementing the Workflowp. 266
Testing the Workflowp. 269
Using the EventHandlingScopeActivityp. 271
Defining the Service Interfacep. 272
Implementing the Local Servicep. 272
Implementing the Workflowp. 274
Testing the Workflowp. 280
Summaryp. 283
Workflow Persistencep. 285
Understanding Persistencep. 285
Why Persist Workflows?p. 285
Persistence Overviewp. 286
Using the SqIWorkflowPersistenceServicep. 288
Preparing a Database for Persistencep. 289
Implementing the Local Servicep. 289
Implementing the Workflowp. 291
Implementing the Host Applicationp. 293
Testing the Applicationp. 304
Implementing a Custom Persistence Servicep. 308
Understanding the Abstract Methodsp. 308
Implementing the Servicep. 310
Testing the Custom Servicep. 317
Summaryp. 319
State Machine Workflowsp. 321
Understanding State Machine Workflowsp. 321
Why a State Machine Workflow?p. 322
State Machine Workflow Overviewp. 323
Implementing a State Machine Workflowp. 326
Designing the Car State Machinep. 326
Defining the Local Service Interfacep. 328
Implementing the Local Servicep. 329
Implementing the Workflowp. 332
Implementing the Host Applicationp. 340
Testing the Applicationp. 347
Eliminating Duplicate Event Handlersp. 349
Refactoring the CarWorkflowp. 349
Testing the Revised Workflowp. 350
Identifying Available Eventsp. 351
Interrogating the Workflow Queuesp. 351
Modifying the CarStateMachine Applicationp. 351
Testing the Applicationp. 354
Accessing Runtime Informationp. 354
Modifying the CarStateMachine Applicationp. 355
Testing the Applicationp. 356
Summaryp. 357
Transactions and Compensationp. 359
Understanding Transactionsp. 359
The Way of Transactionsp. 360
WF Support for Transactionsp. 360
Using the TransactionScopeActivityp. 362
Implementing the AccountAdjustmentActivityp. 365
Implementing the AccountTransferWorkflowp. 369
Testing the Workflowp. 372
Understanding Compensationp. 377
Using Compensatable Activitiesp. 379
Implementing the InventoryUpdateActivityp. 379
Implementing the OrderDetailActivityp. 383
Implementing the OrderEntryWorkflowp. 388
Testing the Workflowp. 395
Participating in a Batch of Workp. 398
Using the IPendingWork Interfacep. 399
Implementing the Local Servicep. 399
Implementing the BatchedWorkWorkflowp. 402
Testing the Workflowp. 403
Summaryp. 405
Workflow Rulesp. 407
Understanding Workflow Rulesp. 407
Parts of a Rulep. 408
Why Use Rules?p. 408
Using Rules in WFp. 409
Defining Rulesp. 409
Defining RuleSetsp. 412
Identifying Dependencies with Attributesp. 414
Defining Rules with a PolicyActivityp. 416
Implementing the SalesItem Classp. 416
Declaring the Rulesp. 417
Testing the Workflowp. 424
Tracing Rulesp. 428
Adjusting Rule Sequencep. 431
Setting the Rule Priorityp. 431
Testing the Workflowp. 432
Using Methods Within Rulesp. 434
Adding the Access Methodsp. 434
Using the Methods in the RuleSetp. 435
Identifying Indirect Relationshipsp. 436
Executing a RuleSet in Codep. 437
Implementing the SellItemSerializedWorkflowp. 437
Testing the Workflowp. 440
Constructing a RuleSet in Codep. 441
Implementing the SellitemInCodeWorkflowp. 441
Testing the Workflowp. 444
Summaryp. 445
Exception and Error Handlingp. 447
Understanding Workflow Exception Handlingp. 447
Reviewing Default Behaviorp. 450
Implementing the ExceptionWorkflowp. 450
Testing the Workflowp. 452
Using FaultHandlerActivityp. 454
Handling ArithmeticExceptionp. 454
Handling DivideByZeroExceptionp. 458
Containing the Exceptionp. 460
Rethrowing an Exceptionp. 462
Compensation and Exceptionsp. 463
Implementing the CompensateWorkflowp. 464
Test the Workflowp. 466
Using CancellationHandlerActivityp. 468
Implementing the CancelHandlerWorkflowp. 468
Testing the Workflowp. 471
Summaryp. 471
Dynamic Workflow Updatesp. 473
Understanding Dynamic Updatesp. 473
Why Use Dynamic Updates?p. 474
Applying Dynamic Updatesp. 474
Preventing Dynamic Updatesp. 476
Applying Updates from the Host Applicationp. 476
Implementing the DynamicWorkflowp. 476
Implementing a Custom Activityp. 478
Implementing the Host Applicationp. 480
Testing the Workflowp. 484
Restricting Dynamic Updatesp. 485
Applying Updates from Within a Workflowp. 486
Implementing the SelfUpdatingWorkflowp. 486
Implementing the Host Applicationp. 490
Testing the Workflowp. 491
Updating a Rule Conditionp. 492
Implementing the DynamicConditionWorkflowp. 492
Implementing the Host Applicationp. 494
Testing the Workflowp. 498
Replacing a Rule Definitionp. 498
Modifying the RuleDefinitionsp. 499
Modifying the Host Applicationp. 500
Testing the Revised Applicationp. 502
Summaryp. 502
Workflow Trackingp. 503
Understanding Workflow Trackingp. 503
Tracking Servicesp. 504
Tracking Event Typesp. 504
Custom Tracking Profilesp. 505
Using the Tracking Datap. 506
Benefiting from Workflow Trackingp. 506
Using the SqlTrackingServicep. 507
Preparing the Tracking SQL Databasep. 507
Developing a Test Workflowp. 508
Developing the Host Applicationp. 510
Executing the Host Applicationp. 512
Retrieving Tracking Datap. 513
Creating User Track Pointsp. 521
Enhancing the TrackingExampleWorkflowp. 522
Testing the Revised Workflowp. 523
Tracking Rules Evaluationp. 523
Implementing the TrackingRulesWorkflowp. 523
Testing the Workflowp. 525
Extracting Data with a Custom Tracking Profilep. 526
Working with Tracking Profilesp. 527
Implementing the TrackingProfileHelperp. 528
Creating the Tracking Profilep. 532
Testing the Tracking Profilep. 535
Maintaining the SQL Tracking Databasep. 536
Partitioningp. 536
Setting the Partition Intervalp. 536
Automatic or Manual Partitioningp. 536
Accessing Partitioned Datap. 537
Detaching or Dropping a Partitionp. 537
Developing a Tracking Servicep. 538
Implementing a Tracking Channelp. 538
Implementing a Tracking Servicep. 540
Testing the Custom Tracking Servicep. 544
Summaryp. 547
Web Services and ASP.NETp. 549
Publishing a Workflow As a Web Servicep. 549
Understanding the Web Service Activitiesp. 549
Publishing and Configurationp. 551
Developing a Web Service Workflowp. 552
Defining the Web Service Interfacep. 552
Defining the MathServiceWorkflowp. 552
Publishing the Workflowp. 555
Testing the Web Servicep. 557
Returning a Web Service Faultp. 560
Modifying the MathServiceWorkflowp. 560
Testing the Revised Web Servicep. 562
Developing a Stateful Web Servicep. 562
Defining the Web Service Interfacep. 563
Implementing the MathServiceStatefulWorkflowp. 563
Publishing the New Workflowp. 567
Testing the Web Servicep. 567
Invoking a Web Service from a Workflowp. 567
Implementing the InvokeWebServiceWorkflowp. 567
Testing the Workflowp. 571
Using Workflows from ASP.NETp. 573
Implementing the DivideNumberWorkflowp. 573
Implementing the UseWorkflowWebsitep. 574
Testing the Web Sitep. 578
Summaryp. 579
Workflow Serialization and Markupp. 581
Understanding Workflow Authoring Modesp. 581
Code-Only Authoring Modep. 581
Code-Separation Authoring Modep. 583
No-Code Authoring Modep. 584
Developing a Code-Only Workflowp. 586
Implementing the Workflowp. 586
Testing the Workflowp. 588
Reviewing the Generated Codep. 590
Developing a Code-Separation Workflowp. 592
Implementing the Workflowp. 592
Testing the Workflowp. 592
Reviewing the Markupp. 592
Developing a No-Code Workflowp. 594
Implementing the Base Workflow Classp. 594
Implementing the Custom Activityp. 595
Defining the Workflow Markupp. 596
Enhancing the WorkflowRuntimeManagerp. 597
Testing the Workflowp. 599
Using Rules with a No-Code Workflowp. 601
Defining the Rule Conditionp. 601
Modifying the Workflow Markupp. 603
Testing the Workflowp. 603
Serializing to Markupp. 604
Compiling a Workflowp. 608
Compiling a Workflow with Rulesp. 611
Compiling from the Command Linep. 614
Deserializing Markupp. 615
Summaryp. 619
Hosting the Workflow Designersp. 621
Understanding the Workflow Designersp. 621
Designer Namespacesp. 622
Designer Classesp. 622
Designer Servicesp. 623
Building a Designer Applicationp. 624
Creating the Designer Projectp. 625
Implementing WorkflowLoaderp. 626
Implementing WorkflowMenuServicep. 635
Implementing WorkflowEventBindingServicep. 639
Implementing EventPropertyDescriptorp. 643
Implementing WorkflowPropertyValueServicep. 648
Implementing WorkflowToolboxServicep. 650
Implementing WorkflowDesignerp. 661
Implementing MainFormp. 668
Implementing AssemblyReferenceFormp. 674
Implementing NewWorkflowFormp. 676
Using the Designerp. 679
Summaryp. 684
Indexp. 685
Table of Contents provided by Ingram. All Rights Reserved.

ISBN: 9781590597781
ISBN-10: 1590597788
Series: Expert's Voice in .NET
Audience: General
Format: Paperback
Language: English
Number Of Pages: 744
Published: 1st February 2007
Publisher: Apress
Country of Publication: US
Dimensions (cm): 23.5 x 17.8  x 3.66
Weight (kg): 1.36