January 30, 2014
Real-Time Workflows in Dynamics CRM 2013
Microsoft Dynamics CRM 2013 includes plenty of new features to close gaps and further chase down the elusive codeless business logic configuration. One of those features I would like to highlight is the powerful new ability to now schedule your workflows to run Synchronously, in real-time. If you’re new to CRM the gravity of this might not be immediately apparent. If you’re a CRM veteran… I’ll give you a minute to allow your heart rate to settle… ok? let us move on.
In previous versions of Dynamics CRM if you wanted to execute a piece of event-driven business logic in real-time you likely found yourself rounding up a C# developer to add a Synchronous plugin to the deployment. This would be due, in part, to the fact that previous implementations of the user-friendly point-and-click CRM workflow engine relied on the Asynchronous processing service to execute the provided rules, meaning that, any logic contained in a workflow would execute in a very lazy fashion, as server resources became available (and not a moment sooner). Users relying on these workflow actions would need to be trained to have patience while the system prioritizes and processes the requests. In some instances this waiting period may cause confusion or could be inconvenient for users who would be waiting for values to calculate of for follow-up activities to be created so that they may continue their daily tasks.
Now in Dynamics CRM 2013 configuring workflows to run in real-time removes this waiting period and prioritizes that workflow logic above all other actions. The obvious benefit of this is that we can now use a point-and-click editor to create real-time event-driven business logic without the need for custom code development. However, it is imperative to use discretion when setting workflows to run in real-time. Synchronous workflow executions will directly impact the performance of your web server as they will execute under the same processes used to serve up your web pages. The beauty of a traditional Asynchronous (Background) workflow is that the work is delegated to a dedicated, highly saleable, process that will not affect the performance of your website. Only set workflows to run in real-time when there is a real need for that type of immediate processing, the default best practice is still to allow the Asynchronous processing service to run your workflow logic in the background. Now let’s take a look at the implementation and how we can secure this new feature to ensure a healthy CRM.
When creating a new workflow you may elect to set it as a real-time workflow during the initial setup by deselecting the Run this workflow in the background setting.
Opening an existing workflow provides the option to switch between Background processing and Real-time processing through the Convert button on the ribbon:
The ability to Activate a real-time workflow can be controlled through a user’s Security Role.
***Administrators, it is important to restrict this ability to only those users who understand the consequences of running a real-time workflow.
Setting the Activate Real-Time Processes privilege to no access will restrict your user’s from creating these types of workflows.
Users set up this way will not be able to Activate real-time workflows and, if they attempt to, will receive the following message:
Wrapping it up…
There are situations that will be ideal for this new feature. Setting default fields while creating an Account comes to mind. We want those fields set in real-time so that when a user creates an account they can immediately start working with it and know they have the full data set to work with. However, in most cases, you will want to err on the side of caution and configure your workflows as traditional background processes. This frees the load from your webserver and let’s the more efficient and saleable Asynchronous Processing Service do the heavy lifting.
Noah Schultz is a Pittsburgh based, certified, Microsoft Dynamics CRM specialist with years of practical real-world consulting experience covering many facets of CRM delivery including project requirements, design, delivery, development, implementation, and continuous improvement. Noah is a recovering developer bringing a unique blend of technical and functional skills to his CRM projects. Connect with Noah at Customer Effective, LinkedIn, on Twitter, or in the Comments below.
TrackBack URL for this entry:
Listed below are links to weblogs that reference Real-Time Workflows in Dynamics CRM 2013: