Dynamics CRM - Troubleshooting Workflows

Business processes are an integral part of any enterprise software application. A business process can be of two types: automated processes that rely solely on communication among applications based on a set of rules, and interactive processes that also rely on people to initiate and run the process, and to make the appropriate decisions during the running of the process.

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, a process enables you to create and manage your automated and interactive business processes. While the name has been changed to process, the entity that is used to implement a process is still called workflow. A Microsoft Dynamics CRM process provides many out-of-the-box components that business users and administrators can use to model their business processes. Microsoft Dynamics CRM also offers developers a mechanism to extend and customize the standard behavior of processes to achieve the functionality that their business applications require by allowing them to develop custom components.

Processes are built on top of Windows Workflow Foundation 4. For more information, see Windows Workflow Foundation.

In Microsoft Dynamics CRM 2011, workflows are now called processes. In addition to this change, there are two categories of processes:

  • Workflows. The automated or asynchronous processes that may require user input to start them. Further, these processes do not require user input to run them to completion. These processes run in the background.

 

  • Dialogs. The interactive or synchronous processes that require user input to start and run them to completion. When you start the dialog process, a wizard-like interface is presented to you so you can make appropriate selections to run the process.

Today in this blog post I am going to talk about troubleshooting workflows which would not only help in isolating the issue but also fixing it.

Let’s start with issue isolation:

  1. Was it working fine before?
  2. What all recent changes done to the CRM?
  3. Is this an upgraded environment from CRM 4.0 to 2011? If yes, did you follow the KB article: https://support.microsoft.com/kb/968520 to clean the AsyncOperationBase table prior to the upgrade? If not, please do it.
  4. What is the update rollup installed? It is always advisable to have the latest update rollup installed.
  5. What is the status of the Async service when workflows are failing?
  6. Are other Asyncservice jobs failing too? For more information on Async Service you can also refer: https://msdn.microsoft.com/en-us/library/gg328021.aspx .
  7. Do you get to see any error in the event log for Async service? What is that error? Search on that event error in your favorite search engine. I prefer Bing.
  8. Verify the basic configurations of CRM like:  

a. Match the registry entries on the CRM with the deployment. You can verify the settings at HKLM-->Software-->Microsoft-->MSCRM. Validate the keys – Configdb, CRM_Server_InstallDir, ServerUrl, website and websitepath. These values should match with the deployment.

b. Validate the account under which CRMAppPool is running. Verify the SPNs for CRM. You can also refer this article which talks about verifying SPNs: https://rc.crm.dynamics.com/rc/regcont/en_us/op/articles/configurespn.aspx / https://blogs.msdn.com/b/crm/archive/2009/08/06/configuring-service-principal-names.aspx

c. Are you able to access https://localhost/MSCRMServices/2007/CrmService.asmx without any authentication prompt? If not please add this URL under Local Intranet.

d. You can also refer this link which talks about All System jobs are 'waiting' in CRM 4.0: https://blogs.msdn.com/b/crmindia/archive/2012/02/29/all-system-jobs-are-_2700_waiting_2700_-in-crm-4.0.aspx

       9. Once you are done with validation from step 8. Time to look at CRM Application.

     10. Login as CRM Administrator and navigate to SettingsàSystem Jobs.

     11. Look at the workflows and their status. Is it in Waiting, Failed, and Waiting for Resources………

     12. Double click on the workflow to open it. You would find a message there, analyze it.

     13. Click on Advance Find and follow the below mentioned steps to understand the error/issue better:

I. Click on Edit Columns.

ii. Then on Add columns.

iii. Select Error Code, Message and Message Name.

iv. Click on Ok. It will add all the three columns to the view.

v. Now you will be back on Advance Find Dialog box.

vi. In the Look For, select System Jobs and in Use Saved View, select New.

vii. In the first row make it something System Jobs-->Equals-->Workflow.

viii. Then Status Reason-->Equals-->In Progress, Failed, Pausing, Waiting, Waiting for Resources. Something like this:

                   

 

ix. Advance Find Window should look like this:

                         

For better management perspective I would recommend saving this view which would help in future as well for managing workflows. You can click on Save as and then you should be able to save the view.

 

Based on the Error code, Message and Message Name, your troubleshooting would flow. Again search on these errors.

After all the above validations you can open a support ticket with Microsoft Dynamics CRM Team to assist on this issue further.

Hope this helps.

 

Regards,

Ritesh Ranjan – Microsoft Dynamics CRM Premier Field Engineer (EMEA – Norway)