none
Tricks for waiting less than one minute in Designer workflow RRS feed

  • Question

  • I need to use a "Pause for Duration"  type action but I only need to wait about 5 seconds while a document in a separate library is created.  I've read the limitations on Pause for Duration" (can't be less than a minute) and "Wait for Field Change in Current Item" (the item I would check is in a separate list).  Has anyone come up with a trick to make a workflow pause for a few seconds in Designer?
    Thursday, May 5, 2011 8:04 PM

Answers

  • Hi Eric,

    I tried pausing the workflow(SPD 2010) for less than 1 minute seems working for me.

    step1: Create a workflow variable called "delay_timer": Number

    setp2: Use Calculate action to get required delay/pause time and save in workflow variable "delay_timer" (eg: 1 divided by 20 = 3 seconds)

    step3: Pause workflow for "delay_timer" duration

    Regards,

    Madhu Premnathan

    • Proposed as answer by Dmitri Manushin Friday, August 30, 2013 8:55 AM
    • Marked as answer by SD Eric Friday, August 30, 2013 3:42 PM
    Tuesday, July 23, 2013 4:06 AM

All replies

  • I'm wondering why the workflow has to pause - if the workflow actually created the document in the other library then no pause is required because its a sequential workflow...
    Thursday, May 5, 2011 10:18 PM
  • I thought so too, but it didn't turn out that way in practice.  My workflow creates the document in one step then the next step copies the URL of the newly created doc into a list.  With no pause the URL returns blank.  With the pause the URL populates correctly.
    Thursday, May 5, 2011 10:53 PM
  • Hi,

    I know you can do this in Nintex workflow, i havent tried in SPD.. but youll get the logic.

     

    step 1 create the doc.

    step 2 loop until URL is not blank

      step 2.1 if url is blank continue to loop;

      step 2.2 if url is not blank stop to loop;

    step 3 do your list item update.


    Regards, Chris
    Friday, May 6, 2011 1:30 AM
  • The timer job runs 5 minutes by default.  You can set it to 1 minute but no less than that, and doing this change affects the whole web application.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, May 6, 2011 3:48 AM
  • Wierd - Does the workflow need to ask the document what its url is? Doesnt the workflow know the answer before it asks?

    I think if you're hell bent on this you need some kind of custom workflow, whether its nintex or something off codeplex or something you write that will behave better.

    Friday, May 6, 2011 4:52 AM
  • Hi,

    I've had the same issue with setting metadata in a workflow, I also had issues with the pause for duration action... My workaround was to use a second workflow initiated by on item change to acomplish the tasks after the pause. Obviously I don't know the details of your workflow, this could cause some looping issues, but again you can get round those with a loop control list.

    -Paul


    Paul Barton | SharePoint Consultant | MCITP SharePoint 2010 Administration | MCTS WSS 3.0 / MOSS 2007 | My Blog
    Friday, May 6, 2011 8:47 AM
  • @Chris:  SharePoint Designer Workflows don't allow looping, at least not with a single workflow.

    @Todd:  I believe SPD sends the create command but it doesn't wait for the process to be completed before moving to the next WF step.  This is why I'm looking for a way to stall the WF process for a few seconds. 

    I would know the URL 90% of the time, but it's possible that someone could enter the same document name twice, in which case a unique identifier is appended to the name. I could create a unique combination myself.  That's a potential solution.

    @Paul:  Yeah the 2nd workflow is what I resorted to as well.  But I'd prefer keeping the logic in a single WF for simplicity purposes.

    Friday, May 6, 2011 3:37 PM
  • where are you doing the check/assignment of the unique identifier, is this is the workflow? if so woudlnt you know the url/filename 100% of the time?


    Regards, Chris
    Friday, May 13, 2011 1:59 PM
  • Unfortunately no.  SharePoint's unique identifier comes in the form of a time stamp. 
    Tuesday, May 17, 2011 4:11 PM
  • does it have to be precise, what if you store the time in a variable and use that in the following actions instead of the live time
    Regards, Chris
    Thursday, May 19, 2011 11:02 AM
  • That might work in my particular example, so it's helpful.  Ultimately though a pause process that is reusable is what I'm looking for.
    Thursday, May 19, 2011 6:55 PM
  • Hi Eric,

    I tried pausing the workflow(SPD 2010) for less than 1 minute seems working for me.

    step1: Create a workflow variable called "delay_timer": Number

    setp2: Use Calculate action to get required delay/pause time and save in workflow variable "delay_timer" (eg: 1 divided by 20 = 3 seconds)

    step3: Pause workflow for "delay_timer" duration

    Regards,

    Madhu Premnathan

    • Proposed as answer by Dmitri Manushin Friday, August 30, 2013 8:55 AM
    • Marked as answer by SD Eric Friday, August 30, 2013 3:42 PM
    Tuesday, July 23, 2013 4:06 AM
  • I hadn't considered using a variable.  Thanks Madhu.
    Friday, August 30, 2013 3:43 PM
  • Hi

    After doing this, my workflow which used to run and process immediately seems to take 2-3mins longer to complete despite me setting  my delay timer to "1/60"   (1 second).  Is this a common issue?

    Thursday, March 6, 2014 5:51 PM
  • I think it is pretty common as that is what I am experiencing. When setting minute to 10s with a variable the workflow takes 4m 30s to complete, when setting pause to 1 minute the workflow takes 1m 40s.

    bizarre for sure.

    Thursday, October 15, 2015 2:11 PM