Microsoft Dynamics CRM 2013/2015 Event Pipeline User manual Published on: March 2015 *The document is based on Microsoft Dynamics CRM 2013 Version 2014 Rödl Consulting AG. All rights reserved
Table of Contents Introduction... 3 Mode of operation... 3 Event Pipeline vs. out of the box functionality... 3 Versions... 3 Security Considerations... 3 Installation... 4 Prerequisites of usage... 4 On-Premise... 4 Online... 4 Configuring the MS CRM Event Pipeline (design time)... 5 File Endpoints... 9 Authorizations... 9 WCF Endpoints... 9 IServiceEndpointPlugin... 9 ITwoWayServiceEndpointPlugin... 9 IWebHttpServiceEndpointPlugin... 9 Page 2 2011 Rödl Consulting AG
Introduction Mode of operation The Microsoft Dynamics CRM 2013 Event Pipeline provides a declarative approach of publishing events to external systems. These external systems are represented as endpoints. The possible ways of communication between Microsoft Dynamics CRM 2013 and an endpoint are the file system (by publishing an XML file), the Windows Communication Foundation, the Azure AppFabric v1.5 (Queue & Topic) and, especially for Microsoft Dynamics CRM 2013 Online, the Windows Azure Service Bus. Event Pipeline vs. out of the box functionality By default, Microsoft Dynamics CRM 2013 is not able to publish events to external systems, except for the Service Bus. However, in on-premise scenarios this approach is not the preferred way. Furthermore the complete configuration has to be done by using an administrative tool. In contrast, the Event Pipeline allows you to configure all endpoints and their associated events declaratively. Versions The Microsoft Dynamics CRM 2013 Event Pipeline is available either as a shareware version or a full version. The shareware version provides full functionality, though you can just use up to 5 events. Security Considerations By using the WCF endpoints, the default security of the chosen binding takes place. This may be extended in a later release. The processing of events over the Service Bus is secured by certificates. 2011 Rödl Consulting AG Page 3
Installation The installation is the same for on-premise and online. In each case, a managed solution will be delivered. Install the solution as usual. During the import progress, make sure that you activate the check box Activate any processes. After installation completed, refresh the page. Then you will see the new menu item Event Plugin Configuration in the Settings section. Prerequisites of usage The Microsoft Dynamics CRM 2013 Event Pipeline is available for the on-premise and the online version of Microsoft Dynamics CRM 2013. However, there are some significant differences. On-Premise The on-premise version supports all endpoint types (WCF, File, Service Bus, AppFabric) The WCF endpoints are implemented to leverage the respective binding security. To configure the endpoints, you have to be a Deployment Administrator. Online The endpoint type File is not supported for the online version. The endpoint type AppFabric uses the REST interface in CRM Online instead of the.net interface. In addition, the bindings of the WCF endpoints do not implement any security settings. It is strongly recommended to use the Service Bus endpoint type for the online version. To configure the endpoints, you have to have sufficient rights on Sdk Messages, Sdk Message Processing Steps and so forth. Page 4 2011 Rödl Consulting AG
Configuring the MS CRM Event Pipeline (design time) Make sure that you have sufficient rights to create, read, update and delete the Event Pipeline configuration. You can use the security role CRM Event Pipeline Superuser for this purpose or set it for your own. 1. Open the Microsoft Dynamics CRM 2013 web interface and switch to settings, then to the menu item Event Plugin Configuration. 2. Create a new configuration record or open an existing record. Attention: The current version only supports one configuration per organization. 3. Enter the name of the configuration and, if you purchased the full version, the license information into the configuration form. 2011 Rödl Consulting AG Page 5
4. Save the configuration. Afterwards, you can define the endpoints of the configuration. This can be done in the Endpoints section. Page 6 2011 Rödl Consulting AG
5. When editing an existing endpoint or creating a new one, you get to the form for endpoint and event configuration. 6. Here, you can define the desired endpoint. Further entry options are defined by the choice box Type. a. WCF if you pick the type WCF, you may select address, binding and contract. b. File if you pick the type File, you may select the path, namespace of the XML file to be exported, culture, which localizes the output value, whether the values should be encoded and if the entire data set should be put out in XML format. c. Service Bus Relay you may select from the existing service endpoints within the system. Registration of the service endpoints has to be conducted via the plug-in registration tool due to complexity. d. Service Bus Queues and Topics when choosing this option, you can type in namespace, path, issuer name, issuer key and the messaging type (Queue / Topic) 2011 Rödl Consulting AG Page 7
7. In addition to that, you can define the desired events. To do so, click on the add button on the top right corner of the event screen. For each event, you can determine if it is supposed to react to which event (Create/Update/Delete) from which entity. On top of this, you can set a trigger attribute. Additionally, you can define the time of the event (pre / post), the nature (asynchronous / synchronous) and the effect on the current transaction (transactional). To prevent infinite loops you can choose an Ignore User. Events fired in context of this user will not send to the endpoint. Attention: For all foure endpoint types, you have to make sure that the necessary measures are taken at the endpoint itself (authorization on the file system, WCF service with correct interface). 8. Finally, make sure that all users have read access to the three entities that are coming with this solution. You can use the security role CRM Event Pipeline Standarduser for this purpose or set it for your own. Page 8 2011 Rödl Consulting AG
File Endpoints Both a local file folder on the CRM server or an approved network path can be used as file endpoints. Authorizations The executing account needs to be given read permission on the designated path. The CRMAppPool-Identity serves this purpose for synchronous events, for asynchronous events it is the identity of the asynchronous processing service of the CRM system. WCF Endpoints In order to utilize WCF endpoints, a respective WCF service has to be defined for the endpoint. The binding is to be used analogical to the setting of the configuration, but the differences of the online and the on premise versions have to be kept in mind (security). You can choose from three interfaces for the definition of the contract. IServiceEndpointPlugin (oneway) ITwoWayServiceEndpointPlugin (bidirectional) IWebHttpServiceEndpointPlugin (RESTful) Attention: There is no scan for infinite loops. It is extremely important to avoid activating the WCF service s own trigger again. If activating the trigger cannot be helped, a new routine has to be implemented in the WCF service that breaks through the infinite loop. IServiceEndpointPlugin The IServiceEndpointPlugin interface is a component from Microsoft XRM SDK. It has the method Execute and expects an entity of the type RemoteExecutionContext. It works unidirectional, so it doesn t return anything. ITwoWayServiceEndpointPlugin The ITwoWayServiceEndpointPlugin interface is a component from Microsoft XRM SDK. It has the method Execute and expects an entity of the type RemoteExecutionContext. It returns a string value. IWebHttpServiceEndpointPlugin The IWebHttpServiceEndpointPlugin interface is a component from Microsoft XRM SDK. It has the method Execute and expects an entity of the type RemoteExecutionContext. It returns a string value. The Execute method is defined as a WebInvoke method with the method POST. 2011 Rödl Consulting AG Page 9
Features and specifications are subject to change. by Rödl Consulting AG. All rights reserved. Reproduction in any manner without prior approval of Rödl Consulting AG is strictly forbidden. All trademarks and trade names used in this document are the property of their respective companies and manufacturers. The Rödl Consulting AG disclaims any proprietary interest in trademarks and trade names other than its own. 2014 Rödl Consulting AG. All rights reserved