When you develop code-separated workflows, newly added activities may not appear in IntelliSense when you edit the workflow code. When this problem occurs, you cannot use the activity in the Rule Editor or in the Rule Set Editor. If you manually enter an expression that references the activities in the Rule Editor or in the Rule Set Editor, you may receive an error message that resembles the following:
Error building the condition: The field or property "Activity1" on type "WorkflowLibrary1.Workflow1" does not exist or is not accessible.
Note Code-separated workflows can include the following types:
Sequential Workflow files that have code separation
State Machine workflow files that have code separation
Activity files that have code separation
This problem occurs because the Microsoft Windows Workflow Foundation TypeProvider is not immediately updated when you add an activity to a code-separated workflow. When the Rule Editor dialog box or the Rule Set Editor dialog box is invoked, Windows Workflow Foundation queues up a request to update the type information. However, the update does not occur until the dialog box is dismissed. Because the type information for the newly added activities are not available, the newly added activities do not appear in IntelliSense and cannot be used..
To work around this problem, close the Rule Set Editor dialog box or the Rule Condition Editor dialog box, save the Windows Workflow Foundation project, and then try to set the rule set or the rule condition again.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about Windows Workflow Foundation, visit the following Microsoft Web site: