locked
Workflow's delay start causing problem RRS feed

  • Question

  • Hi,

    I have a workflow running on Incident which sends emails when CurrentStatus is changed to 'In Process'. Workflow checks for Incident's CurrentStatus, if CurrentStatus is equal to 'In Process' then sends an email out to contact. Otherwise end the process. 

    Because of some reason there is delay in workflow execution, sometimes they takes 2 minute to start.

    If we change the CurrentStatus to 'Awaiting Details', an instance of workflow will trigger (But there is a delay). Now immediately after it, if we change the CurrentStatus again to 'In Process' it will trigger another instance of workflow. 

    As I mentioned there is a delay in all processes, both instances will kick in at the same time and will check the current status which is 'In Process'. So both processes will send same email message and user will receive same email twice. 

    It might be infrastructure issue but I want to investigate the actual problem so that I can report to the responsible team.

    Can anyone please suggest me what could be the reason in delay.

    Thanks in Advance.

    Friday, May 9, 2014 2:45 PM

All replies

  • The delay in asynchronous workflow execution is built-in and by design in CRM.  There are ways to configure CRM to shorten the delay, but I do not think that will address your basic problem.  If this is CRM 2013 you could set the workflow to run synchronously.  Or you could include the function on a synchronous plugin.
    • Edited by JBlaeske Monday, May 12, 2014 12:51 PM
    Monday, May 12, 2014 12:50 PM
  • Thanks JBlaeske, 

    I am working on CRM 2011. Sometime workflows kicks in immidiatly but sometimes they takes 2 minutes to kick in. Delay is always not same. 

    Monday, May 12, 2014 1:18 PM
  • This  Whitepaper covers how performance might be improved for workflows.  The key in your case would be setting the AsyncSelectInterval value to 1.  However I would still urge you to consider doing this from a synchronous plug-in, unless you have concerns about bulk operations being performed on the Incident entity.
    • Edited by JBlaeske Monday, May 12, 2014 1:31 PM
    Monday, May 12, 2014 1:31 PM