Background Workflows Fail immediately

Once we upgraded our CE from version 8.2 On-prem to 9.1 On-prem, our existing Background Workflows fail immediately when triggered with error “Exception: Event failed due to an exception”. We tried stopping and restarting the MS Asynchronous Processing Service on the application server. Ideas?

Hi Allison. I don’t have much experience with On-prem environments, but I do have some experience with 8.2 and 9.1 workflows and debugging the error that is going on. When you encounter the system jobs that failed, have you opened the failed job and scrolled down to the bottom of the log? There is a details section that usually includes some sort of tracing log in Dynamics-ese.

Also, have you tried turning off the auto-delete of completed system jobs for your background workflows? I find that turning this off during a debugging session helps me tremendously because then I can go into the workflow and see what steps were executed and what failed.

As a last resort, and this isn’t a fun thing, you might have to rebuild the workflows in their entirety, or at least partially. I have had a problem recently where certain classic workflow steps are encountering regular errors. When I deactivate them, I get an “unresolved requirement” alert in them. My only solution thus far has been to rebuild the section that has the error or try debugging it. The most important thing I have found, is to do the debugging in a sandbox environment so production doesn’t go down. The workflow may sometimes succeed even in its error state and we don’t want to lose what value we’ve got.

Happy to go into more detail if that would be of assistance. If you can provide some screenshots of your error logs, the error details on the errored system job, and/or a deactivated version of the workflow in a sandbox environment that would help tremendously. I know you were asking for help today about this at Dynamics Con Live, so you might no longer need assistance. Regardless, I hope this helps you in some way!!

Jonathan

1 Like

Thanks for the reply, @Jonathan !
When I go to look at the System Job Details, I see the message “Event Failed due to an exception” message (see attached screenshot).
I have tried rebuilding a workflow and the rebuilt workflow fails with the same error.

ExceptionEventfailed

@Allison_Briden Have you gone to the edit workflow window and taken a look at the process sessions there? This might provide some extra guidance into what is happening.

The Process Sessions reveal no detail. We ran Traces and couldn’t find any reason there, either.
We submitted a Ticket with Microsoft and they haven’t figured out a solution yet.
Any other ideas are welcome!

This sounds silly… but have you tried changing something, saving it, publishing it and triggering it again? Then, remove your change, save it, publish it?

Also, was anything changed on the server that runs Dynamics?

Thank you, Heidi; that is a good suggestion.

I did try recreating some of the Background workflows from scratch and they still fail.

Real-time workflows and Dialogs succeed.

We engaged Microsoft last week; they had us check server settings, and ran a couple traces but they don’t have a resolution yet. :\

Also, on the application servers; I think the only thing that changed between 8.2 and 9.1 is the server names; we changed them from ****d to ****dev, ****t to ****test, and ****s to ****stg.

Thanks again!

~WRD0001.jpg

Hi @Allison_Briden,
Few customers faced issues with workflows or background process when the upgrade from 8.2 to 9.1. Their issues got fixed with further upgrade 9.1.4.31.
Let me know if that worked.

Thanks, @RYarramasu.
We installed a version later than September 2021 9.1.4.31.
We initially installed 9.1.14.17 from November 2022 and updated to 9.1.16.20 from February 2023.