version 20120714

Rating: No reviews yet
Downloads: 804
Released: Jul 14, 2012
Updated: Jul 14, 2012 by fangdahai
Dev status: Beta Help Icon

Recommended Download

Application EFWorkflowTimer.rar
application, 46K, uploaded Jul 14, 2012 - 804 downloads

Release Notes

trying to fix intermittent, occasional exception when running list workflow.

--------------- replaced -------------------------

site.WorkflowManager.StartWorkflow(itemTarget, objWorkflowAssociation, objWorkflowAssociation.AssociationData, SPWorkflowRunOptions.Synchronous);

--------------- by -------------------------

try
{
site.WorkflowManager.StartWorkflow(itemTarget, objWorkflowAssociation, objWorkflowAssociation.AssociationData, SPWorkflowRunOptions.Synchronous);
}
catch (ArgumentNullException WfEx)
{
logWorkflowTimerHistory(objSPWebRoot, null, string.Format(@"ArgumentNullException.Message={0}", WfEx.Message));
throw;
}
catch (ArgumentException WfEx)
{
logWorkflowTimerHistory(objSPWebRoot, null, string.Format(@"ArgumentException.Message={0}", WfEx.Message));
throw;
}
catch (UnauthorizedAccessException WfEx)
{
logWorkflowTimerHistory(objSPWebRoot, null, string.Format(@"UnauthorizedAccessException.Message={0}", WfEx.Message));
throw;
}
catch (SPException WfEx)
{
logWorkflowTimerHistory(objSPWebRoot, null, string.Format(@"The item is currently locked due to a short term lock or check-out. List Name={0}, Item ID={1}",
itemTarget.ParentList.Title, itemTarget.ID));
logWorkflowTimerHistory(objSPWebRoot, null, string.Format(@"SPException.Message={0}", WfEx.Message));
for (int i = 0; i < 3; i++)
{
System.Threading.Thread.Sleep(30000);
try
{
site.WorkflowManager.StartWorkflow(itemTarget, objWorkflowAssociation, objWorkflowAssociation.AssociationData, SPWorkflowRunOptions.Synchronous);
}
catch (SPException WfEx2)
{
continue;
}
break;
}
}

Reviews for this release

No reviews yet for this release.