web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Failed Workflow showing Status as 'Waiting'

(0) ShareShare
ReportReport
Posted on by 2,601

I'm looking into detecting and sending alerts for failed workflows.

To create a failed workflow to test my alerts I've created a workflow that creates a record in a custom entity on update of a Lead.  I then deleted the custom entity in SQL but it didn't work as I expected.

When I updated a Lead the workflow in System Jobs has a Status Reason of 'Waiting'.  Opening the detail shows that a SQL Server error occurred.

My question is why didn't the workflow Fail?  Does CRM retry for a limited time, or x number of times?

Thanks 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Abhishek_Sinha Profile Picture
    665 on at

    hi,

    Please  find below steps and url

    There are 2 reasons why a workflow instance can be in a waiting state:

    1.If a step in the workflow has thrown an error. In this scenario, if you Resume the instance, then it will retry the step that failed

    2.It has hit a Wait condition, and is waiting for this to become. In this scenario, there is no useful concept of resuming the instance, as it will continue when the wait condition is met.

    community.dynamics.com/.../183909

  • Suggested answer
    Abhishek_Sinha Profile Picture
    665 on at

    hi,

    Also find below link.

    blogs.msdn.microsoft.com/.../dynamics-crm-troubleshooting-workflows

  • CU21020959-0 Profile Picture
    2,601 on at

    Thanks for your reply.  

    So my two 'failed' workflows are still showing as 'Waiting' and are retrying every 30 mins or so.  Will the status of these change to 'Failed' at some point.

    I'm creating alerts for these workflows.  Does this mean that if a workflow is 'Waiting' for a period of time, I should flag it?  Or should I wait until it automatically changes to 'Failed?

  • Abhishek_Sinha Profile Picture
    665 on at

    Hi,

    I had written workflow earlier which waited for resource  and  if it didn't get after  sometime it failed.  Please find below comments and blog

    AFAIK the 'Waiting for resources' status is used whilst the Async Server has not yet picked up the Async job for processing. Once the Async task has been picked up and started it would show 'In Progress'. So if the Async task was waiting on a database lock on an entity record it would show as 'In Progress'.

    Because there are only a finite number of threads available to the Async Server, then those pending other tasks would then be left in the 'Waiting for Resources' - but those tasks are the not actually the ones waiting for the entity record database lock

    http://community.dynamics.com/crm/b/crmbacklog/archive/2015/03/09/transactions-in-dynamics-crm-and-waiting-for-resources-process-status

  • CU21020959-0 Profile Picture
    2,601 on at

    The two workflows which I expect to fail are still in 'Waiting' State (not "Waiting for Resources") and are retrying every 30 mins or so.  I'm expecting them to stop at some point and actually "Fail"?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans