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

Getting Error in Creating Custom Workflow Activity in Farm Solution

$
0
0

Hi All,

I'm developing Custom Activity for SharePoint Designer 2013 in Visual Studio 2013. Followed this post to develop and deploy the activity, but the post is using Sandbox solution and I'm developing Farm Solution.

Solution deployed successfully, activity is visible in SPD, Added the activity to new Workflow, saved the Workflow all done. but when I try to publish the workflow it throws below error when I define assembly in .action4 file "

Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Cannot create unknown type '{clr-namespace:SPWFCustomActivity;assembly=SPWFCustomActivity}SendMailWithAttachment'. HTTP headers received from the server - ActivityId: 57d98740-eaaa-48f3-aeba-xxxxxxxxxxxx. NodeId:XXXXXSHAREXXX. Scope: /SharePoint/default/03647192-3149-49ee-981f-9c50b5e60050/3997c9cd-dc41-4f42-9f21-94e5a95eefa2. Client ActivityId : 97a6e19e-654c-6058-e039-xxxxxxxxx"

and I don't define assembly then below error:

Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Cannot set unknown member 'SendMailWithAttachment.Message'. HTTP headers received from the server - ActivityId: 90bf6f61-2e3a-434d-8224-xxxxxxxxxxxx. NodeId: XXXXXSHAREXXX. Scope: /SharePoint/default/03647192-3149-49ee-981f-9c50b5e60050/3997c9cd-dc41-4f42-9f21-94e5a95eefa2. Client ActivityId : 0da7e19e-45c8-6058-e039-xxxxxxxxxxxx. ---> System.Net.WebException: The remote server re

Below is the .action4 file:

<Action Name="SendMailWithAttachment" 
        ClassName="SPWFCustomActivity.SendMailWithAttachment"
        Category="TEE Custom Activity" AppliesTo="all"><!-- Assembly="$SharePoint.Project.AssemblyFullName$"--><RuleDesigner Sentence="Message %1"><FieldBind Field="Message" Text="message" Id="1" />    </RuleDesigner><Parameters><Parameter Name="Message" Type="System.String, mscorlib" Direction="In" 
               Description="Message to log." /></Parameters></Action>

Followed this post to remove the problem of not able to add activity in SPD WF.

All the post I've found so far is using Sandbox deployment.

How can I remove the above mentioned errors? Is it require to deploy solution in sandbox mode

EDIT: tried the same solution in Sandbox deployment and it works. So now my question is Can't we deploy the Workflow Custom Action in Farm Solution.


Best Regards,
Brij K
http://bloggerbrij.blogspot.co.uk/



Viewing all articles
Browse latest Browse all 7589

Trending Articles



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