Tuesday, March 25, 2014

Event Receivers vs Workflows

Differences between event receivers and workflows


Event ReceiversWorkflows
Can execute either before or after the operationAlways executes after the operation
Can cancel the operationCannot cancel the operation as the item will have already been created
Cannot be launched manually by the userCan be started manually by the user
Not designed for user interactionSpecifically designed for user interaction
Can execute in response to many different actions, including deletesCan only execute in response to one of four events – Manual, an item being created, an item being edited, and an item being submitted for approval
Must be created in Visual StudioCan be created with Visual Studio, Visio or SharePoint Designer

do check the below link to get more information about workflows, event receivers and Timer jobs

http://www.dotnetplace.com/post/Difference-between-SharePoint-WorkFlow-Event-Receivers-and-Timer-Job.aspx

one of the main points which i have observed is Workflows are more robust than event receivers. They can survive system reboot and while in few cases Event receivers cant.

1 comment: