Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Custom CodeActivity: Invalid type(s) 'System.Data.DataTable'. ActivityValidationException

$
0
0

Hello,

it is possible to use the System.Data.DataTable as In-/Output-Parameter in a custom Code Activity:

public class PrepareExcelSheet : CodeActivity<bool>
{
  public InArgument<DataTable> ReportData { get; set; }
  ...
}

I added this type to the AllowedTypes.xml file in both workflow Manager directories
C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin
and
C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts

  <Assembly Name="System.Data">
    <Namespace Name="System.Data">
      <Type>DataTable</Type>
    </Namespace>
  </Assembly>

I restarted the Wokflow Service and I did a IIS-Reset. But when I try to deploy the workflow I receice a lot of error Messages:

Error occurred in deployment step 'Activate Features': Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Invalid type(s) 'System.Data.DataTable'.
Reached maximum number of validation errors: 10.
HTTP headers received from the server - ActivityId: 5b03484c-c9d0-4df5-99f2-20e933c71158. NodeId: XXXX. Scope: /SharePoint/default/3e8e30b0-5a63-4930-a4aa-9bd63b45e74f/be30eac2-da35-468d-8d00-734632bd648f. Client ActivityId : 7ed2e806-332c-48f2-b62e-2e04ad0aa48c. ---> 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)

Thanks for any suggestions.


-


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>