Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Workflow Pause function

Status
Not open for further replies.

SurvivorTiger

Programmer
Jul 9, 2002
265
0
0
US
Hi everyone,

I'm trying to use the workflow pause function but it's not working for some reason. I have it set up to pause for just 1 minute, but the workflow stays in "in progress" for ever and status says "pausing for 1 minute"...anyones has any ideas?

Thanks
 
STiger,
I am having the same problem. I assume you are using the Delay/DelayFor/DelayUntil activities, correct? There is a hotfix for this issue here:
This hotfix is suppose to fix problems with delay, delayUntil, and delayFor activities.

Unfortunately, I installed the hotfix and am still having a problem where the Delay activities do not 'wake' up. They just sit there 'pausing for x minutes' past the time when they should be exiting pause mode. I am using them in a Sequencial Workflow, but also saw this in a State Machine WF.

Its worth a shot.

Regards,
Jonathan K. Herschel
 
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
 
Wow that's ridiculous...I also installed the hotfix and still experiencing the same problem...it's times like this that i give up all hope for Microsoft...grrrr

But thanks for trying...hopefully they'll get back to you with some good news.
 
Good News.

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:
Code:
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top