locked
Is there any impact on using API TIMER function instead of Delay Activity in Workflow? RRS feed

  • Question

  • Hi,

    WINDOWS SERVER 2003 R2 - SP2

    I am quite peaved that the Delay Activity is as ropey as an Indian Snake Ladder.

    I have heard nothing but concern over using the DELAY Activity even after the supposed patch install with SP2.

    I know you can use Timer Jobs, but I was wondering if using a the API TIMER function would be OK on the Workflow (Single Thread)?

    I know you can't use Thread.Sleep as this would lock up Workflow Interfacing.

    I need to wait for a specific date before sending an email and continuing with workflow (VS2008).

    Interested to know your input.

    Thanks.

    John. 

     

    Tuesday, February 22, 2011 5:33 PM

Answers

  • Hi Patrick,

    Thanks for that.

    I ended up writing a separate feature using a Timer Job. This Timer Job essentially just checks the list on a daily basis for any items that have a specific status before sending out an email that a task should be complete. It also writes an actvity log.

    As for interaction with workflows I have decided to keep the two seperate and make debugging easier i.e. no interaction.

    Thanks again for your help.

    John.

    Friday, March 4, 2011 12:07 PM

All replies

  • Hi, John

     

    Thank you for your question.

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thank you for your understanding and support.

     

    Best Regards,

    Aaron

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com

    Wednesday, February 23, 2011 9:47 AM
  • Hi Aaron,

    Nice Pun ;)

    I did try the System.Timers.Timer. This WF Thread cannot be used to Marshall Timer - correct me if I'm wrong.

    Systems.Timers.Timer can't be marshalled, but it is fine for sending an email after a specific period and writing an activity log as I am doing from Workflow Code. (I have it running for 2 days - so will be interesting to see if OK - but it should work fine).

    Two days later - not looking good. No emails yet....so this approach sux.

    John.

    Thursday, February 24, 2011 8:53 AM
  • John,

    Given that you want to have a delay in a workflow to send email, while a Timer Job could be created to do many things, trying to integrate that with a workflow that would still need to dehydrate/hydrate may prove difficult.  As you pointed out, you should have at the least SP2 installed, and even then, delay activities will not fire at the exact moment you may expect them to due to many different situations such as yrou Timer Interval and how may concurrent workflows that may be processed by W3WP or OWSTIMER.  The delay will fire, but you need to give it enough time to process once it is re-hydrated.

    Not sure if this helps, but I would continue to look at using a Delay activity instead of a Timer Job to send email via a paused workflow.

     


    Patrick Cole - MSFT
    Thursday, March 3, 2011 11:32 PM
  • Hi Patrick,

    Thanks for that.

    I ended up writing a separate feature using a Timer Job. This Timer Job essentially just checks the list on a daily basis for any items that have a specific status before sending out an email that a task should be complete. It also writes an actvity log.

    As for interaction with workflows I have decided to keep the two seperate and make debugging easier i.e. no interaction.

    Thanks again for your help.

    John.

    Friday, March 4, 2011 12:07 PM
  • John,

    Totally valid solution there, thanks for posting what you finally came up with.

     


    Patrick Cole - MSFT
    Wednesday, March 9, 2011 7:20 PM