workflow deploy error from visual studio 2012

I've got exception while deploying workflow (while activating feature). It cant find types of my custom activities.

I put dll and describing xml to C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts and C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin, and dll to the GAC. the server was restarted.

Visual Studio designer toolbox shows my Activities, and I successfully able to put them to surface, configure properties and build project.

What additional configuration steps should I do?

This is error description:

Error occurred in deployment step 'Activate Features': Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Invalid type(s) 'MyTypes.MyType1'.
Invalid type(s) 'MyTypes.MyType2'.
 HTTP headers received from the server - ActivityId: 5571d59a-d1e9-4fb7-aaab-242abd60ab5b. NodeId: MYPC. Scope: /SharePoint/default/7307d5d1-055a-4d36-94af-7a761fca22eb/e6e5ca3c-9b7d-4688-940d-2ba3cfbf1ff9. Client ActivityId : ea185650-54fe-4440-84f6-f1f98c79c65a. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
   at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
   --- End of inner exception stack trace ---
   at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
   at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
   at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description, Boolean overwriteXClassName, Boolean terminateDependentInstances)
   at Microsoft.SharePoint.WorkflowServices.FabricWorkflowManagementClient.PublishActivity(String serviceGroupName, ActivityDescription activity, Boolean overwriteXClass, Nullable`1 terminateInstances)
   at Microsoft.SharePoint.WorkflowServices.FabricWorkflowDeploymentProvider.PublishActivity(FabricWorkflowManagementClient client, ActivityDescription activityDefinition, String serviceGroupName)
   at Microsoft.SharePoint.WorkflowServices.FabricWorkflowDeploymentProvider.<>c__DisplayClass5.<PublishDefinition>b__4()
   at Microsoft.SharePoint.WorkflowServices.WorkflowServiceContextExtensions.InvokeWithEcosystemRetry(WorkflowServicesContext context, EcosystemRequiredMethod method)
   at Microsoft.SharePoint.WorkflowServices.FabricWorkflowDeploymentProvider.PublishDefinition(WorkflowDefinition workflowDefinition)
   at Microsoft.SharePoint.WorkflowServices.WorkflowDefinitionStorageEventReceiver.PublishDefinition(SPItemEventProperties properties)

September 5th, 2013 6:32am

Please, someone, explain the steps needed to deploy custom code activity.

Free Windows Admin Tool Kit Click here and download it now
September 8th, 2013 2:14pm

Same problem. Any help?
September 17th, 2013 12:18pm

No help, nobody knows... (
Free Windows Admin Tool Kit Click here and download it now
October 16th, 2013 8:29pm

Hi,

Have you tried to deploy a simple workflow with a simple step 'write to history' activity? Please deploy a very simple workflow to ensure workflow is installed/configured properly. Also can you enable workflow logging as described in the link: http://ranaictiu-technicalblog.blogspot.com.au/2013/03/sharepoint-2013-workflow-debugdiagnosis.html. The exception you are getting just says, the workflow service and SharePoint can't communicate, nothing more. Can you please enable the workflow logging and share more details.

October 17th, 2013 3:37am

Check and verify if you have copied "allowedtypes.xml" to "%ProgramFiles%\Workflow Manager\1.0\Workflow\Artifacts" and "%ProgramFiles%\Workflow Manager\1.0\Workflow\WFWebRoot\bin"

if not create a xml file with following content and copy at same location and follow the steps as below:

<AllowedTypes>
  <Assembly Name="AssemblyName">
    <Namespace Name="NamespaceName">
      <Type>ClassName</Type>
    </Namespace>
  </Assembly>
< /AllowedTypes>

* On the Workflow Manager box you have to:

     - Copy activity assembly to following locations:

          > %ProgramFiles%\Workflow Manager\1.0\Workflow\Artifacts

          > %ProgramFiles%\Workflow Manager\1.0\Workflow\WFWebRoot\bin

     - Add your activity class to the white-list

          > Copy AllowedTypes.xml  also to above two locations

     - Restart Workflow Manager backend service

* On SharePoint box you have to:

     - Copy activity assembly to SharePoint box and install it in the GAC.

     - Reset IIS


  • Edited by Developer124 Tuesday, February 04, 2014 8:27 PM making more geniric
Free Windows Admin Tool Kit Click here and download it now
February 4th, 2014 8:06pm

Check and verify if you have copied "allowedtypes.xml" to "%ProgramFiles%\Workflow Manager\1.0\Workflow\Artifacts" and "%ProgramFiles%\Workflow Manager\1.0\Workflow\WFWebRoot\bin"

if not create a xml file with following content and copy at same location and follow the steps as below:

<AllowedTypes>
  <Assembly Name="AssemblyName">
    <Namespace Name="NamespaceName">
      <Type>ClassName</Type>
    </Namespace>
  </Assembly>
< /AllowedTypes>

* On the Workflow Manager box you have to:

     - Copy activity assembly to following locations:

          > %ProgramFiles%\Workflow Manager\1.0\Workflow\Artifacts

          > %ProgramFiles%\Workflow Manager\1.0\Workflow\WFWebRoot\bin

     - Add your activity class to the white-list

          > Copy AllowedTypes.xml  also to above two locations

     - Restart Workflow Manager backend service

* On SharePoint box you have to:

     - Copy activity assembly to SharePoint box and install it in the GAC.

     - Reset IIS


  • Edited by Developer124 Tuesday, February 04, 2014 8:27 PM making more geniric
  • Proposed as answer by AlvaroMad 7 hours 44 minutes ago
February 4th, 2014 8:06pm

Check and verify if you have copied "allowedtypes.xml" to "%ProgramFiles%\Workflow Manager\1.0\Workflow\Artifacts" and "%ProgramFiles%\Workflow Manager\1.0\Workflow\WFWebRoot\bin"

if not create a xml file with following content and copy at same location and follow the steps as below:

<AllowedTypes>
  <Assembly Name="AssemblyName">
    <Namespace Name="NamespaceName">
      <Type>ClassName</Type>
    </Namespace>
  </Assembly>
< /AllowedTypes>

* On the Workflow Manager box you have to:

     - Copy activity assembly to following locations:

          > %ProgramFiles%\Workflow Manager\1.0\Workflow\Artifacts

          > %ProgramFiles%\Workflow Manager\1.0\Workflow\WFWebRoot\bin

     - Add your activity class to the white-list

          > Copy AllowedTypes.xml  also to above two locations

     - Restart Workflow Manager backend service

* On SharePoint box you have to:

     - Copy activity assembly to SharePoint box and install it in the GAC.

     - Reset IIS


  • Edited by Developer124 Tuesday, February 04, 2014 8:27 PM making more geniric
  • Proposed as answer by AlvaroMad Friday, May 08, 2015 11:50 PM
Free Windows Admin Tool Kit Click here and download it now
February 4th, 2014 8:06pm

what is Workflow manager box and sharepoint box?

Can someone help me here?

July 7th, 2014 9:16am

SharePoint Box is where SharePoint services are installed and WF Manager box where you installed workflow manager. And if you installed both on same machine, you need to do the both steps on same machine.
  • Proposed as answer by Shanila m Tuesday, July 08, 2014 3:46 PM
Free Windows Admin Tool Kit Click here and download it now
July 7th, 2014 5:06pm

SharePoint Box is where SharePoint services are installed and WF Manager box where you installed workflow manager. And if you installed both on same machine, you need to do the both steps on same machine.
  • Proposed as answer by Shanila m Tuesday, July 08, 2014 3:46 PM
July 7th, 2014 5:06pm

I don't know if it is too late, but I was having the same issue even with the latest SharePoint Server 2013 upgrade.

What I did is to compare the "workflow.xaml" file from a SharePoint Designer workflow (after having saved it as a template into the Site Assets library) with the "workflow.xaml" generated from within Visual Studio 2013. What I found and what resolved my issue is to add these two attributes as a part of the Activity element.

xmlns:local

="clr-namespace:Microsoft.SharePoint.WorkflowServices.Activities"


xmlns:mwaw

="clr-namespace:Microsoft.Web.Authoring.Workflow;assembly=Microsoft.Web.Authoring"

  • Proposed as answer by RicardoAleG 9 hours 49 minutes ago
Free Windows Admin Tool Kit Click here and download it now
April 9th, 2015 5:48pm

I don't know if it is too late, but I was having the same issue even with the latest SharePoint Server 2013 upgrade.

What I did is to compare the "workflow.xaml" file from a SharePoint Designer workflow (after having saved it as a template into the Site Assets library) with the "workflow.xaml" generated from within Visual Studio 2013. What I found and what resolved my issue is to add these two attributes as a part of the Activity element.

xmlns:local

="clr-namespace:Microsoft.SharePoint.WorkflowServices.Activities"


xmlns:mwaw

="clr-namespace:Microsoft.Web.Authoring.Workflow;assembly=Microsoft.Web.Authoring"

  • Proposed as answer by RicardoAleG Thursday, April 09, 2015 9:47 PM
April 9th, 2015 9:46pm

Great Answer! Many thanks
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2015 7:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics