All,
I am attempting to start a SharePoint workflow associated to a content type. I can successfully start the workflow, but it stays as "starting" for 5 minutes, then the status changes to canceled. This workflow can be started manually, when an item is created, or changed. All 3 of these cases work properly. What could the issue be?
Here's a snippet of my code where I am launching the WF -
foreach (SPWorkflowAssociation workflowAssociation in listItem.ContentType.WorkflowAssociations)
{
if (workflowAssociation.Name.Equals("workflow name", StringComparison.CurrentCultureIgnoreCase))
{
workflowAssociation.AllowAsyncManualStart = true;
web.Site.WorkflowManager.StartWorkflow(listItem, workflowAssociation, workflowAssociation.AssociationData);
}
}
Thanks