another technical blog...technically

Monday, September 8, 2014

OnTaskCreated and DelayActivity epic fail: a inconsistent farm story

Some weeks ago a SP2010 workflow was driving me mad. I got a parallel activity and i need to wait the OnTaskCreated event on every task i was creating.
Workflow started having some strange behaviours:
  • Workflow suspended states;
  • OnTaskCreated never firing on created tasks;
I was trying to figure out what to do, and i start thinking about a porkaround, why don't simulate tha bugged OnTaskCreated with a while and a DelayActivity?
A while condition checks if task id has a value, if not, wait 5 seconds and re-check until condition is met.
Why not? It's not so elegant but it works... don't laugh please, i almost save a workflow project with this workaround.
In Italy we say: "Misfortunes always come in twos"
Delay activity seemed not to work because it put the workflow to sleep... forever. This leads me to think there were problems on customer server... and so it was (http://support.microsoft.com/kb/2553031/en-us) , in other words: update to the most recent cumulative update and cross your fingers.
In my case, i continued to have issues, so i have to develop a parachute solution to make my PM happy. When we switched to pre-production environment everything works without parachutes.
What can i say? Two subsequential MS bugs in a row... Murphy's law rulez.
P.S.:
Who laughed reading this workaround?
Read this: http://support.microsoft.com/kb/970548
No more laughs ah?
written in: Milano, Italia

0 commenti:

Post a Comment

Because of a lot of SPAM about courses, I need to moderate all comments here.
I ensure you that I will answer whenever possible (if you are not a spammer).

Me, myself and I

My Photo
I'm just another IT guy sharing his knowledge with all of you out there.
Wanna know more?