Consider the following scenario:
SharePoint Designer workflow includes a Start Approval Process Task. When the workflow runs, the notification email is sent to the Approver. Some approvers try to approve the tasks after a few days. Randomly, the tasks get stuck in an "in progress" state and workflow hangs.
Workflow Tracing Log has the following entry:
Subscription handler of Activity ID4 threw System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl...., Int32& puiVersion, Int16& pnClientTag)
at Microsoft.SharePoint.SPWeb.InitWeb()
at Microsoft.SharePoint.SPWeb.get_Title()
at Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint)
at Microsoft.SharePoint.Workflow.SPWinOEWSSService.GetWebForWorkflow(SPWorkflow wf, SPWorkflowUserContext runAsUser)
at Microsoft.SharePoint.Workflow.SPWinOEWSSService.get_Web()
at Microsoft.SharePoint.WorkflowActions.WorkflowContext.get_Web()
at Microsoft.Office.Workflow.Actions.OfficeTask.get_WebFields()
at Microsoft.Office.Workflow.Actions.OfficeTask.StaticNameFromFieldId(Guid fieldId)
at Microsoft.Office.Workflow.Actions.OfficeTask.CloneWithFieldsAvailableByInternalName(Hashtable htOrig, Hashtable htDest)
at Microsoft.Office.Workflow.Actions.OfficeTask.HandleTimerSubscriptionChange(ActivityExecutionContext context, OneTaskProperties currentTask)
at Microsoft.Office.Workflow.Actions.OfficeTask.System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.QueueEventArgs>.OnEvent(Object sender, QueueEventArgs qea)
at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
ULS log may have following entries:
OWSTIMER.EXE (0x2268) 0x1BB0 SharePoint Foundation General 72nz Medium Videntityinfo::isFreshToken reported failure. a81a47e3-75eb-437c-991d-b0c89a84a525
OWSTIMER.EXE (0x2268) 0x1BB0 SharePoint Foundation General 8xfr Verbose PermissionMask check failed. asking for 0x00000001, have 0x00000000 a81a47e3-75eb-437c-991d-b0c89a84a525
SharePoint Designer workflow includes a Start Approval Process Task. When the workflow runs, the notification email is sent to the Approver. Some approvers try to approve the tasks after a few days. Randomly, the tasks get stuck in an "in progress" state and workflow hangs.
Workflow Tracing Log has the following entry:
Subscription handler of Activity ID4 threw System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl...., Int32& puiVersion, Int16& pnClientTag)
at Microsoft.SharePoint.SPWeb.InitWeb()
at Microsoft.SharePoint.SPWeb.get_Title()
at Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint)
at Microsoft.SharePoint.Workflow.SPWinOEWSSService.GetWebForWorkflow(SPWorkflow wf, SPWorkflowUserContext runAsUser)
at Microsoft.SharePoint.Workflow.SPWinOEWSSService.get_Web()
at Microsoft.SharePoint.WorkflowActions.WorkflowContext.get_Web()
at Microsoft.Office.Workflow.Actions.OfficeTask.get_WebFields()
at Microsoft.Office.Workflow.Actions.OfficeTask.StaticNameFromFieldId(Guid fieldId)
at Microsoft.Office.Workflow.Actions.OfficeTask.CloneWithFieldsAvailableByInternalName(Hashtable htOrig, Hashtable htDest)
at Microsoft.Office.Workflow.Actions.OfficeTask.HandleTimerSubscriptionChange(ActivityExecutionContext context, OneTaskProperties currentTask)
at Microsoft.Office.Workflow.Actions.OfficeTask.System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.QueueEventArgs>.OnEvent(Object sender, QueueEventArgs qea)
at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
ULS log may have following entries:
OWSTIMER.EXE (0x2268) 0x1BB0 SharePoint Foundation General 72nz Medium Videntityinfo::isFreshToken reported failure. a81a47e3-75eb-437c-991d-b0c89a84a525
OWSTIMER.EXE (0x2268) 0x1BB0 SharePoint Foundation General 8xfr Verbose PermissionMask check failed. asking for 0x00000001, have 0x00000000 a81a47e3-75eb-437c-991d-b0c89a84a525