This integration between Microsoft Dynamics CRM 2011 and the Windows Azure platform provides a secure channel for communicating Microsoft Dynamics CRM run-time data to external cloud based line of business applications. This capability is especially useful in keeping disparate CRM systems or other database servers synchronized with Microsoft Dynamics CRM Online business data changes.
Identifying Key Elements of the Integration
The asynchronous service is responsible for posting the Microsoft Dynamics CRM remote execution context. Each post is performed by a system job of the asynchronous service. A user can view the status of each system job using the Microsoft Dynamics CRM Web application.
There are two kinds of asynchronous plug-ins supported by the integration feature: out-of-box (OOB) and custom. Synchronous plug-ins are not supported.
An Azure aware plug-in is provided with Microsoft Dynamics CRM 2011. This OOB plug-in executes in full trust with the Microsoft Dynamics CRM platform. When registered with Microsoft Dynamics CRM, the plug-in can notify the asynchronous service to post the current request’s context. A developer needs to register a step on this plug-in that identifies the target message and entity in order to enable the service bus posting functionality.
You can also write your own custom plug-in that is “Windows Azure aware”. The custom plug-in executes in partial trust mode in the sandbox and can call any Microsoft Dynamics CRM SDK methods. For a custom plug-in to initiate posting the Microsoft Dynamics CRM context to the bus, the plug-in code must include some standard lines of code that notifies the asynchronous service to post the request context. This code makes the plug-in “Windows Azure aware”.
Custom workflow activities can be written to post the current request’s data context to the Windows Azure Service Bus.
The service bus relays the remote execution context between Microsoft Dynamics CRM 2011 and Windows Azure Service Bus solution listeners. The Access Control Service (ACS) manages claims based authentication security.
For the CRM-Azure integration feature to work there must be at least one solution in an Windows Azure Service Bus solution account, where the solution contains one or more service endpoints. For a non-queued endpoint contract, a listener that is “CRM aware” must be actively listening on the endpoint for the Microsoft Dynamics CRM request on the service bus. For a queued endpoint contract, a listener does not have to be actively listening. A listener is made “CRM aware” by linking it to the Microsoft.Xrm.Sdk assembly so that type RemoteExecutionContext is defined.
The solution rules must be configured to allow the Microsoft Dynamics CRM 2011 remote execution context to be posted to the service bus. To enable this posting, ACS needs to recognize the Microsoft Dynamics CRM deployment as a supported issuer.
Important: To develop a solution listener for Windows Azure platform, you need to install the Windows Azure SDK on your development computer.
Describing a Microsoft Dynamics CRM to Service Bus Scenario
The following diagram shows the physical elements that make up the scenario.
|Microsoft Dynamics CRM to Service Bus Scenario|
The sequence of events as identified in this diagram are as follows:
- A listener is registered on a Windows Azure Service Bus solution endpoint and begins actively listening for the Microsoft Dynamics CRM 2011 remote execution context on the service bus.
- A user performs some operation in Microsoft Dynamics CRM 2011 that triggers execution of the registered OOB (out of the box) plug-in or a custom Windows Azure aware plug-in. The plug-in initiates a post, through an asynchronous service system job, of the current request context to the service bus.
- ACS authenticates the claims posted by Microsoft Dynamics CRM. The service bus then relays the remote execution context to the listener. The listener processes the context information and performs some business related task with that information. The asynchronous service is notified, by the service bus, of a successful post and sets the related system job to a completed status.
Establishing a Contract between Microsoft Dynamics CRM and a a Windows Azure Solution
A REST contract is similar to a two-way contract on a REST endpoint.
Claims authentication is used for secure access to the service bus. However, Microsoft Dynamics CRM and the service bus use different claims implementations. The claim used to authenticate to the service bus is generated within Microsoft Dynamics CRM and signed by the AppFabricIssuer certificate specified in the Microsoft Dynamics CRM configuration database.
Management and Notification of Run-time Errors
My above blog is based on Microsoft's Official information.
I hope this blog about 'Microsoft Dynamics CRM 2011 - Introduction to Windows Azure Integration' was informative. Please feel free to leave your comments.