Tuesday, September 18, 2012

SharePoint Workflow Timer Job Errors "Due to heavy load..."

Today i came across a annoying problem, when i added new item in List, my visual studio created workflow wasn't starting, it was giving below mentioned error :

"Due to heavy load, the latest workflow operation has been queued. It will attempt to resume at a later time"

This was pretty annoying, I tried workflow throttling through this nice blog but this didn't solve my problem, still i was getting this error as I dig further the real problem was in my Timer Job Service, so following was my solution.

1- Create a Event Receiver.
2- On Item Added Event, manually Start workflow by code as mentioned below

Dim myAssociation As SPWorkflowAssociation = elevatedList.WorkflowAssociations.GetAssociationByName(WorkflowName, Web.UICulture)

elevatedSite.WorkflowManager.StartWorkflow(LstItem, myAssociation, myAssociation.AssociationData)

that's it, manually starting workflow through event receiver solved my problem :)

No comments:

Post a Comment