Showing posts with label SharePoint workflows. Show all posts
Showing posts with label SharePoint workflows. Show all posts

Monday, August 11, 2014

SharePoint 2013 workflow compiling error: Workflow XAML failed validation

While working with SharePoint workflow, I got compilation error in Start a task process activity. By clicking the error (clicking on the top “check errors button”) I don’t see any issues. When publishing the workflow I got the error saying that “Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation: Cannot set unknown member CompositeTask.RelatedContentLinkListItemIntegerId’. HTTP headers received from the server”


Iam unable to publish the WF in SharePoint designer with my credentials and My friends credentials. To fix the issue, I have checked in to issue and found the fix in following blog and MSDN

To fix the issue, we have to register workflow service using following command

Register-SPWorkflowService -SPSite 'MySiteURL’ –WorkflowHostUri ‘Site URL' -AllowOAuthHttp –Force


Hope this helps.

Sunday, August 10, 2014

Issue with SharePoint custom workflow delay activity

While working with SharePoint custom workflow delay activity, Iam not able to run the code in delay activity. I have deleted and added new delay activity but it wasn’t worked. In general we can add user input after a particular time, we can go with delay activity in SharePoint custom workflow.

Delay activity is broken in SharePoint 2007 as well as SharePoint 2010. To fix that we have to run stsadm commands below,

stsadm -o getproperty -pn job-workflow -url siteURL

stsadm -o setproperty -pn job-workflow -pv “Every 2 minutes between 0 and 59″ -url siteURL

After running the commands, we have reset IIS and Restart the timer services in Server.

Hope this will helps.

Saturday, July 26, 2014

SharePoint migration – designer workflow runs twice every time

Migrating from SharePoint 2007 to 2013, SharePoint designer 2007 workflows migrated correctly and workflows are working as expected.

We can’t use SharePoint 2007 list template directly to create the list templates. To do that we have to save the list as a template and need to use that template to create the list.

In SharePoint 2007 site we had a workflow that sends email and update the list data depending on the details created/updated. I have attached the SharePoint designer workflow to the list. But after attaching the workflow, whenever list item added/updated to the list, it is firing twice.

After checking that some time and trail and errors I got the fix for the problem. To do that we have to pause some duration in the workflow beginning. We can make this as 1 min because the workflow timer job will take 5 min and by updating the ‘pause for duration’ value we can change the value by using job definitions in Central Administration.


Sunday, December 15, 2013

Correlation Tokens in SharePoint workflow

Correlation tokens are unique identifiers in SharePoint that bridges to map the objects between the workflow and windows workflow environment. Windows workflow acts as a intermediate layer to communicate with other software. When incoming request arrives, runtime receives the request and determines the request and identifies the workflow instance. Then it process the request for the instance.

Windows workflow acts as a communication channel for all the workflow instances. We can have two separate correlation tokens for Workflows and task references. We cannot assign the correlation token to workflow task that used for workflow.

We have to declare the correlation token for the workflow in OnWorkflowActivated activity. We have to bind the this correlation token to  each activity in the workflow.
OnWorkflowActivated activity raises when workflow initiated  for SharePoint. This is the first event raised in workflow. Each task should have its own correlation token that provides the task related information.