Microsoft Windows Workflow Foundation Step by Step

Errata for Microsoft Windows Workflow Foundation Step by Step




The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page xxvii

Reference to Online Companion Content is incorrect On page xxvii, the section titled "Online Companion Content" reads: "Online Companion Content The online companion content page has content and links related to this book, including a link to the Microsoft Press Technology Updates Web page. The online companion content page for this book can be found at www.microsoft.com/mspress/companion/0-7356-2335-4/" Disregard this entire section as there is no companion content website for this title.

Microsoft Press  Jul 13, 2010 
Other Digital Version
CD-ROM

Revised Code for Chapters 6, 8, and 14 CD-ROM: After you install the sample code from the CD, the sample codes for various chapters are placed, by default, in the My DocumentsMicrosoft Press folder on the hard disk. We have updated sample code for Chapters 6, 8 and 14. Please download the updated sample code to replace the sample code on the hard disk for these chapters.WF6-8-14.exe http://download.microsoft.com/download/5/4/b/54ba6499-4a6b-46e0-ad7c-a3b4d1f22f09/wf6-8-14.exe Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Microsoft Press  May 06, 2010 
Printed
Page 7

Correction to Windows SDK download location On page 7, in the first bullet, the URL for downloading the Windows SDK has changed. Change: “http://www.microsoft.com/downloads/details.aspx?familyid=7614FE22-8A64-4DFB-AA0C-DB53035F40A0&displaylang=en” To: “http://www.microsoft.com/downloads/details.aspx?FamilyID=4377F86D-C913-4B5C-B87E-EF72E5B4E065&displaylang=en”

Microsoft Press  May 06, 2010 
Printed
Page 19

Missing characters from regular expressions On page 19, the first two lines of code in step 4 are missing some characters. Change: string USCode = @"^(d{5}$)|(d{5}$-d{4}$)"; string CanadianCode = @"[ABCEGHJKLMNPRSTVXY]d[A-Z] d[A-Z]d";To: string USCode = @"^(d{5}$)|(d{5}-d{4}$)"; string CanadianCode = @"^[ABCEGHJKLMNPRSTVXY]d[A-Z] d[A-Z]d$";

Microsoft Press  Jul 13, 2010 
Printed
Page 24

Correction to WorkflowRuntime instance On page 24, in the first paragraph, the statement about WorkflowRuntime instance is incorrect. Change: “The WF runtime and your application execute together in a .NET AppDomain, and there can be only one instance of WorkflowRuntime per AppDomain. Attempting to create a second instance of WorkflowRuntime in a single AppDomain results in an InvalidOperationException.” To: “The WF runtime and your application execute together in a .NET AppDomain. Although early in WF’s history there could be only a single instance of the WorkflowRuntime per AppDomain, contemporary versions allow multiple instances.”

Microsoft Press  May 06, 2010 
Printed
Page 28

Correction To WorkflowRuntime Instance On page 28, under "Building a Workflow Runtime Factory", the statement about WorkflowRuntime is incorrect. Change: “I mentioned this previously in the chapter, but it is important enough to mention again—there can be only a single instance of WorkflowRuntime per AppDomain. And because the majority of .NET applications use only a single AppDomain, it necessarily follows that you can generally use only a single instance of WorkflowRuntime in your application. Whenever I hear “use only a single instance,” I naturally think of using a combination of the singleton and factory patterns. The singleton pattern, if you’re unfamiliar with patterns, is simply a mechanism for assuring that no matter how many times your application requests instances of the singleton object, only one instance of the singleton is ever given out. This is typically done for objects that are considered “expensive” to create, such as objects that consume a large number of resources or take a significant amount of time to be created.” To: “When I started writing this book, there could be only a single instance of WorkflowRuntime per AppDomain. And because the majority of .NET applications use only a single AppDomain, it necessarily followed that you could generally use only a single instance of WorkflowRuntime in your application. Since its release, WF allows more than one WorkflowRuntime instance per AppDomain, but I find the workflow factory I show here to still be a useful tool, if only because you can collect runtime customizations (discussed in later chapters) in one place and have a single place in your code to shut it down. Whenever I hear “use only a single instance,” even though we’re allowed more than one instance in this case, I naturally think of using a combination of the singleton and factory patterns. The singleton pattern, if you’re unfamiliar with patterns, is simply a mechanism for assuring that no matter how many times your application requests instances of the singleton object, only one instance of the singleton is ever given out. This is typically done for objects that are considered “expensive” to create, such as objects that consume a large number of resources or take a significant amount of time to be created.”

Microsoft Press  Jul 13, 2010 
Printed
Page 36

_waitHandle should be waitHandle On page 36, in point 6, the underscore in _waitHandle shouldbe be deleted. Change: "6. We'll need to create the _waitHandle object" To: "6. We'll need to create the waitHandle object"

Microsoft Press  May 06, 2010 
Printed
Page 38

"Create a single instance of Workflow-Runtime per AppDomain" should be "Create an instance of Workflow-Runtime" On page 38, under "Chapter 2 Quicke Reference", "Create a single instance of Workflow-Runtime per AppDomain" should be "Create an instance of Workflow-Runtime". Change: “Add a reference to the System.Workflow.Runtime assembly. Create a single instance of Workflow- Runtime per AppDomain, and start the runtime by calling WorkflowRuntime.StartRuntime or by creating a workflow instance.” To: “Add a reference to the System.Workflow.Runtime assembly. Create an instance of Workflow- Runtime. Start the runtime by calling WorkflowRuntime.StartRuntime or by creating a workflow instance.”

Microsoft Press  Jul 13, 2010 
Printed
Page 50

Delete Tip box On page 50, the text in the Tip box doesn't help. Bacuse it is not possible to select simultanous entries on two tabs. If you change the tab and click OK, the first selected references will not be inserted. Because of this the tip box should be deleted.

Microsoft Press  Jul 13, 2010 
Printed
Page 50

Correction to step 2 On page 50, in step 2, it states: "2. If we were to compile the application now, WorkflowHost would fail to compile..." But at this time the code isn't there, it has to be typed in in the next steps. So compiling causes no error. To fix this, move step 2 down, making it step 5. The current steps 3 – 5 would then become steps 2 – 4.

Microsoft Press  May 06, 2010 
Printed
Page 61

“class MyClass” should be “class MyClass : DependencyObject” On page 61, there is correction to the code sample at the top of the page. Change: class MyClassTo: class MyClass : DependencyObject

Microsoft Press  May 06, 2010 
Printed
Page 76

ActivityTrackingPoint should be ActivityTrackPoint On page 76, in the last paragraph, "ActivityTrackingPoint" should be "ActivityTrackPoint".

Microsoft Press  Jul 13, 2010 
Printed
Page 88

GetWorkflowRuntime should be WorkflowRuntime On page 88, in step 6, GetWorkflowRuntime should be WorkflowRuntime. Change: “...following the line of code calling GetWorkflowRuntime.“ To: “...following the line of code that creates a new instance of WorkflowRuntime.“

Microsoft Press  May 06, 2010 
Printed
Page 89

Delete step 2 On page 89, delete step 2 because the incomplete example file already contains these using-directives. Delete: "2. Add the using statements for configuration and workflow tracking to the top of the file: using System.Configuration; using System.Workflow.Runtime.Tracking;"

Microsoft Press  Jul 13, 2010 
Printed
Page 90

SqlTrackingService should be SqlTrackingQuery On page 90 in the middle of the page, there is an incorrect class name: Change: "The query is performed by SqlTrackingService.TryGetWorkflow." To: "The query is performed by SqlTrackingQuery.TryGetWorkflow."

Microsoft Press  May 06, 2010 
Printed
Page 92

Add "using System.Workflow.ComponentModel" to step 2 On page 92, in step 2, the "using System.Workflow.ComponentModel" should be added to the code. Change: using System.Data; using System.Data.SqlClient; using System.Globalization; using System.IO;To: using System.Data; using System.Data.SqlClient; using System.Globalization; using System.IO; using System.Workflow.ComponentModel;

Microsoft Press  Jul 13, 2010 
Printed
Page 113

System.Workflow.Activity should be System.Workflow.Activities On page 113, in step 11, "System.Workflow.Activity" should be "System.Workflow.Activities".

Microsoft Press  May 06, 2010 
Printed
Page 114

Correction to step 14 On page 114, in step 4, Change: "(the method containing the code we added in the preceding step)" To: "(the method containing the code we'll add in the next step)"

Microsoft Press  Jul 13, 2010 
Printed
Page 116

First character of type must be upper-case On page 116, in step 18, the first character of type must be upper-case. Change: string connTo: String conn

Microsoft Press  May 06, 2010 
Printed
Page 122

WorkingStore should be WorkflowStore On page 122, in step 9, the database name is wrong. Change: "This should be enought time to examine the WorkingStore InstanceState database table." To: "This should be enought time to examine the WorkflowStore InstanceState database table."

Microsoft Press  Jul 13, 2010 
Printed
Page 123

Correction to script names On page 123, under "Chapter 6 Quick Reference", the scripts have the wrong names (remove "workflow" in the names). Change: "You'll need to execute both the SqlWorkflowPersistenceService_Schema.sql script and the SqlWorkflowPersistenceService_Logic.sql script." To: "You'll need to execute both the SqlPersistenceService_Schema.sql script and the SqlPersistenceService_Logic.sql script."

Microsoft Press  May 06, 2010 
Printed
Page 159

First "base constructor" should be "constructor" On page 159, in the third paragraph, the first reference to "base constructor" should be "constructor". Change: "we must provide a base constructor that accepts the instance ID (a Guid), which in turn passes the instance ID to the base constructor," To: "we must provide a constructor that accepts the instance ID (a Guid), which in turn passes the instance ID to the base constructor,"

Microsoft Press  Jul 13, 2010 
Printed
Page 162

MVDataconnector.cs should be MVDataConnector.cs On page 162, at the bottom of the page, the title of Listing 8-3 is incorrect.Change: "Listing 8-3 MVDataconnector.cs completed" To: "Listing 8-3 MVDataConnector.cs completed"

Microsoft Press  May 06, 2010 
Printed
Page 179

Workflow2.Workflow1 should be Workflow2.Workflow2 On page 179, in step 10, there is an error in the name. Change: "(Workflow2.Workflow1 is the fully qualified name)" To: "(Workflow2.Workflow2 is the fully qualified name)"

Microsoft Press  Jul 13, 2010 
Printed
Page 194

Incorrect property name On page 194, in the Tip box, the property name is incorrect. Change: "...response property directly" To: "...responses property directly"

Microsoft Press  May 06, 2010 
Printed
Page 200

Method should be Property On page 200, in Table 9-1, the left column heading is incorrect.Change: "Method"To: "Property".

Microsoft Press  Jul 13, 2010 
Printed
Page 200

Method should be Event On page 200, in Table 9-2, the left column heading is incorrect.Change: "Method"To: "Event".

Microsoft Press  May 06, 2010 
Printed
Page 236

if (_service == null) should be if (value != null) On page 236, in Listing 10-1, there is an error in the code sample. Change: if (_service == null) To: if (value != null) Note: there are two instances of this code, both need to be changed.

Microsoft Press  Jul 13, 2010 
Printed
Page 264

setlevel1 should be setLevel1 On page 264, in point 29, in line 3, there is an incorrect property name. Change: "bound setlevel1’s Level property " To: "bound setLevel1’s Level property "

Microsoft Press  May 06, 2010 
Printed
Page 280

Extra bracket in code On page 280, in the code sample above the heading "Explicit Chaining", there is an extra bracket in the line of code. Change: [RuleWrite("Discount")]] To: [RuleWrite("Discount")]

Microsoft Press  Jul 13, 2010 
Printed
Page 286

WorkflowComplete should WorkflowCompleted On page 286, in point 8, in lines 5 and 6, the event name is incorrect. Change: "WorkflowComplete event" To: "WorkflowCompleted event"

Microsoft Press  May 06, 2010 
Printed
Page 332

Correction to last paragraph On page 332, in the last paragraph, Change: “This doesn’t affect the workflow, but rather resets the user interface buttons.” To: “This causes the application to restart, which reloads the workflow runtime (since we hit a terminal condition, after all) and resets the user interface. (Note that a real soda machine would return to the initial state to wait for another customer, but I wanted to show a terminal state in action.)”

Microsoft Press  Jul 13, 2010 
Printed
Page 352

DefaultSettings should be DefaultSettingsSection On page 352, in the last Note box, the settting name is incorrect. Change: "System.Transactions.Configuration.DefaultSettings.Timeout" To: "System.Transactions.Configuration.DefaultSettingsSection.Timeout"

Microsoft Press  May 06, 2010 
Printed
Page 386

"select Workflow Activity Library" should be "select Workflow" On page 386, in step 4, there is an error. Change: "select Workflow Activity Library" To: "select Workflow"

Microsoft Press  Jul 13, 2010 
Printed
Page 396

CorrelationIntializer should be CorrelationInitializer On page 396, in the second line from from bottom, the attribute name is missing a letter i. Change: "CorrelationIntializer" To: "CorrelationInitializer"

Microsoft Press  May 06, 2010 
Printed
Page 432

Shift+F5 should be Ctrl+F5 On page 432, in step 39, the key name is wrong. Change: "To execute the application, press Shift+F5" To: "To execute the application, press Ctrl+F5"

Microsoft Press  Jul 13, 2010 
Printed
Page 469

Shift+F5 should be Ctrl+F5 On page 469, in step 8, the key name is wrong. Change: "To execute the application, press Shift+F5" To: "To execute the application, press Ctrl+F5" Microsoft Press is committed to providing informative and accurate books. All comments and corrections listed above are ready for inclusion in future printings of this book. If you have a later printing of this book, it may already contain most or all of the above corrections.

Microsoft Press  May 06, 2010