SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Pause or delay activities error on MOSS 2007
Share'ing my Points

Turkish Blog Site

Paylaştığım Noktalar

I wanted to pause a workflow for some time in a workflow for MOSS 2007. The activity pauses the workflow but the next activity is not executed. After some time, the workflow stops with an "Unhandled Exception" error. I had created the workflow with SharePoint designer and used the pause activities, and I thought that it may be a bug of SharePoint designer, but I also tried to pause the workflow with Visual Studio 2005's delay activities, the result was the same.

After some googling, I have found that this was a bug of .Net Framework 3.0, and there is a hotfix released at this location. The title of the hotfix is "A Microsoft Windows Workflow Foundation timer does not resume correctly after reloading a workflow.".

I get crazy when I try for hours to solve something, and find a bug as the cause of the problem. But, life is going on Stick out tongue.


Posted 07-16-2007 3:38 AM by Nezih Tınas

Comments

Kishore wrote re: Pause or delay activities error on MOSS 2007
on 07-18-2007 7:09 AM

Great work yaaar.

could u help in solving a problem which Iam facing?

I created a custom list in sharepoint site and created a workflow for that list(workflow runs automatically when a new list is created).It's functioning properly when I logged in as site administrator.

               If I log in with a member username&password workflow is not getting completed.

Nezih Tınas wrote re: Pause or delay activities error on MOSS 2007
on 07-18-2007 7:41 AM

Can you tell me what the workflow is about? Did you check the appropriate permissions needed for the user involving in the workflow?

thanks...

Kishore wrote re: Pause or delay activities error on MOSS 2007
on 07-26-2007 1:17 AM

The workflow is about sending a mail when a new list is created.

          Member is having cotribute rights to the site.

Thanks for ur reply.

Nezih Tınas wrote re: Pause or delay activities error on MOSS 2007
on 07-26-2007 4:23 AM

In MOSS 2007, workflows can only be used with list items, and the job you want to accomplish here is not a workflow actually. There are many things to do this. The easiest one is to create a timer job to check the updates on a site on a scheduled basis.

Marta wrote re: Pause or delay activities error on MOSS 2007
on 08-06-2007 2:42 PM

Hi, did the hotfix fixed your problem? I have the delay problem even after applying the hotfix.

Eric wrote re: Pause or delay activities error on MOSS 2007
on 08-07-2007 10:04 AM

All, I have the same issue as Marta. The problem persists after applying the patch. When I look at the Content Database I can find the workflow entry in table "ScheduledWorkItems" with correct entries in columns "created" and "DeliveryDate" - but the workflow does not proceed after the pausing interval has ended and stays "in progress" forever.

Any ideas what I could do?

Regards, Eric

Jonathan K .Herschel wrote re: Pause or delay activities error on MOSS 2007
on 08-15-2007 1:53 PM

I am having the same problem as Eric and Marta.  I applied the hotfix, and i am still having problems where the delays are NOT waking up.

Some ?'s I am thinking.  The hotfix says it if for windows 20003 server SP 1, but I have SP2.  But I had the problem before the hotfix.  Maybe the fix doesn't work on SP2?

Also, I am testing this on a Virtual Server, not sure if this could be why, but I would love to get to the bottom of this...

Regards,

Jon

Jonathan K. Herschel wrote re: Pause or delay activities error on MOSS 2007
on 08-16-2007 7:36 AM

From visiting a few forums, I have 5 other developers with the same problem.  I am callling MS today to report the problem.

-Jon

Jonathan K. Herschel wrote re: Pause or delay activities error on MOSS 2007
on 08-16-2007 1:38 PM

So far, I’ve gotten feedback from 7 other developers (in forums) who are having the same problem where this update (Hotfix) is not working correctly for the Workflow delay activities, specifically Windows Server 2003 SP2 (anybody have problems on different platform?)

So, I called MS support this morning and they transferred me to .NET support team.  Apparently it is a Microsoft .NET Framework 3.0 issue (Artical ID: 932394).  They took down my information and informed me that due to the overwhelming popularity of SharePoint, that it would take 10-20 days until they could get back to me.  OY!

So, I am going to look into other options /checks such as:

Uninstalling .net 3.0

creating a SP Designer workflow to see if I can something to work until the delay is fixed. (maybe crack it open to see what delay(s) it uses...)

Install VS 2005 SP1

find an alternative to delay (maybe System.Timer, etc..).

One person suggested to make sure your timezone is set on SP and SQL server, but I checked that and all is good.

I will keep everyone updated if I find anything, but until then, we're in a jam.

Regards,

Jonathan K. Herschel

Nezih Tınas wrote re: Pause or delay activities error on MOSS 2007
on 08-16-2007 2:10 PM

Great update Jonathan, thanks a lot...

Marta wrote re: Pause or delay activities error on MOSS 2007
on 08-17-2007 9:42 AM

Forget about installing SP1. I had the problem with SP1 and I installed the fix and it did not work. Then I installed SP 2 and reinstalled the fix and still it did not work.

I opened a ticked as well with MS ...

Nezih Tınas wrote re: Pause or delay activities error on MOSS 2007
on 08-17-2007 9:51 AM

The funny thing is, I have tried that fix and it solved my problem on my test server, so that's why I have posted this info. It had SP1 installed with the latest fixes. I installed this fix and the problem was gone. We have to wait for the answer from MS. Can you share it with us, Marta and Jonathan?

Marta wrote re: Pause or delay activities error on MOSS 2007
on 08-30-2007 4:52 PM

visit this link for the solution, it worked for me (SP2)

forums.microsoft.com/.../showpost.aspx

Jonathan K. Herschel wrote re: Pause or delay activities error on MOSS 2007
on 09-08-2007 8:17 AM

If you visit the link Marta left, you will see MS response to my case and that this is a known issue and they are working on it.

Here it is:

All,

Good News (in fact that it has a workaround).

I spoke with someone from MS regarding this issue and he sent the below follow-up email to me today.

"I have been able to set up some local tests on my machine to narrow down the problem and have had a talk about this with the product group as well. The issue happens if the Delay is inside a replicator, there are many delays running in parallel, or if DelayFor is the last activity in a workflow, using just a delay activity in a workflow works fine.

The product group is aware of these issues and is looking into all these scenarios. As of right now I [do] not have any time lines for a fix or an update, it could take a while to have a public fix available. I am the owner of this bug [and] will keep monitoring this issue and watch for updates..."

If you can tweak your setup so that it doesn't fall in to the above scenarios, it may work, otherwise, I ended up using a regular Delay Activity which has the following settings: TimeoutDuration which is in the format of DD:HH:MM:CC (The CC is seconds b/c the SS caused a smiley ).  So, the following would be 50 days, 40 hours, 30 minutes and 00 seconds: 50.40:30:00.

Instead of using the DelayUntil, try using a regular delay.  I took the DATETIME of today and subtracted it from DATETIME of 'your date' and converted it into Days,Hours,Minutes, & Seconds.

Example:

DateTime dtReminder1 = Convert.ToDateTime(workflowProperties.Item["Reminder 1 Date"]); // gets datetime from a field named 'Reminder 1 Date'

TimeSpan tsDiff = dtReminder1.Subtract(dtToday); // subtract today from 'Reminder 1 Date'

Double dblDays = tsDiff.Days; // get days

Double dbltemp = tsDiff.Hours; // store total hours into temp variable

Double dblHours = dbltemp % 24; // extract days (24 hours/day) from tsDiff, so you are left with just the hours

Double dbltemp2 = tsDiff.Minutes; // store total minutes into temp2 variable

Double dblMinutes = dbtemp2 % 60 // extract minutes (60 mins/hour) from tsDiff, so you are left with just the minutes

You are left with the following:

dblDays = # days, dlbHours = # hours, dlbMinutes = # of minutes.

Instead of using the DelayFor, try using the regular delay.  This is allready set to use Hours Minutes and SEconds, so instead of using three settings (days, hours, minutes), convert into one string 00.00:00:00.

Hope this helps!

Jonathan K. Herschel

Saurabh wrote re: Pause or delay activities error on MOSS 2007
on 09-30-2008 8:43 AM

Dear All,

     I am creating a reminder workflow using SharePoint Designer, and when I  use "Pause Until Date" activity. It doesn't resume and Workflow status does not change from "In Progress".

(i.e. it displays "Pausing for 0 minutes" only, under Workflow History but it doesn't take any specified action).

I have done some googling for that in last 4 days, and from there I had got a hot fix – KB 932394 and installed it but still I am in same trouble with “Pause Until Date” Activity.

I have also changed “job-workflow” time duration using stsadm command from 5 minutes to 1 minute as below:

stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 1 minutes between 0 and 59" -url http://localhost

but found same problem.

What should I do for this?

Please suggest me why "Pause Until Date" doesn't resume and Workflow status does not change from "In Progress" in my workflow.

Thank you very much,

Saurabh Kumar Singh

Uday Joshi wrote re: Pause or delay activities error on MOSS 2007
on 11-19-2008 4:16 AM

Dear Saurabh,

Did you get any solution on this as I am also stuck badly with the pause until date and the pause for duration activites even after applying the pathces, infrastructure updates and all the hotfixes , kindly respond.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.