I encountered a problem when your old workflows, that already have been working, was caused exceptions on publishing. For example, this forum discussion. You may spent many hours to make them work again. Let's dive!
1. Cannot find activity in your clr-namespace:
Microsoft.Workflow.Client.ActivityValidationException:
Workflow XAML failed validation due to the following errors:
Cannot create unknown type
'{clr-namespace:My.Custom.Activities.Namespace;
assembly=My.Custom.Activities.Assembly}MyActivity'.
Possible server responses in this case:
- The remote server returned an error: (400) Bad Request.
- re-install DLL in GAC (with 'force' attribute), link,
- re-register workflow service application (with 'force' attribute), link,
- disable default custom code protection,
- re-add your custom code activities to the workflow pane from toolbox, rebuild project,
- and then restart workflow manager service.
After that you may get another exception.
2. Unknown type '{wf://workflow.windows.net...'
Microsoft.Workflow.Client.ActivityValidationException:
Workflow XAML failed validation due to the following errors:
Cannot create unknown type
'{wf://workflow.windows.net/default/ ... }MyActivity'.
Possible server responces:
- The remote server returned an error: (400) Bad Request
- The remote server returned an error: (404) Not found
In forum above you may find a possible solution - add line to AssemblyInfo.cs of your project:
- [assembly: System.Windows.Markup.XmlnsDefinition("wf://workflow.windows.net/$Current/$Activities", "My.Custom.Activities.Namespace")]
But that may not help. You even may get project compiling fail.
If you look at your .xaml file of workflow in XML editor, you'll see a line in a head for standard activities:
- xmlns:p1="wf://workflow.windows.net/$Activities"
- xmlns:p2="wf://workflow.windows.net/$Current/$Activities"
For solution just redefine this line:
- xmlns:p2="clr-namespace:My.Custom.Activities.Namespace;assembly=My.Custom.Activities.Assembly"
No comments:
Post a Comment