Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
Event Receivers vs Workflows

Posted On: 25/10/2014 00:25:46
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
Posted On: 25/10/2014 00:31:16
Workflows:

  • SharePoint Workflow consist a set of task(s) which can be triggered both manually and automatically.
  • SharePoint Workflows are created in SharePoint Designer, Microsoft Visio and of course through Visual Studio.
  • The workflow is triggered once an action is completed.
  • Workflow can be exported and imported
  • Workflow can be paused
  • Workflow can send mails without attachment
  • Does not required coding knowledge to work on SPD workflows
  • Multiple forms(initiation, task edit..) can be associated as part of workflow

Event Receivers:

  • SharePoint event receiver contains custom coding/logic which can be triggered automatically based on the event host type.
  • SharePoint event receivers can be created only in Visual Studio.
  • The events can be triggered before action or after action.
  • Events cannot be exported and imported
  • Events can be cancelled(synchronous) but cannot be paused
  • Even receivers  can send mails with attachment
  • Required coding knowledge
  • No custom forms associated as part of event actions
Posted On: 25/10/2014 00:37:09
Differences Between SharePoint Event Receivers and SharePoint Workflows are:

1. Event handlers Can't be manually initiated - workflows can be initiated either automatically or manually.

2. Event Handlers can be Synchronous or Asynchronous - Workflows are always async (They executes after the operation)

3. In Event Receivers we can cancel the operation (such as add/update/delete) - But in Workflows its not possible. 

4. Event handlers execute from a Particular WFE, So when some thing goes wrong in that WFE, It may end-up. But Workflow Jobs are robust and  can resume even after Reboots. 

5. Usually Event handlers runs for short period - Workflows can be longer even for years!

6. There is no User Interface/user Interaction in Event Receivers - Workflows can have user interactions such as getting user input in Initiation forms.

7. As the Name indicates, SharePoint Event receivers are triggered by events like New Item Adding-Added, Updating-Updated, Deleting-Deleted, etc. - But Workflows triggered only on Creation/Change/deletion.

8. Event Receivers are created using Visual studio - Workflows can be via SharePoint user interface, SharePoint Designer, Visio or Visual studio.

9. Workflows leaves "Workflow History" logs which we can refer for debugging - Event handler doesn't do such.

10. Event receivers are better for large volume - Workflows are better for small amount of data.
MOST VIEWED QUESTION:
 
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us