Sharepoint - Manually start SharePoint 2010/2013 workflow in SharePoint 2013 farm?

Yes, this is the case. I currently have a design change request open with MS to fix this issue and it does sound like that it is going to be fixed in a future CU.

If you reflector the code and take a look, you can see exactly where it is checking for contribute access at the site (SPWeb) scope.

// Microsoft.SharePoint.WorkflowServices.StoreSubscriptionService
public override WorkflowSubscriptionCollection EnumerateSubscriptionsByEventSource(Guid eventSourceId)
{
    this.context.Web.CheckPermissions(SPBasePermissions.EditListItems);
    WorkflowStore workflowStore = new WorkflowStore(this.context.Web);
    eventSourceId = StoreSubscriptionService.ConvertToGuidToken(eventSourceId, this.context.Web);
    WorkflowFile[] files = workflowStore.QueryWithGuid("0x0100AA27A923036E459D9EF0D18BBD0B9587", StoragePublishState.Unchanged, "WSEventSourceGUID", eventSourceId);
    return this.ConvertToWorkflowSubscriptionCollection(files);
}

Here is the stack trace:

Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(HttpContext context) at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(Exception ex) at Microsoft.SharePoint.SPSecurableObject.CheckPermissions(SPBasePermissions permissionMask) at Microsoft.SharePoint.WorkflowServices.StoreSubscriptionService.EnumerateSubscriptionsByEventSource(Guid eventSourceId) at Microsoft.SharePoint.WorkflowServices.ApplicationPages.WorkflowPage.ConstructStartArray() at Microsoft.SharePoint.WorkflowServices.ApplicationPages.WorkflowPage.OnLoad(EventArgs e)

EDIT: Oops, I forgot to say what we did for the temporary workaround. Now this workaround sucks, but you basically give everyone contribute access to the site, and then break inheritance to all lists and libraries where the user DOESN'T need contribute access and remove their contribute access.

EDIT 2: For more details on how I figured this out and the workarounds, I have blogged about it here: http://steve.thelineberrys.com/unable-to-manually-start-workflows/

Tags: