Help and Support

Microsoft Windows Workflow Foundation Step by Step Comments and Corrections

Article ID:935354
Last Review:May 16, 2007
Revision:1.4
On This Page

SUMMARY

This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Microsoft Windows Workflow Foundation Step by Step, 0-7356-2335-X.

The following topics are covered:

CD-ROM: Revised Code for Chapters 6, 8, and 14
Page xxvii: Reference to Online Companion Content is incorrect
Page 7: Correction to Windows SDK download location
Page 19: Missing characters from regular expressions
Page 24: Correction to WorkflowRuntime instance
Page 28: Correction To WorkflowRuntime Instance
Page 36: _waitHandle should be waitHandle
Page 38: "Create a single instance of Workflow-Runtime per AppDomain" should be "Create an instance of Workflow-Runtime"
Page 50: Correction to step 2
Page 50: Delete Tip box
Page 61: “class MyClass” should be “class MyClass : DependencyObject”
Page 76: ActivityTrackingPoint should be ActivityTrackPoint
Page 88: GetWorkflowRuntime should be WorkflowRuntime
Page 89: Delete step 2
Page 90: SqlTrackingService should be SqlTrackingQuery
Page 92: Add "using System.Workflow.ComponentModel" to step 2
Page 113: System.Workflow.Activity should be System.Workflow.Activities
Page 114: Correction to step 14
Page 116: First character of type must be upper-case
Page 122: WorkingStore should be WorkflowStore
Page 123: Correction to script names
Page 159: First "base constructor" should be "constructor"
Page 162: MVDataconnector.cs should be MVDataConnector.cs
Page 179: Workflow2.Workflow1 should be Workflow2.Workflow2
Page 194: Incorrect property name
Page 200: Method should be Property
Page 200: Method should be Event
Page 236: if (_service == null) should be if (value != null)
Page 264: setlevel1 should be setLevel1
Page 280: Extra bracket in code
Page 286: WorkflowComplete should WorkflowCompleted
Page 332: Correction to last paragraph
Page 352: DefaultSettings should be DefaultSettingsSection
Page 386: "select Workflow Activity Library" should be "select Workflow"
Page 396: CorrelationIntializer should be CorrelationInitializer
Page 432: Shift+F5 should be Ctrl+F5
Page 469: Shift+F5 should be Ctrl+F5

Back to the top

MORE INFORMATION

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 Documents\Microsoft 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)

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 (http://support.microsoft.com/kb/119591/en-us/) How to Obtain Microsoft Support Files from Online Services

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.

Back to the top

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.

Back to the top

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”

Back to the top

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$";


Back to the top

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.”

Back to the top

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.”

Back to the top

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"

Back to the top

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.”

Back to the top

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.

Back to the top

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.

Back to the top

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 MyClass

To:
class MyClass : DependencyObject


Back to the top

Page 76: ActivityTrackingPoint should be ActivityTrackPoint

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

Back to the top

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.“

Back to the top

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;
"

Back to the top

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."

Back to the top

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;


Back to the top

Page 113: System.Workflow.Activity should be System.Workflow.Activities

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

Back to the top

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)"

Back to the top

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 conn


To:
String conn


Back to the top

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."

Back to the top

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."

Back to the top

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,"

Back to the top

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"

Back to the top

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)"

Back to the top

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"

Back to the top

Page 200: Method should be Property

On page 200, in Table 9-1, the left column heading is incorrect.

Change:
"Method"

To:
"Property".

Back to the top

Page 200: Method should be Event

On page 200, in Table 9-2, the left column heading is incorrect.

Change:
"Method"

To:
"Event".

Back to the top

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.

Back to the top

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 "

Back to the top

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")]


Back to the top

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"

Back to the top

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.)”

Back to the top

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"

Back to the top

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"

Back to the top

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"

Back to the top

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"

Back to the top

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.

Back to the top


APPLIES TO
Microsoft Windows Workflow Foundation Step by Step, ISBN 0-7356-2335-X

Back to the top

Keywords: 
KB935354

Back to the top

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.