images

images Symbols

[ ] square brackets, 58

images A

Abort method, 132, 138, 693

Aborted delegate, WorkflowApplication class and, 128

aborting activities, 693

aborting workflows, 849

AbortInstanceOnTransactionFailure property (TransactionScope activity), 540

Action delegate (C#), 127, 197

Action property (PickBranch activity), 105

activities, 2–44, 71110, 849. See also workflows

aborting, 693

activity definition vs. activity instance, 55

activity properties and, 634645

activity templates for, 683685

adding to Visual Studio Toolbox, 301

base classes and, 23, 76

cancelling, 564, 693

categories of work and, 47, 72

child. See child activities

collection-related, 195228

command-line calculator sample application illustrating. See command-line calculator (sample application)

composite, 74

creating, workflow designer and, 756

custom. See custom activities

data flow of, 99

declarative activity model and, 45

defined, 2

executing individually, 40

Hello Workflow sample application illustrating, 517

life cycle of, 55

metadata store for, 633, 640642

parent. See parent activities

procedural, 163194

standard. See standard activities

state and, 57

as synonymous with workflows, understanding, 46, 55

terminating, 693, 858

understanding, 7178

using, 97

WF 3.x, executing from Interop activity, 801, 806842

workflow declaration and, 812, 17

Activities assembly, 7

Activity class, 16, 77, 849

DynamicActivity class and, 142, 741747

shipping charges calculator sample application and, 89

activity templates, 683685, 767

ActivityAction activity, 290302

activity templates and, 683

custom designers and, 657661

scheduling, 734740

ActivityAction class, 195, 290, 849

delegates and, 290

properties of, 291

supporting ActivityAction and, 657

scheduling ActivityAction and, 734

ActivityBuilder class, 756, 765, 849

ActivityContext class, 56, 485, 849

ActivityDefinitionId property (TrackingProfile class), 575

ActivityDelegate class, 850

ActivityDesigner class, 630, 850

ActivityFunc class, 290, 850

ActivityInfo class, 571

ActivityInstance class, 56, 691, 850

ActivityMetaProperties property (Interop activity), 806

ActivityProperties property (Interop activity), 806

ActivityScheduledQuery, 577

ActivityScheduledRecord, 572, 577, 598

ActivityState class, 572

ActivityStateQuery, 576, 594

ActivityStateRecord, 571, 576

ActivityType property (Interop activity), 806

ActivityValidationServices class, 661, 663, 680

ActivityXamlServices class, 142144

AddBaseAddress method, 362

AddExtension method (WorkflowApplication class), 129

AddImplementationVariable method, 715

addition case, Switch activity and, 30

AdditionalConstraints property (ValidationSettings class), 663, 680

addresses, endpoints and, 316

AddServiceEndpoint method, 362

AddToCollection activity, 101, 109, 198

AddToDictionary activity, 214, 215

AddValidationError method, 667

AdventureWorks SQL Server sample database, 508529

downloading/installing, 509

LINQ to SQL for accessing, 510

tracking workflows and, 579

Annotations property (TrackingRecord class), 568

annotations, to tracking records, 568, 597

anonymous functions, Lambda expressions and, 93

App.config file

credit approval sample workflow service and, 400

order processing sample workflow service and, 344, 346, 359

order shipment sample workflow service and, 384, 388

self-hosting workflow services and, 366

shopping cart sample workflow and, 440, 455, 464

tracking profiles read from, 575, 623626

WorkflowControlEndpoint and, 480

applications, 3537

debugging, 37

external, guidelines for workflow interaction with, 266

quitting, 36

running. See running applications

workflow persistence and, 416

Arg prefix, 18, 26

ArgExpression argument, 25, 235

Argument Editor, 18, 25

argument properties, 21

ArgumentException, 21

arguments, 75, 850

activity data flow and, 99

defining, 24, 25, 235

DesignerHost sample application, 796

dictionaries and, 118

properties and, 118

shipping charges calculator sample application and, 84

Arguments button (workflow designer), 10, 18

ArgumentToExpressionConverter class, 631, 637

arithmetic operations, Switch activity and, 29

ASP.NET web applications, invoking workflows from, 145149

assemblies, 51

Assign activity, 29, 101, 107

expressions and, 632

vs. InvokeMethod activity, 222

AsyncCodeActivity class, 47, 73, 76, 850

inventory lookup sample and, 189

shipping charges calculator sample application and, 94

suspending persistence and, 419

AsyncCodeActivityContext class, 56

asynchronous unit of work, 73, 850

atomic unit of work, 73, 411, 850

Attributes property (ActivityBuilder class), 756

AutoResetEvent, 123, 125, 134, 273

images B

base classes, 23, 76

generic/nongeneric versions of, 76

HostingDemoActivity sample and, 121

BasicHttpBinding, 340

BeginCancel method, WorkflowApplication class and, 132

BeginExecute method

inventory lookup sample and, 190

shipping charges calculator sample application and, 94

BeginInvoke method, 486

shipping charges calculator sample application and, 95

WorkflowInvoker class and, 113, 122, 124

BeginInvokeCallback method, 125

BeginLoad method (WorkflowApplication class), 130

BeginOnLoad method (PersistenceIOParticipant class), 471

BeginOnSave method (PersistenceIOParticipant class), 471

BeginPersist method (WorkflowApplication class), 130

BeginResumeBookmark method (WorkflowApplication class), 132

BeginRun method (WorkflowApplication class), 130, 140

BeginTerminate method (WorkflowApplication class), 132

BeginTrack method (TrackingParticipant class), 605

BeginTryCommand (InstanceStore class), 484, 486

BeginUnload method (WorkflowApplication class), 132

behaviors

workflow services and, 412

WorkflowServiceHost persistence and, 443

bindings, 851

endpoints and, 316

migration and, 805

properties and, 297

Web.config file and, 342

workflow services and, 316

Body property

CancellationScope activity, 108, 564

CompensableActivity, 108, 549

DoWhile activity, 104, 166

ForEach activity, 105, 195

ParallelForEach activity, 196

TransactionScope activity, 540

While activity, 104, 166

BookmarkCallback delegate, 267

BookmarkOptions enum, 692, 747

BookmarkResumptionQuery, 577

BookmarkResumptionRecord, 572, 577

bookmarks, 49, 266276, 851

BookmarkResumptionQuery and, 577

BookmarkResumptionRecord and, 572

long-running unit of work and, 74

migration and, 805

nonblocking, 747, 748

parent/child activities and, 692

Pick/PickBranch activities and, 302312

shopping cart sample workflow and, 429

workflow instances and, 131

Boolean conditions, evaluating/testing, 690, 702, 726

Branches property (Parallel activity), 105, 176

branching decisions

decision-making constructs for, 164

procedural modeling style and, 2, 3, 29

breakpoints, 37

building blocks, workflows and, 97

images C

C#

expression support for, 68

vs. Visual Basic, 5862

C# events, vs. delegates, 128

CacheMetadata method, 658, 851

configuring metadata and, 688

validation code and, 662, 667

CallExternalMethodActivity

ExternalDataExchangeService and, 823

Interop activity and, 807, 823

Cancel method, 463

child cancellations and, 693

WorkflowApplication class, 132, 137

CancelChild method (NativeActivityContext class), 693, 728

CancelChild method (NativeActivityFaultContext class), 692

CancelChildren method (NativeActivityContext class), 693

CancelHandler property (CancellationScope activity), 108

Canceled state, 57, 851

cancellation requests, 693

CancellationHandler property

CancellationScope activity, 564

CompensableActivity, 549

CancellationScope activity, 101, 108, 564

CancelRequestedQuery, 577

CancelRequestedRecord, 572, 577

CanInduceIdle property, 267, 269

case sensitivity, Visual Basic and, 59

cases, arithmetic operations and, 30

Cases property (Switch activity), 165

Catches property (TryCatch activity), 109, 530

ChannelFactory class, 317

child activities, 9

ActivityScheduledRecord and, 572, 598

cancelling, 693

CancelRequestedQuery and, 577

CancelRequestedRecord and, 572

exception handling for, 709714

execution completion and, 691

execution properties and, 748

execution repeated for, 702709

execution scheduling for, 690, 693702, 714725, 857

Parallel activity and, 176, 194

parallel execution for, 725734

Sequence activity and, 176

single/multiple, 649657, 667683

Switch activity and, 85

ClearCollection activity, 101, 109, 198, 218

ClearDictionary activity, 214, 217

client applications, implementing, 342348

Close method (WorkflowServiceHost class), 362

Closed delegate, WorkflowApplication class and, 137

Closed event (WorkflowServiceHost class), 362

Closed state, 57, 851

Closing event (WorkflowServiceHost class), 362

CLR (Common Language Runtime). See runtime

CLR data types, variables and, 56, 75, 90

Code Activity template, 23

CodeActivity class, 23, 46, 64, 73, 851

access to the workflow runtime and, 76

migration and, 804

shipping charges calculator sample application and, 78

WF 3.x workflows and, 821

CodeActivityContext class, 24, 56

collapsed viewing mode, 645649

collection activities, 198211

collection category (of standard activities), 109

Collection property

AddToCollection activity, 109, 198

ClearCollection activity, 199

ExistsInCollection activity, 199

RemoveFromCollection activity, 198

collection-related activities, 195228

CollectValues method (PersistenceParticipant class), 470

command-line calculator (sample application)

ActivityAction used with, 293302

alternate extension used with, 286289

bookmarks used with, 268276

flowchart modeling style and, 233241

hosting workflows and, 34

ParseCalculatorArgs activity for, 23, 27, 234, 236

procedural modeling style and, 2243

running, 35

unit testing for, 3943

workflow extensions used with, 276286

Common Language Runtime. See runtime; CLR data types, variables and

communication, 265312

CommunicationObject class, 361

CompensableActivity, 101, 108, 549557

Compensate activity, 101, 108, 550, 557

compensation, 50, 549563, 852

CompensableActivity and, 549557

compensation handlers and, 57

triggering manually, 557563

compensation activities (WF 3.x), Interop activity and, 807

CompensationHandler property (CompensableActivity), 549

Completed delegate, 127, 128, 273

CompletionCondition property

Parallel activity, 105, 176, 188, 194

ParallelForEach activity, 196

CompletionCallback callback delegate, 691

CompletionState property, 134

complex types, controlling serialization of, 323

composite activities, 9, 74, 852

composition, 852

Condition property, 106

Boolean conditions and, 702

child activity scheduling and, 714

DoWhile activity, 104, 166

If activity, 164

While activity, 104, 166

ConfigurationManager class, 623

configuring workflow services, 316

Confirm activity, 101, 108, 550

confirmation, 550, 852

ConfirmationHandler property (CompensableActivity), 549

consistency of database updates

compensation and, 549557

TransactionScope activity for, 541546, 549

Console class, 13

Constraint class, 662

Constraints property (ActivityBuilder class), 663, 756

constraints, for validation, 662, 669679, 852

Content property, messaging activities and, 323, 324

content-based correlation, 325, 386388, 852

ContentControl class, 630

ContentPresenter class, 648

context-based correlation, 369385, 852

vs. content-based correlation, 325

guidelines for, 370

Context property (WorkflowDesigner class), 754, 757

ContextMenu property (WorkflowDesigner class), 754

control flow activities, 74, 852

control flow category (of standard activities), 104

correlation, 325, 370, 852

controlling, 325

workflow services and, 324

CorrelationHandle, 325

CorrelationInitializer class, 325

CorrelationScope activity, 101, 107, 326

CreateBookmark method (NativeActivityFaultContext class), 267, 692

CreateInstanceStore method, 436

CreateWorkflowOwnerCommand, 421, 422, 444, 485

credit approval (sample) workflow service, 388405

declaring, 390393

order processing sample workflow service modified for, 394399

testing, 402405

custom activities, 23, 46, 71, 687752

adding to Sequence activity, 28

asynchronous implementation for, 9397

authoring, ways of/steps for, 72, 78, 97

cancelling, 564

code authoring for, 7884, 8893

custom tracking records and, 600604

CustomTrackingRecord for, 573

designers for, 47, 629634

dictionary-related activities and, 213222

executing rules via, 842847

expression activities and, 6466

flowchart modeling style and, 248253

LINQ queries/updates and, 511520

migration and, 804

order processing sample workflow service and, 349

parents/children and, 687725

for shopping cart sample workflow, 428

tracking workflows and, 580

unit testing for, 39

validation for, 661683

workflow building blocks and, 97

workflow extensions and, 406

Xaml authoring for, 8488

CustomTrackingQuery, 578

CustomTrackingRecord, 573, 578

images D

data

categories of, activities and, 74

data contracts and, 315, 322, 330, 852

workflow persistence and, 419

data flow of activities, 99

data types, C# vs. Visual Basic, 61

DataContract attribute, 315, 322, 331, 419

DataMember attribute, 315, 322, 331, 419

debugging applications, 37, 48

decisions, 2, 2238, 164, 233241

declarative activity model, 45, 853

declarative workflow model, 2

declarative workflow services, tracking workflows and, 618623

Default case, Switch activity and, 30, 32, 36

Default property (Switch activity), 165

definition, 55

Delay activity, 101, 107, 114

adding to a workflow, 180

Parallel activity and, 177

SqlWorkflowInstanceStore persistence and, 422

TimeSpan value and, 120

workflow persistence and, 418

delegates

vs. C# events, 128

multiple instances of workflows and, 152

WorkflowApplication class and, 127

DeleteWorkflowOwnerCommand, 421, 422, 485

shopping cart sample workflow and, 437

WorkflowServiceHost and, 444

Designer attribute, 633, 639

commenting out for testing purposes, 642

using vs. metadata store, 642

DesignerHost (sample) application, 760799

context menu, modifying for, 793796

controls for, 761

currently selected activity, tracking, 790793

implementing, 760771

Save/SaveAs/Open operations and, 775777

steps for implementing (list), 760

Toolbox for, 761771, 780788

DesignerMetadata class, 760, 764, 788

designers, 629634

associating with activities, 633, 639642

default, 636

expanded/collapsible, 645649

shipping charges calculator sample application illustrating, 635649

steps for creating (list), 634

design-time

custom activities and, 629685

design-time audience and, 72

developers, activities and, 72

dictionaries

arguments and, 112, 118

dictionary-related activities for, 213222

DisplayName property, 12

division case, Switch activity and, 31

domain-specific languages, workflow model and, 2

DoWhile activity, 101, 104, 165, 174, 632

downloads

AdventureWorks SQL Server sample database, 509

sample code for Pro WF (in .NET 3.5) book, 824

sample code for this book (Pro WF in .NET 4.0), 761

duplex message exchange pattern, 315, 388405, 853

correlation and, 324

guidelines for, 389

durable delay, 853

DurableInstancingOptions property, 362

DynamicActivity class, 77, 142, 741747, 853

DynamicActivityProperty class, 743

images E

e-commerce shopping cart (sample) workflow. See shopping cart (sample) workflow

Else property (If activity), 104, 164

EditingContext class, 757, 853

EndExecute method

inventory lookup sample and, 191

shipping charges calculator sample application and, 94, 96

EndInvoke method, 486

inventory lookup sample and, 191

shipping charges calculator sample application and, 96

WorkflowInvoker class, 113, 122, 124

EndOnLoad method (PersistenceIOParticipant class), 471

EndOnSave method (PersistenceIOParticipant class), 471

endpoints, 316, 479483, 853

EndRun method (WorkflowApplication class), 130, 141

EndTrack method (TrackingParticipant class), 605

EndTryCommand (InstanceStore class), 484, 486

Enqueue method (WF 3.x), migration and, 805

EnqueueOnIdle (WF 3.x), migration and, 805

error handling category (of standard activities), 109

ETW (Event Tracing for Windows), 68, 565, 578, 853

ETW tracking participant, 579591

EtwTrackingParticipant class, 277, 578

event logging, 578

Event Tracing for Windows (ETW), 68, 565, 578, 853

event tracking, EtwTrackingParticipant for, 277, 578

EventData element, tracking data and, 589

events

custom, migration and, 805

vs. queues, 286

EventTime property (TrackingRecord class), 568

examples. See samples

Executing state, 57

exception handling, 50, 57, 507530

ArgumentException and, 21

FaultPropagationQuery for, 577

FaultPropagationRecord for, 573

multiple exceptions and, capturing, 537

parents/children and, 692, 709714

Throw activity and, 32

unhandled exceptions and, 507

workflow services and, 409

Execute method, 266, 268

command-line calculator sample application and, 24

inventory lookup sample and, 168

shipping charges calculator sample application and, 79, 94, 810

Executing state, 853

execution properties, 747751

ExistsInCollection activity, 101, 109, 198, 201

ExistsInDictionary activity, 214, 216

expanded viewing mode, 645649

expression activities, 6266

Expression argument, 24, 28

Expression property

FlowSwitch activity, 106

Switch activity, 90, 104, 165

expressions, 50, 5766, 854

designer classes and, 631

types of, 57, 632

Visual Basic for, 5762, 859

Expressions namespace, 63

ExpressionTextBox class, 631, 637, 651

Extensible Application Markup Language. See Xaml

Extensions property (WorkflowApplication class), 129

ExternalDataExchange attribute, 823

ExternalDataExchangeService, WF 3.x and, 823834, 854

images F

FaultCallback callback delegate, 691

Faulted event (WorkflowServiceHost class), 362

Faulted state, 57, 854

FaultPropagationQuery, 577

FaultPropagationRecord, 573, 577

file system

file-based instance stores and, 485492, 501

workflow persistence and, 417, 484

FileSystemInstanceStore (sample) class, 485, 492

FileSystemInstanceStoreIO (sample) class, 485, 492501

Finally property (TryCatch activity), 109, 530, 537

FindInCollection activity, 199, 201, 255

FindInDictionary activity, 214, 217

FirstNumber argument, 2428, 30

flowchart activities, 230263

Flowchart activity, 9, 101, 105, 230, 854

command-line calculator sample application and, 233

context menu and, 793796

Toolbox items and, 790793

flowchart category (of standard activities), 105

flowchart modeling style, 3, 47, 163, 229263, 854

mixing with procedural modeling style, 229, 254263

using 230–233

FlowchartDecision activity, 230, 231

FlowchartStep activity, 230, 232

FlowchartSwitch activity, 230, 231

FlowDecision activity, 102, 106, 854

context menu and, 793796

Toolbox items and, 790793

FlowNode class, 230

FlowSwitch activity, 102, 106, 854

context menu and, 793796

Toolbox items and, 790793

Flush method (WorkflowDesigner class), 754, 772

ForEach activity, 102, 105, 195, 200211, 254

activity templates and, 683

ActivityAction activity and, 734

ActivityAction class and, 197, 657

foreach keyword (C#), 195

ForEachWithBodyFactory class, as activity template, 683, 767

Func delegate, 89, 95, 127, 486

images G

GenericTypeArguments property (InvokeMethod activity), 223

generic types, C# vs. Visual Basic, 59

Get method, 24, 80

GetAdditionalExtensions method (IWorkflowInstanceExtension interface), 278

GetBookmarks method (WorkflowApplication class), 132

GetChildSubtree class, 672

GetExtension method (WorkflowApplication class), 129, 277

GetExtensions method (WorkflowApplication class), 129

GetParentChain class, 672, 675

GetWorkflowTree class, 672

globally unique identifiers GUIDs), workflow instances and, 137

glossary, 849860

guessing game (sample) application, 824834

GUIDs (globally unique identifiers), workflow instances and, 137

images H

HandleExternalEventActivity

ExternalDataExchangeService and, 823

Interop activity and, 807, 823, 807, 823

HandleFault method (NativeActivityFaultContext class), 692, 712

Hello Workflow (sample application), 517

adding new workflows to, 17

hosting workflows and, 12, 20

running, 14

host communication, 265312

hosting workflow services, 49

credit approval sample workflow service and, 400

order processing sample workflow service and, 359

order shipment sample workflow service and, 384

self-hosting and, 361368

Xaml workflows and, 326

Xamlx workflow services and, 326

hosting workflows, 48

command-line calculator sample application and, 34, 239

Hello Workflow sample application and, 12, 20

HostingDemoActivity sample illustrating, 121

HostingDemoWorkflow sample illustrating, 117

WebInvokerHost and, 147

WorkflowApplication class and, 126142

WorkflowInvoker class and, 111126

Xaml workflows and, 326

HostingDemoActivity (sample), 121

HostingDemoWorkflow (sample)

ActivityXamlServices class and, 143

hosting the workflow, 117

multiple workflow instances and, 150

WorkflowApplication class and, 133

WorkflowInvoker class and, 114120

workflows invoked from ASP.NET web applications and, 145

human interactions, 855

workflow model and, 2

workflow persistence and, 416

images I

IActivityTemplateFactory interface, 683

IAsyncResult object, 124, 125

icons, 643

Idle delegate, 127, 128, 137, 273

Idle member, PersistableIdle member and, 420

IEquatable interface, 201, 202

If activity, 102, 104, 164

problem reporting sample workflow and, 303

shipping charges calculator sample application and, 85, 90

if keyword, 48

if statement (C#), 85

IIS (Internet Information Services), 316

publishing workflow services to, 341

workflow persistence and, 416

images, 643

imperative code, migration and, 804

Implementation property

Activity class, 89

ActivityBuilder class, 756

Imports button (workflow designer), 10

InArgument class, 21, 24, 75, 90

inferred contracts, 324

infrastructure, work categories and, 74

initialization syntax, vs. procedural code, 742

Initialize method/Uninitialize method (WF 3.x), migration and, 805

InitializeCorrelation activity, 102, 107

InitializeDesigner method, 764, 779

input arguments, 18, 75

input parameters, 1722

instance methods, WorkflowInvoker class and, 112, 122126

instance stores, 416, 483505, 855

InstanceId property (TrackingRecord class), 568

InstanceInfo class (C#), 154, 156

InstancePersistenceCommand class, 484

InstancePersistenceContext class, 485

InstanceStore class, 416, 484, 485, 855

InstanceStore property, 130, 420, 443

InstanceView property (InstancePersistenceContext class), 485

IntelliSense, 19

Internet Information Services (IIS), 316

publishing workflow services to, 341

workflow persistence and, 416

Interop activity, 51, 102, 110, 806842, 855

ExternalDataExchangeService and, 823834

limitations of, 807

migration and, 804

rules, executing via, 834842

shipping charges calculator sample application illustrating, 807823, 834842

WF 3.x activities, executing from, 801, 806842

Interop class, 806

InteropTrackingRecord class, 574, 807

inventory lookup (sample), 241

hosting/testing, 172

Parallel activity and, 182194

While/DoWhile activities and, 167175

inventory update (sample), 200213, 254263, 508564

custom activities for, 511530

dictionary-related activities and, 218222

executing, 526

ForEach activity and, 200211

InvokeMethod activity and, 223227

ParallelForEach activity and, 211

tracking workflows and, 579605, 611626

Invoke method, 13, 35, 111

InvokeAction activity, 290, 300

InvokeAction class, 290

InvokeAsync method (WorkflowInvoker class), 113, 122

InvokeCompleted event, 123

InvokeFunc class, 290

InvokeMethod activity, 102, 108, 222227

InvokeWorkflowActivity, Interop activity and, 807

IsCancellationRequested property, 704

IsolationLevel property (TransactionScope activity), 540

Item property

AddToCollection activity, 109, 198

RemoveFromCollection activity, 198

Items property

EditingContext class, 757

ExistsInCollection activity, 199

ItemSupportExtension (sample) custom workflow extension, 426, 472474

IValidationErrorService interface, 777

IWorkflowInstanceExtension interface, 278

images K

keywords, C# vs. Visual Basic, 59

images L

Lambda expressions, 90, 93, 855

Language INtegrated Query (LINQ), 93, 855, 510

Level property (TrackingRecord class), 568

LINQ (Language INtegrated Query), 93, 855, 510

LINQ to SQL, 510, 855

Literal class, 58

literal data types, C# vs. Visual Basic, 62

Load method

resuming persistence after suspending, 420

WorkflowApplication class and, 130, 417

WorkflowDesigner class and, 754, 755

Xaml and, 142

LoadWorkflowByInstanceKeyCommand, 485

LoadWorkflowCommand, 485

local services, 823

long-running unit of work, 73, 855

long-running workflows, 265, 327

bookmarks for, 266276

cancelling, 564

WorkflowControlEndpoint for, 479483

looping decisions, 165

procedural modeling style and, 2, 3, 34

flowchart modeling style and, 241248

L-value expressions, 632, 639

images M

management endpoints, 479483

MapValues method (PersistenceParticipant class), 470

message-based communication. See workflow services

message contracts, 323, 330, 856

message exchange patterns, 315, 317, 856

MessageBodyMember attribute, 323, 324, 331

MessageContract attribute, 323, 324, 331

MessageHeader attribute, 323, 324, 331

MessageReceived event, ExternalDataExchangeService and, 831

messaging activities, 317322, 324

messaging category (of standard activities), 106

metadata

configuring automatically/manually, 688690

custom instance stores and, 490498

DesignerMetadata class and, 760, 764, 788

MetadataStore class and, 633, 760, 856

metadata store, 633, 640642

MetadataStore class, 633, 760, 856

MethodName property (InvokeMethod activity), 223

migration category (of standard activities), 110

migration strategies, 51, 801806

ModelChanged event (WorkflowDesigner class), 754, 764

modeling styles. See flowchart modeling style; procedural modeling style

ModelItem class, 630, 856

ModelItem property (ActivityDesigner class), 630, 638

multiplication case, Switch activity and, 31

images N

Name property

ActivityBuilder class, 756

TrackingProfile class, 575

namespaces, 7, 10, 51

naming conventions

for assemblies, Visual Studio and, 640

for service contracts, 319

NativeActivity, 856

NativeActivity class, 74, 266, 291

access to the workflow runtime and, 76

configuring metadata and, 688

executing activities and, 694

NativeActivityContext class, 56, 267, 291

cancellation requests and, 693

child activity execution scheduling and, 690

execution properties and, 747

suspending persistence and, 419

NativeActivityFaultContext class, 692

NativeActivityMetadata struct, 689, 735

.NET Framework

examples in this book and, 6

projects and, 6

WF and, 4, 803

nonblocking bookmarks, 747, 748

nonflowchart activities, 232

nonpersisting tracking participants, 615618

NonSerialized attribute, workflow persistence and, 419

nonworkflow applications, implementing, 342348

NoPersistHandle class, suspending persistence via, 419

notification to external systems, 509, 517, 551

images O

object initialization, C# vs. Visual Basic, 59

Of keyword, 59

OnComplete method, 695, 704, 727

OnConditionComplete method, 703, 715

one-way message exchange pattern, 315, 856

OnFaulted method, 704, 712

OnUnhandledException delegate, 128, 135, 273

OnUnhandledException method, 507, 527, 529

Open method (WorkflowServiceHost class), 362

Opened event (WorkflowServiceHost class), 362

Opening event (WorkflowServiceHost class), 362

Operation argument, 24, 28

OperationContract attribute, 324

operators, C# vs. Visual Basic, 59

order processing (sample) workflow service, 313, 328368

classes for, 329332

client application for, 342348

configuring/testing, 339

credit approval sample workflow service and, 388405

declaring, 332336

execution properties and, 747751

order shipment sample workflow service and, 369388

response for, populating, 337

workflow client for, 348361

workflow extensions and, 405409

order shipment (sample) workflow service, 369388

declaring, 371379

order processing sample workflow service modified for, 379383

testing, 385, 388

OrderEntry (sample) workflow

configuring/testing and, 440

declaring, 431

OrderEntryService (sample) workflow service

client application and, 458

configuring/testing, 464, 477

declaring, 445

promoting properties and, 476479

OrderUtilityExtension (sample), 406409

order processing sample workflow service modified for, 407

testing, 409

orphaned workflow instances, 443

OutArgument class, 21, 24, 75

output arguments, 18, 75

OverloadGroup validation attribute, 662, 664

images P

Parallel activity, 102, 105, 176188

asynchronous execution via, 189

child activities and, 176, 194

parallel execution, 176, 189, 725734, 856

ParallelForEach activity, 102, 105, 211

ActivityAction class and, 197

vs. ForEach activity, 196

ParallelForEachWithBodyFactory activity, 767

parameters, passing to workflows, 1722

Parameters property (InvokeMethod activity), 223

parent activities

cancelling, 693

constrained activities and, 674

exception handling for, 709714

execution properties and, 748

responsibilities of, 687693

validation and, 678

ParseCalculatorArgs (sample) activity

implementing in command-line calculator sample application, 234, 236, 269

unit testing for, 39

performance

argument properties and, 22

collection-related activities and, 199

Persist activity, 102, 107, 417

Persist method (WorkflowApplication class), 130, 417, 420

PersistableIdle delegate, WorkflowApplication class and, 128, 136

PersistableIdle member, 420, 438, 442

PersistableIdle property, WorkflowServiceHost and, 443

persistence, 3, 49, 415467, 857

arguments/variables and, 75

configuring/managing, 129

customizing, 469505

defined, 415

execution properties and, 747

file system and, 417, 484

how it works, 417

migration and, 807

nonpersisting tracking participants and, 615618

persistence commands (list), 484

reasons for using, 415

resuming after suspending, 420

SqlWorkflowInstanceStore and, 421467

suspending, 419

tracking participants and, 604614

WorkflowApplication and, 419, 424443

WorkflowServiceHost and, 443467

PersistenceIOParticipant class, 471

PersistenceParticipant class, 419, 469, 472474, 857

Pick activity, 102, 105, 302312, 371, 378

PickBranch activity, 102, 105, 371, 378

PolicyActivity class, 834, 842

Presentation namespace, 753

primitives category (of standard activities), 107

problem reporting (sample) workflow, 303312

procedural activities, 163194, 230

procedural code, vs. initialization syntax, 742

procedural model, 1, 45

procedural modeling style, 3, 47, 163, 857

branching decisions and, 2, 3, 29

mixing with flowchart modeling style, 229, 254263

Program.cs file, 7, 12, 20

projects

creating, 6

running, 15

Promote method (SqlWorkflowInstanceStore class)

promoting properties, 474479

properties

activity properties and, 634645

binding, 297

execution properties and, 747751

promoting, 474479

Properties property (ActivityBuilder class), 756

Properties window, 11

PropertyInspectorView property (WorkflowDesigner class), 754, 755

PropertyReference activity, 297

proxy classes, client applications and, 316, 344

PublishValues method (PersistenceParticipant class), 470

images Q

Queries property (TrackingProfile class), 575

Query method, 463

Queue class, 286

queues, 286

quitting applications, 36

images R

Receive activity, 102, 106

credit approval sample workflow service and, 394

inferred contracts and, 324

Interop activity and, 807

SendReply activity and, 319

WCF and, 317

ReceiveAndSendReply activity, 102, 106, 683

ReceiveAndSendReply activity template, 319

ReceiveMessageRecord, 574

ReceiveReply activity, 317, 321

RecordNumber property (TrackingRecord class), 568

referencedCategories dictionary, 781

reflection, activity metadata and, 690

Register method (DesignerMetadata class), 760, 788

RemoveFromCollection activity, 102, 109, 198

RemoveFromDictionary activity, 214, 215

RenderingInfo element, tracking data and, 589

request/response message exchange pattern, 315, 857

correlation and, 325

order processing sample workflow service and, 327368

RequiredArgument validation attribute, 662, 663

RequiredArgumentAttribute, 24

resources, workflow persistence and, 416

resources for further reading

Lambda expressions, 93

LINQ, 511

WCF, 314

WF 3.x, 811

WPF, 629

Result argument, 25

Result property

CompensableActivity, 549, 557

ExistsInCollection activity, 199

InvokeMethod activity, 223

RemoveFromCollection activity, 198

ResumeBookmark method, 267

resuming persistence after suspending, 420

WorkflowApplication class and, 132

Rethrow activity, 102, 109

root (topmost) activity, 9

rules engine, 68, 857

custom activities and, 842847

Interop activity and, 834842

RuleSet class, 836, 842, 857

Run method

resuming persistence after suspending, 420

WorkflowApplication class and, 130, 151

RunAsynchronously property (InvokeMethod activity), 223

running applications

command-line calculator sample application and, 35

Hello Workflow sample application and, 14, 21

runtime, 851

activity definition vs. activity instance, 55

ActivityAction class and, 290

DynamicActivity class and, 741

private variables and, 56

runtime category (of standard activities), 107

images S

samples

command-line calculator. See command-line calculator (sample application)

credit approval workflow service, 388405

DesignerHost application, 760799

FileSystemInstanceStore class, 485

FileSystemInstanceStoreIO class, 485, 492501

guessing game application, 824834

Hello Workflow, 517

HostingDemoWorkflow. See HostingDemoWorkflow (sample)

inventory lookup, 167175, 182194, 241

inventory update. See inventory update (sample)

ItemSupportExtension custom workflow extension, 426, 472474

order processing workflow service. See order processing (sample) workflow service

order shipment workflow service, 369388

OrderEntry workflow, 431, 440

OrderEntryService workflow service, 445, 458, 464

OrderUtilityExtension, 406409

problem reporting workflow, 303312

sample code for this book, downloading, 761

shipping charges calculator. See shipping charges calculator (sample application)

shopping cart workflow, 424467

Save method (WorkflowDesigner class), 754

SaveWorkflowCommand, 485

scalability, workflow persistence and, 416

ScheduleAction method (NativeActivityContext class), 291, 690, 734

ScheduleActivity method (NativeActivityContext class), 690, 695, 727

scheduledChildren dictionary, 726

ScheduleDelegate method (NativeActivityContext class), 690, 734

ScheduleFunc method (NativeActivityContext class), 291, 690, 734

scope, variables and, 26, 100

SecondNumber argument, 2428, 30

self-hosting workflow services

steps for implementing, 361368

testing/using, 367

WorkflowApplication class and, 416

WorkflowServiceHost class and, 416, 422

Send activity, 102, 106, 317, 320

Interop activity and, 807

ReceiveReply activity and, 321

SendAndReceiveReply activity, 102, 106, 683

SendAndReceiveReply activity template, 322

SendMessageRecord, 574

SendReply activity, 317, 319, 324

Sequence activity, 9, 102, 104

adding activities to, 9, 28

child activities and, 176

command-line calculator sample application and, 233

custom designers and, 653

Parallel activity and, 179

shipping charges calculator sample application and, 90

testing constraints and, 677

serializing tracking records to XML, 605608

service contracts, 315

endpoints and, 316

naming conventions for, 319

service operations, order processing sample workflow service and, 327368

ServiceContract attribute, 324

ServiceHostBase class, 361

ServiceModel Metadata Utility (svcutil.exe utility), 316

Services property (EditingContext class), 757

Set method, 24, 80

SetChildrenCollection method, 715

SetInstance method (IWorkflowInstanceExtension interface), 278

shipping charges calculator (sample application), 7897

custom activity asynchronous implementation for, 9397

custom activity code authoring for, 7884, 8893

custom activity designers and, 635649

custom activity Xaml authoring for, 8488

DynamicActivity and, 741747

flowchart modeling style and, 248253

project for, 79

unit testing for, 8184, 87, 92, 96, 251

validation and, 663

WF 3.x activities and, 807823

WF 3.x workflows and, 815823, 834842

shopping cart (sample) workflow, 424467

configuring/testing, 440, 464

item-related classes for, 425

tasks for implementing (list), 424, 444

workflow implementation for, 424443

workflow service implementation for, 444467

ShowValidationErrors method, 777

SOAP fault handling, workflow services and, 409

SqlWorkflowInstanceStore, 421467

Delay activity and, 422

properties of, 421

SQL Server preparation for, 423

using with WorkflowApplication, 424443

using with WorkflowServiceHost, 444467

SqlWorkflowInstanceStore class, 53, 416, 443

property promotion and, 474479

workflow persistence and, 420

SqlWorkflowInstanceStoreBehavior class, 454, 456

Delay activity and, 423

workflow persistence and, 422

WorkflowServiceHost persistence and, 443

square brackets [ ], serializing expressions and, 58

standard activities, 3, 46, 71, 101110

categories of, 103110

Interop activity and, 807

list of, 101

WF 3.x vs. WF 4 (table), 865868

workflow building blocks and, 97

standard flow activities, 9

state

activities and, 57

ActivityState class and, 572

ActivityStateQuery and, 576

ActivityStateRecord and, 571

tracking profiles and, 592596

tracking workflows and, 569

state machine, 67, 857

static methods, WorkflowInvoker class and, 111, 114122

String class, 19

string literals, 11

subtraction case, Switch activity and, 31

SuspendActivity, Interop activity and, 807

svcconfigeditor.exe (WCF Service Configuration Editor), 342

svcutil.exe utility (ServiceModel Metadata Utility), 316

Switch activity, 29, 102, 104, 164

FlowchartSwitch activity and, 231

shipping charges calculator sample application and, 85, 90

switch statement (C#), 29, 104, 165, 231

SynchronizationContext class, InvokeAsync method and, 113

SynchronizationContext property (WorkflowApplication class), 130, 160

System element, tracking data and, 589

system interactions, 2, 858

system-provided bindings, WCF and, 316

images T

Target property (Compensate activity), 550

TargetObject property (InvokeMethod activity), 223

TargetType property (InvokeMethod activity), 223

templates, 6

Terminate method (WorkflowApplication class), 132, 139

TerminateWorkflow activity, 102, 107

terminating activities, 693, 858

text, WriteLine activity for, 10

Text property

WriteLine activity, 11, 12

WorkflowDesigner class, 754, 755

TextWriter property

HostingDemoWorkflow sample and, 114

WriteLine activity and, 108

Then property (If activity), 104, 164

Throw activity, 32, 103, 109

Timeout property (TransactionScope activity), 540

timeout values, 119

TimeSpan value, 119, 131

TimeToPersist property (WorkflowIdleBehavior class), 444

TimeToUnload property (WorkflowIdleBehavior class), 444, 454

ToolboxCategory class, 755

ToolboxControl class, 755

ToolboxItemWrapper class, 755, 768

topmost (root) activity, 9

Track method (TrackingParticipant class), 578, 605, 609

Tracking namespace, 600

tracking participants, 566, 578, 604618, 858

custom, 604618

tracking profiles and, 574

tracking profiles, 566, 574578, 591604, 858

loading from App.config file, 623626

targeting selected activities and, 596

tracking records, 566, 568574, 858

custom, 600604

serializing to XML, 605608

tracking participants and, 578

tracking profiles for, 574, 591

viewing tracking data and, 587, 623

tracking workflows, 50, 565627, 858

architecture of the workflow tracking mechanism, 566

declarative workflow services and, 618623

migration and, 807

reasons for using, 566

SQL Server and, 68

steps for implementing (list), 567

viewing tracking data and, 579, 586, 623

TrackingParticipant class, 578, 605

TrackingProfile class, 574, 575

TrackingProvider class, 566

TrackingRecord class, 568

TransactedReceiveScope activity, 103, 107, 412, 541

transaction and compensation category (of standard activities), 108

transactions, 50, 540549, 858

host transactions and, 547

workflows/workflow services and, 411

TransactionScope activity, 50, 103, 108, 411, 540546

TransactionScope class, 540

transport protocol, identified by binding, 316

Trigger property (PickBranch activity), 105

Try property (TryCatch activity), 109, 530

try/catch blocks, 35, 531, 549

TryCatch activity, 103, 109, 410, 530540

multiple exceptions and, capturing, 537

properties of, 530

TryCommand (InstanceStore class), 484, 488

images U

Uniform Resource Identifier (URI), endpoint addresses and, 316

unit testing, 3943

Unload method (WorkflowApplication class), 132

Unloaded delegate, WorkflowApplication class and, 128, 137

URI (Uniform Resource Identifier), endpoint addresses and, 316

using statement (C#), 10

images V

Validate method (ActivityValidationServices class), 661, 663, 680

validation, 47, 661683, 858

constraints for, 662, 669679

executing manually, 679683

mechanisms for (list), 662

validation attributes for, 662, 663666

validation code for, 662, 667669

validation errors, displaying, 777

ValidationContext property, 672

ValidationSettings class, 663, 680

value expressions, 632

Values property

ForEach activity, 105, 195

ParallelForEach activity, 196

Variable class, 56, 75, 90

Variable Editor, 27

variables, 75, 858

activity data flow and, 99

defining, 26, 235

scope and, 26, 100, 859

shipping charges calculator sample application and, 85

shopping cart sample workflow and, 431, 445

Variables button (workflow designer), 10, 26

Variables Editor, 26

VB (Visual Basic), for expressions, 5762, 859

versioning, 803

View property (WorkflowDesigner class), 754, 755

viewing modes, expanded/collapsed, 645649

visibility, 565

Visual Basic (VB), for expressions, 5762, 859

Visual Studio

.NET Framework and, 804

privileges and, 329, 367

unit testing and, 39

WF 3.x and, 802

WF and, 4

workflow designer and. See workflow designer

Visual Studio debugger, 48

Visual Studio Toolbox, 6, 301

VisualBasicReference class, 58

VisualBasicValue class, 58

images W

warnings, validation and, 669

WAS (Windows Process Activation Service), 316

WCA.exe utility, 823, 826

WCF (Windows Communication Foundation), 48, 314317, 859

message exchange patterns and, 315, 317

WCF contracts and, 67

WF integration with, 3

workflow services and. See workflow services

WCF Service Configuration Editor (svcconfigeditor.exe), 342

WCF Test Client (WcfTestClient.exe), 342

web service activities, Interop activity and, 807

Web.config file

declarative workflow services and, 620

enhancing for workflow services publishing to IIS, 341

WF (Windows Workflow Foundation), 859

base classes and, 23

creating workflow in, 15

features missing from version 4.0 of, 66

features/capabilities of, 4551

grand tour of, 4569

migration strategies for, 51, 801806

quick tour of, 144

reasons for using, 3

variable scope and, 27

version 4.0 of, 4, 859

WF 3.x and, 801847, 859

WF 3.x vs. WF 4 (table), 861868

While activity, 103, 104, 165175

custom designers and, 650

WorkflowItemPresenter/WorkflowItems Presenter classes and, 632

while keyword, 48

Windows Communication Foundation. See WCF

Windows Event Viewer, 579, 586, 623

Windows Presentation Foundation (WPF) applications, 131, 160, 629

Windows Process Activation Service (WAS), 316

Windows Server AppFabric, 316

Windows Workflow Foundation. See WF

work categories, activities and, 72

workflow clients, implementing, 348361

Workflow Console Application template, 6, 23, 235

workflow designer, 4, 8, 47

architecture/components of, 753760

DesignerHost sample application illustrating, 760799

hosting, 753799

interface of, 10

rehosting, 51

Visual Studio and, 47

workflow extensions, 49, 276286, 859

adding to workflows, 409

alternate extension and, 286289

custom, 405409, 426, 472474

implementing, 406

workflow persistence and, 419

workflow projects

creating, 6

running, 15

workflow services, 48, 313414, 860

behaviors and, 412

configuring, 316

controlling instances of, 327

correlation and, 324

credit approval sample workflow service and, 388405

declarative, 618623

declaring, 327340

exceptions/faults and, 409

hosting, 316

message types and, 322

messaging activities for implementing, 317322

order processing sample workflow service. See order processing (sample) workflow service

order shipment sample workflow service. See order shipment (sample) workflow service

OrderEntryService sample workflow service and, 445, 458, 464

publishing to IIS, 341

self-hosting, 361368

transactions and, 411

WCF contracts and, 67

workflow instances, identifying, 325

workflow tracking. See tracking workflows

workflow workflow, 4

Workflow1.xaml file, 7, 1517

WorkflowApplication class, 49, 57, 126142, 860

creating instances of, 127

Delay activity and, 418

delegate members and, 127

GetExtension method and, 277

handling unhandled exceptions and, 507

ResumeBookmark method, 267

SqlWorkflowInstanceStore used with, 424443

workflow extensions and, 277

workflow instance execution and, 130

workflow persistence and, 416, 419

vs. WorkflowInvoker class, 126, 273

WorkflowControlClient class, 480

WorkflowControlEndpoint, 479483

tasks for implementing, 480

testing and, 482

WorkflowControlEndpoint class, 57, 443

WorkflowDesigner class, 754, 860

WorkflowExtensions property, 362, 405

WorkflowIdleBehavior class, 413, 443, 454

WorkflowInstanceQuery, 576

WorkflowInstanceRecord, 569, 576, 592

WorkflowInstanceStates class, 570

WorkflowInvoker class, 13, 49, 111126, 267, 860

BeginInvoke method for, 113, 122, 124

EndInvoke method for, 113, 122, 124

executing activities via, 121

host transactions and, 547

instance methods for, 112, 122126

Invoke method for, 111

InvokeAsync method for, 113, 122

static methods for, 111, 114122

unhandled exceptions and, 507

workflow extensions and, 277

workflow persistence and, 416

vs. WorkflowApplication class, 126, 273

WorkflowItemPresenter class, 632, 651, 655, 660

WorkflowItemsPresenter class, 632, 655

WorkflowQueue (WF 3.x), migration and, 805

workflows, 144, 859

aborting, 849

activity data flow and, 99

activity definition vs. activity instance, 55

asynchronous execution and, 126

bookmarks and, 131

building blocks and, 97

cancelling, 564, 851

controlling workflow instances and, 132

declarative activity model and, 45

declarative workflow model and, 2

declaring, 812, 17, 236

dynamic updates, WF 3.x and, 68

examples of. See samples

executing, 13, 15, 111161

flowchart modeling for, 229263

hosting. See hosting workflows

invoking from ASP.NET web applications, 145149

long-running, 265, 327, 479483

mental checklist for, 4

multiple instances of, managing, 150161

orphaned workflow instances and, 443

parallel execution, multiple activities and, 725734

passing parameters to, 1722

persistence and. See persistence

procedural modeling for, 163194

reasons for using, 1

resumption of after becoming idle, 113

activities and. See activities; custom activities

stopping execution of, 132, 137

synchronous execution and, 148

timeout values for, 119

tracking. See tracking workflows

transactions and, 411

understanding as synonymous with activities, 46, 55

unit testing for, 3943

updating, 508564

workflow extensions and, 129, 409

Xaml workflow services and, 326

Xaml workflows and, 326

WorkflowServiceHost

workflow persistence and, 443467

WorkflowControlEndpoint and, 480

WorkflowServiceHost class, 49, 361, 443, 860

Delay activity and, 423

ExternalDataExchangeService and, 823, 831

multiple workflow instances and, 150

workflow persistence and, 416, 422

WorkflowExtensions property, 362, 405

Xamlx workflow services and, 326

WorkflowUnhandledExceptionBehavior class, 57, 412

WorkflowViewElement class, 630

WPF (Windows Presentation Foundation) applications, 131, 160, 629

WriteLine activity, 10, 103, 108

HostingDemoWorkflow sample and, 114

inventory lookup sample and, 188

images X

x:Class attribute, 630, 636

Xaml, 1517, 46, 860

ActivityXamlServices class and, 142144

authoring activities and, 72

breakpoints and, 38

Xaml workflows, 326

Xamlx workflow services, 326, 860

XML, serializing tracking records to, 605608

xmln:s attribute, 637

xmlns:sapc attribute, 637

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.59.219