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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow retry (If failed due SQL error) + make sure it's executed each time. Best practice?

(0) ShareShare
ReportReport
Posted on by 886

Hi,

We are struggling with some SQL errors. We are in the process of finding out why. But I have a certain feeling that it will newer be solved completely.

So basically I have some workflows that I want to make sure are running and completed 100% of the times they are started (On the same entity). Before I had a lot of workflows that will run on created, on change etc. I have a feeling they could easily conflict and put a lot of load on the server. So I'm moving more and more away from this approach.

Instead I have created a "startup" workflow on an entity. This is the only workflow that will run on create. Initially I have a stage where I can delay it xx min etc etc. After this I have several stages, where child workflows is started.

In the end of my "startup" workflow I will set a flag "Pre-run workflow completed" = "Yes".

But then I think - what if my startup workflow fails for some reason, or is not running to the end. I then have a lot of child workflows that are not started. I then created another workflow that will also start on creation. I set a timeout of 1 hour, and after 1 hour it will check if the "startup" workflow has the value "Pre-run workflow completed" = "Yes". If not it will restart the "startup" workflow.

Is this a good approach, or is there other ways of doing it?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Workflow retry (If failed due SQL error) + make sure it's executed each time. Best practice?

    If you have CRM on-premise  you can write a little console application that check status of workflows and re-run it. Simply schedule application in Task Scheduler. Main benefit: your "startup" workflow can also fail because of sql error, application runs regardless of sql server and you can do more specific checks with app.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans