Another cross-post from the blog of Ritesh Ranjan. Enjoy!
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:
- Was it working fine before?
- What all recent changes done to the CRM?
- Is this an upgraded environment from CRM 4.0 to 2011? If yes, did you follow the KB article: http://support.microsoft.com/kb/968520 to clean the AsyncOperationBase table prior to the upgrade? If not, please do it.
- What is the update rollup installed? It is always advisable to have the latest update rollup installed.
- What is the status of the Async service when workflows are failing?
- Are other Asyncservice jobs failing too? For more information on Async Service you can also refer: http://msdn.microsoft.com/en-us/library/gg328021.aspx .
- 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.
- Verify the basic configurations of CRM like:
- 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.
- Validate the account under which CRMAppPool is running. Verify the SPNs for CRM. You can also refer this article which talks about verifying SPNs:
- Are you able to access http://localhost/MSCRMServices/2007/CrmService.asmx without any authentication prompt? If not please add this URL under Local Intranet.
- You can also refer this link which talks about All System jobs are ‘waiting’ in CRM 4.0: http://blogs.msdn.com/b/crmindia/archive/2012/02/29/all-system-jobs-are-_2700_waiting_2700_-in-crm-4.0.aspx
- Once you are done with validation from step 8. Time to look at CRM Application.
- Login as CRM Administrator and navigate to SettingsàSystem Jobs.
- Look at the workflows and their status. Is it in Waiting, Failed, and Waiting for Resources………
- Double click on the workflow to open it. You would find a message there, analyze it.
- Click on Advance Find and follow the below mentioned steps to understand the error/issue better:
- Click on Edit Columns.
- Then on Add columns.
- Select Error Code, Message and Message Name.
- Click on Ok. It will add all the three columns to the view.
- Now you will be back on Advance Find Dialog box.
- In the Look For, select System Jobs and in Use Saved View, select New.
- In the first row make it something System Jobs–>Equals–>Workflow.
- Then Status Reason–>Equals–>In Progress, Failed, Pausing, Waiting, Waiting for Resources. Something like this:
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.