To complement our SharePoint 2013 tools in Warewolf, we have created a SharePoint feature called the Warewolf Event Receiver. The Warewolf Event receiver is installed in your SharePoint infrastructure as an administrative feature. It enables you to bind Warewolf services to any or all of the events associated with a SharePoint list.
The Warewolf Event Receivers can be attached to specific events that trigger when changes occur, or are about to occur within the SharePoint lists. The six events that can be bound to include: before or after Create, before or after Update and before or after Delete list events.
The Warewolf Event Receivers for SharePoint work with 2 categories of lists:
The Warewolf Event Receivers provide a SharePoint developer with an excellent way to add extra functionality at a specific point (or variety of points) within a SharePoint environment and thereby extend the functionality of the native SharePoint environment in a way which is supported fully by Microsoft.
By creating Warewolf Event Receivers, you can respond when a user interacts with SharePoint items such as lists or list items. For example, the Event Receivers can be triggered when a user changes the calendar or deletes a name from a contacts list.
Round Trip Integration between Warewolf and SharePoint 2013
The Event Receivers work in conjunction with the Warewolf SharePoint tools enabling a developer to build an integrated system with full round trip integration between SharePoint and Warewolf.
The SharePoint tools within Warewolf enable a developer to perform full Create, Read, Update and Delete operations on SharePoint lists, while the Event Receivers enable a developer to fire Warewolf services on a Warewolf server, passing in variables from the list item to the service, and listening for a return message.
The return message can contain an error message, which will prevent the list event from happening – for example, a Before Create list event receiver will prevent a list item from being created if the Warewolf Event Receiver returns an error message.
Between these two processes a developer can build highly functional business processes with ease, using the Warewolf Platform.
Event Receivers or SharePoint Workflows?
A SharePoint Workflow consists of a set of task(s) which can be triggered both manually and automatically. In most of the scenarios, Workflows and Event Receivers perform the same functionality.
For the beginners, SharePoint Workflows are a good option to start from as they can be easily created through SharePoint Designer or MS Visio. SharePoint Workflows are used to perform a set of tasks if an item is changed, created, deleted etc., or in other words, the workflow is triggered once an action is completed. The most common uses of workflows are to move an item to another List/Site once it is completed, to move documents, or to generate notification emails via Workflows. .
SharePoint Event Receivers
In general, SharePoint applications can use either workflows or event receivers to implement business processes.
SharePoint Event Receivers, as the name suggests, are triggered upon an event. Unlike Workflows, Event Receivers can be triggered even when an item is being created, modified or deleted. To create an Event Receiver, you would traditionally need to use Visual Studio, but the Warewolf Event Receivers for SharePoint have changed that. These Event receivers are simply configured, and associated with Warewolf services, while the application logic itself is run on the Warewolf platform, and the Development is done using Warewolf Studio, a code-free service designer.
When it comes to robustness, Workflows are more robust than Event Receivers. They can survive a system reboot and while in few cases Event Receivers can’t. Unlike Workflows, traditional Event Receivers cannot be triggered manually. But this does not hold true when using the Warewolf Event Receivers, because they can be triggered independently from the actual services if that is a requirement.
The initial decision point is if you need the ability to cancel the process. If you do, you should use an Event Receiver. If you do not need this capability, you would traditionally have to decide whether the business process requires input from users. For example, a leave application process requires a manager to approve or reject a pending request, so it uses a workflow, but this could also be easily handled using Warewolf. Another issue is persistence. Another case where a workflow is more appropriate than an Event Receiver is if the process takes longer than five minutes to resolve. . For example, in a leave application, a manager may leave a Leave Requests as pending for an unspecified amount of time. Finally, if the application is heavily used, you may need to consider using an Event Receiver instead of a workflow, but this is also a use case that is easily handled by Warewolf.
The following figure illustrates the typical flow chart flow chart that can help you decide if you should use an Event Receiver or a workflow.
The Warewolf Event Receiver difference
The Diagram above describes the traditional comparative model for deciding when to use a Workflow or an Event Receiver. All of the use cases for using a Workflow in the traditional model can be handled with ease using the Warewolf Event Receivers. You can use Warewolf microservices for interaction with other users, and you can use them for long running processes too.
Warewolf =services also run well under both heavy and light load, which is the third consideration for running a Workflow instead of an Event Receiver. So all points considered Warewolf is a viable platform to simplify your business process development for SharePoint.
Use Cases for the Warewolf Event Receiver
There are several excellent use cases for using the Warewolf Event Receivers
- Server side data validation before performing operations saving
- Triggering external business processes, before or after events
- Running business rules on input values before saving
- Synchronizing data between lists
- Pull and populate list operations
- Integration with third party systems
- Case based operations determined by input values
- SharePoint extensibility using Warewolf applications
These are just a few examples of how you can use the Warewolf Event receivers to greatly extend the functionality of your SharePoint deployment.
Why SharePoint development with Warewolf makes sense
Investing in system built using Warewolf is an excellent investment. There are no steep upfront costs. Warewolf is open source, so you can download a licensed copy from our website today.
To use the Warewolf Event Receivers for complete round tripping between Warewolf and SharePoint contact us directly.