Monday, February 29, 2016

Real-Time Workflows in Microsoft Dynamics CRM 2013

Real-Time Workflows in Microsoft Dynamics® CRM 2013


http://www.wipfli.com/BlogPost_MCRM_Blog_011315_RealTimeWorkflows.aspx
 
One of the best new features in Dynamics CRM 2013 is real-time (syncronous) workflows.
 
Prior to CRM 2013, all workflows ran asynchronous, i.e., in the background.  Because of this, if a workflow made changes to data, a user would have to refresh his or her screen to see those changes.  An example of this is a workflow that creates a task; in order to see this newly created activity, the user would either have to refresh the screen or leave the form and return.  Additionally, workflows were only triggered after events occurred.  This is still the case if creating an asynchronous workflow, but sychronous workflows can be triggered prior to some events occurring.
 
Having the ability to immediately see results on the screen, or to trigger workflow prior to events has an impact on the need for Web Resources (JavaScript) and Plug-ins (C#).  Below are directions on how to create a real-time workflow, as well as examples of where this new functionality reduces these type of custom development.
 

How to Create a Real-time Workflow

 
Creating new process workflow
 
General details of new workflow
 
**Please note: Below are close up views of the three steps from the above example.**
 
New workflow close up 1
 
New workflow close up 2
 
New workflow close up 3
 
 

New “Options for Automatic Processes”

Start when:


Trigger
Start when
Record is created
After
Record status changes
Before or After
Record is assigned
Before or After
Record Fields change
Before or After
Record is deleted
Before
 

Execute as


Executes as
Permissions
The owner of the workflow
Runs with the permissions of the person who owns the workflow.
The user who made changes
Runs with the permissions of the person who triggered the workflow.  If the user does not have sufficient permissions to run a particular action, it will not run.
 
 

Considerations when designing real-time workflow:

  • They can be ranked within a stage.
  • They cannot contain delays or waits.
  • Only errors are logged; cannot view process history.  This limits the ability to debug issues.
  • Importing data for entities that have real-time workflows can have a severe impact on system resources.  Real-time workflows trigger whether resources are available or not.

Possible uses of real-time workflows

 
Reduces the need for JavaScript:  Bring in details from a related entity immediately.
 
Workflow Design
 
Setting workflow properties
 
Results
 
Real-time update
 

Pro:
 
  • Results occur immediately without the use of JavaScript programming.
  • Workflow can be developed for less cost than the equivalent Web Resource.
 
Con:
 
  • Processing is done regardless of available resources.
  • This may slow down the performance of the system.
  • May create window errors with missing data.
  • No process history saved.  Cannot easily debug issues.
Alternative:
  • The above example is one where the data being brought in – namely Account Number – will not change.  This is a good use of synchronous workflows.  If the data is something that can change – such as the phone number, address, or primary contact for an account, consider using the “Quick View” form to display the account information in the opportunity form.
 

Reduce the need for a Plugin:  Validate before deleting produce a message prompt that prevents users from creating bad data.

 

Workflow Design
 
Setting workflow properties example
 
Setting workflow properties close up

Results
 
Business process error example
 


Pro:
  • Results occur immediately without the use of a Plugin.
  • Workflow can be developed for less cost than the equivalent Plugin.
 
Con:
  • Processing is done regardless of available resources.
  • No Process History Saved.  Cannot easily debug issues.
Alternative:
  • Remove the ability to delete accounts from all but an administrator role.
 
 
Real-time workflows add the benefit of immediate results and reduce the need of spending time on custom coding.  Depending on the type of synchronous workflows that are set up, there may be an added benefit of preventing users from deleting important data or inputting unneeded data.  Before you create a custom code to help keep only useful data in your CRM system, think about how a real-time workflow can replace that complicated C# coding.  Whether your organization is a new or patron user of Microsoft Dynamics®CRM, try using the tools that Microsoft CRM 2013 provides you.  Start looking into creating real-time workflows to help keep your CRM 2013 system running smoothly and efficiently.

No comments:

Post a Comment