-->
Showing posts with label Designer. Show all posts

SharePoint Workflow error: workflow is automatically cancelled



Recently I ran into a strange issue with out-of-the-box SharePoint workflow. Once the workflow is started, the SharePoint automatically cancels the workflow and the workflow outcomes becomes as "access denied", the description you see is "The workflow could not update the item, possibly because one or more columns for the item require a different type of information".
While the root cause of this issue is not yet known, a simple work around would be to re-publish the workflow using SharePoint designer...
  • Open SharePoint designer
  • Go to the "Workflows" section
  • Select the workflow in question and then click publish
The impact of this solution that new version of the workflow will be published to your site and all new workflow instances should work normally. However, this will not fix the status of existing workflow instances that ran into error status.
To fix these instances (Possibly on a production environment) follow these steps...
  • Launch the affected SharePoint site.
  • Click Site Actions, and then click Site Settings.
  • If the affected site is a sub-site rather than a top-level site, in the Site Collection Administration section, click Go to Top Level Site Settings.
  • Click Site Collection Features.
  • Deactivate the Workflows feature.
  • In SharePoint Designer, open the root of the site collection.
  • Go to Workflows.
  • Remove the Workflows in question (for example, Approval - SharePoint 2010).
  • In SharePoint, in Site Collection Features, reactivate the Workflow feature.
  • Confirm that the workflows are functioning as expected.

SharePoint Designer Workflow Doesn't Start Automatically



Tearing your hair out about why your Sharepoint Designer workflow doesn’t start automatically on item creation, but you can start it manually?
Try this:

  1. Check that workflow has “Start workflow automatically when an item was created” enabled
  2. Are you logged in as System Account? If you create a item using System Account, the workflow will not function properly or won’t start automatically. System Account is the account that’s used for the application pool running the web app. Log in as another account, and try creating the item again.
  3. Check the item’s workflow page. Sometimes workflows take time to complete, or page does not automatically refresh (showing a cached version).
  4. Try republishing the workflow in SharePoint Designer
  5. Try removing “Allow this workflow to be automatically started” from the workflow definition, save, and republish.
  6. Check to see if your workflow has errors. Won’t compile, etc. Try troubleshooting here:
  7. http://office.microsoft.com/en-us/sharepoint-designer-help/troubleshoot-workflow-errors-HA010237912.aspx#BM2
  8. Delete the workflow and create it from scratch again (nuclear option).