Car insurance

Workflow OnTaskChanged does not fire after a while

// October 30th, 2008 // Sharepoint

Wow, it really takes me a long time to just blog! Everyday i go to work, i fire up some version of WSS or MOSS somewhere at some client, and everyday i come accross interesting topics/problems to blog about. Except, i never do. I suppose i could play the im busy card, but thats not quite warranted since you need to find time.

An interesting little problem i came across yesterday was the following:

Im busy developing a custom “expense claim” workflow for a client for MOSS. Using Visual Studio 2008 i was pretty proud of myself for developing a multistage approval workflow which also logged all items to a SQL table, which reported through a dataview in MOSS. Due to numerous debugging items, i had deployed the workflow a number of times from Visual Studio using the deploy button and attached it to the w3wp.exe process so i could debug. A number of times the workflow errored out and i would just stop debugging.

Suddenly on random attempts to debug, the OnTaskChanged stopped firing. When i changed the task it would not debug nor would the workflow run. It would just hang. I searched all blogs and solutions but nothing was quite what i needed.

THE SOLUTION

After much searching i found this blog which allowed me to uninstall the workflow and reinstall completely. I made a little uninstall.bat file which looks like this:
<br /> @SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"</p> <p>@echo off</p> <p>%STSADM% -o deactivatefeature -filename {name of feature}\feature.xml -url http://yourportal.com -force</p> <p>%STSADM% -o uninstallfeature -filename {name of feature}\feature.xml</p> <p>IISRESET<br />
Essentially everytime i was finished with the debugging process and i was ready to make changes and redeploy i would run this bat file. All it does is completely remove the “feature” or workflow and hit an IISRESET for safety.

Also remember to remove the assembly from the GAC (c:\windows\assemblies) and then redeploy. This ends all running instances of the workflow and starts fresh.

I can like it: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • muti
  • Digg
  • del.icio.us
  • DZone
  • Fark
  • Fleck
  • Furl
  • Technorati

2 Responses to “Workflow OnTaskChanged does not fire after a while”

  1. Timmy says:

    I hear ya Court…
    So many things to blog about, so little time…
    keep the discipline matey… its a great post.

  2. hector says:

    how use this solution?? thanks

Leave a Reply