FIX: You experience various problems in Windows Workflow Foundation

Article translations Article translations
Article ID: 932816 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

In Microsoft Windows Workflow Foundation, you may experience one of the following issues.

Issue 1

When a workflow unloads after persistence occurs, the timers may not resume.

Issue 2

You add a nested custom activity within a workflow. However, when you try to add the same activity again, the activity is not added to the workflow.

Issue 3

In Microsoft Office SharePoint Designer 2007, you try to define workflows that use custom actions. The custom actions are defined in an assembly with a version number that resembles a.b.c.d. When you do this, you may receive the following error message:
The workflow could be saved but cannot be run
The compiler gives the following reason for the error:
Assembly is not declared as an authorized type
The compiler displays a message that explains that the version is incorrect. For example, the message states that version a.b.d.c is incorrect. Notice that the last two digits of the version are reversed.

CAUSE

Issue 1

This problem occurs because the unload operation changes the state of the timer queue of the workflow. However, the unload operation does not set the dirty status flag on the workflow. The timer queue contains a Boolean flag that is used to track whether the timer queue must be reregistered with the scheduler service when the timer resumes. During an unload operation, the value of this Boolean flag changes to indicate that the workflow must be reregistered with the scheduler. This flag value change may not be saved if the dirty status flag is not set on the workflow. Therefore, when an unload operation occurs after a persistence point, the timer queue may not be told to reregister the timers. This behavior may cause timers not to resume.

RESOLUTION

Update information

A supported update is now available from the Microsoft Download Center. To download this update, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyID=6096ce0f-d21e-47ac-afe2-d4e1c2fce670

Prerequisites

No prerequisites are required.

Restart requirement

Although you may not receive a prompt at the end of the installation, you must restart the computer after you apply this hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
32-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
System.workflow.activities.dll3.0.4203.2011,111,42420-Feb-200716:53
System.workflow.componentmodel.dll3.0.4203.2011,643,91220-Feb-200716:53
System.workflow.runtime.dll3.0.4203.201591,22420-Feb-200716:53
64-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
System.workflow.activities.dll3.0.4203.2011,111,42420-Feb-200716:53
System.workflow.componentmodel.dll3.0.4203.2011,643,91220-Feb-200716:53
System.workflow.runtime.dll3.0.4203.201591,22420-Feb-200716:53

WORKAROUND

Issue 2

To work around this problem, follow these steps:
  1. Close the WorkflowName.cs file.
  2. Reopen the WorkflowName.cs file.
  3. Add the nested custom activities to the WorkflowName.cs file.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
For more information about timers not resuming an operation after a workflow is reloaded, click the following article number to view the article in the Microsoft Knowledge Base:
932394 A timer does not resume operation after a workflow is reloaded in Microsoft Windows Workflow Foundation

Steps to reproduce the problem

Issue 1

  1. Create a new workflow that contains a DelayActivity object.
  2. Set the TimeoutDuration property of the DelayActivity object to any time in the future.
  3. Add a SqlWorkflowPersistenceService object that has the unloadOnIdle parameter set to a value of false.
  4. Before the DelayActivity object expires, persist the workflow, and then explicitly unload the workflow.

    Note The unload operation should not cause a second persistence, because the dirty status flag is not set.
  5. Reload the workflow before the timer of the DelayActivity object expires.

    Notice that the timer does not resume.

Issue 2

  1. Start Microsoft Visual Studio 2005.
  2. On the File menu, point to New, and then click Project.
  3. Expand Visual C#, click Workflow, click Sequential Workflow Console Application, type WorkflowConsoleApplication1 in the Name box, and then click OK.
  4. In Solution Explorer, right-click WorkflowConsoleApplication1, click Add, and then click New Item.
  5. Click Activity, type ParentActivity.cs in the Name box, and then click Add.
  6. In Solution Explorer, right-click WorkflowConsoleApplication1, click Add, and then click New Item.
  7. Click Activity, type ChildActivity.cs in the Name box, and then click Add.
  8. Add a CodeActivity activity to ChildActivity.cs.
  9. Double-click the CodeActivity activity that you added in step 8, and then add a code handler to the CodeActivity activity.
  10. On the Build menu, click Rebuild Solution.
  11. Add the ChildActivity activity that you create in step 7 to the ParentActivity.cs file.
  12. On the Build menu, click Rebuild Solution.
  13. Add the ParentActivity activity you created in step 5 to the Workflow1.cs file.
  14. Change the value of the Name property of the ParentActivity activity to testActivity.
  15. Add another ParentActivity activity to the Workflow1.cs file.

Properties

Article ID: 932816 - Last Review: September 28, 2011 - Revision: 4.0
APPLIES TO
  • Windows Workflow Foundation
Keywords: 
atdownload kbbug kbfix kbqfe KB932816

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com