locked
Workflow Delay Activity vs Timer Service RRS feed

  • Question

  • HI Folks,

    One of the requirements i have come cross is as follows.

    When a new item is submitted to a list , there needs to be notifications sent to various users and tasks to be created.

    The notifications to be sent to users after 20 Days, 30 days and 100 days from the day of the item creation. and task to be created to a user on the 50th day.

    Am looking at the options of using a delay activity or timer service.

    Can any let me know the Advantages and disadvantages of using delay activity and timer service.

    How does a delay activity work. how is it linked with the SPTimerService.

    Any suggestions will be much appreciated .

    Thanks in Advance

     


    Sreeharsha Alagani | MCTS Sharepoint 2010 | Linkedin | Blog
    Monday, July 4, 2011 5:11 PM

Answers

  • In my projects, I prefer to use custom alert reminder based on SharePoint Timer Job.

    General SharePoint Timer Job Advantage is I can re-configure or stop reminders at any moment.

    >> How does a delay activity work. how is it linked with the SPTimerService.

    Because of their nature, workflows do not process in the way that "typical" applications do. Instead, they have both a synchronous and an asynchronous nature. When they begin running, whether started manually by a user or programmatically by another process, they run synchronously. In other words, the initiating user or process waits until the initial steps of the workflow finish processing before continuing.

    This synchronous processing continues until the first "commit point" is reached in the workflow. Although a full discussion of operations batching and commit points is beyond the scope of this paper (see Additional Resources for links to other resources on this topic), suffice it to say that any of the following activities in a workflow signal a commit point:

    • Any of the Delay activities (Delay, DelayFor, or DelayUntil)

    • Any of the Onxxx activities, such as OnTaskCreated, OnTaskChanged, or OnWorkflowItemChanged

    When the commit point is reached, any workflow events that are queued because of heavy workflow load (see the next section) or delay activities are processed in background jobs. In other words, all remaining work completed by the workflow is handled as discrete tasks that are run as SPTimer jobs. These jobs run independently of other processes that are running in the SharePoint environment.

    More info here

     


    Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010
    Wednesday, July 6, 2011 7:08 AM

All replies

  • Given this "MCTS Sharepoint 2010 " in your sig, are you asking about SP 2010 or SP 2007 ?

     

    Moderator


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Monday, July 4, 2011 5:58 PM
  • Mike, am not sure if it really has anything to do with the version.  I would like to see the suggestions of the people who have already used the Delay activity over timer service. 

    Your experience might help me take a better decision. 

     

     


    Sreeharsha Alagani | MCTS Sharepoint 2010 | Linkedin | Blog
    Tuesday, July 5, 2011 5:01 PM
  • You haven't answered the question.

    Are you asking about SP 2007 or SP 2010?

    This forum is NOT for any question about SP 2010 - those go only to SP 2010 forums.

    If you want to know about both SP 2007 and SP 2010 then post the question to a SP 2007 forum asking about SP 2007 and to a SP 2010 forum asking about SP 2010.

     

    Here for now we will all assume that you are only interested in SP 2007 answers. If I see any posts about SP 2010 or with links about SP 2010 I will delete them.

    If you don't want that, say clearly that you are asking about SP 2010 and I will move the thread to a suitable SP 2010 forum.

     

    Mike


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Wednesday, July 6, 2011 5:43 AM
  • In my projects, I prefer to use custom alert reminder based on SharePoint Timer Job.

    General SharePoint Timer Job Advantage is I can re-configure or stop reminders at any moment.

    >> How does a delay activity work. how is it linked with the SPTimerService.

    Because of their nature, workflows do not process in the way that "typical" applications do. Instead, they have both a synchronous and an asynchronous nature. When they begin running, whether started manually by a user or programmatically by another process, they run synchronously. In other words, the initiating user or process waits until the initial steps of the workflow finish processing before continuing.

    This synchronous processing continues until the first "commit point" is reached in the workflow. Although a full discussion of operations batching and commit points is beyond the scope of this paper (see Additional Resources for links to other resources on this topic), suffice it to say that any of the following activities in a workflow signal a commit point:

    • Any of the Delay activities (Delay, DelayFor, or DelayUntil)

    • Any of the Onxxx activities, such as OnTaskCreated, OnTaskChanged, or OnWorkflowItemChanged

    When the commit point is reached, any workflow events that are queued because of heavy workflow load (see the next section) or delay activities are processed in background jobs. In other words, all remaining work completed by the workflow is handled as discrete tasks that are run as SPTimer jobs. These jobs run independently of other processes that are running in the SharePoint environment.

    More info here

     


    Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010
    Wednesday, July 6, 2011 7:08 AM
  • I have now deleted a post that refered to a SP 2010 article.

    Guys, I warned you in my post above. This is a pre-SP 2010 forum. Articles about SP 2010 will always be off-topic here.

     

    Mike


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Friday, July 8, 2011 6:24 AM