Using Workflows and Event Receivers
The Training Management application uses the Windows Workflow Foundation to process a registration from the employee's initial request until the manager's approval and the accounting update. In general, SharePoint applications can use either workflows or event receivers to implement business processes. The following figure illustrates a flow chart that can help you decide if you should use an event receiver or a workflow.
Workflows and event receivers
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 ability, you must decide whether the business process requires input from users. For example, the Training Management application requires a manager to approve or reject a pending registration, so it uses a workflow. Another issue is persistence. If the process takes longer than five minutes to resolve, that is another case where a workflow is more appropriate than an event receiver. For example, in the Training Management application, a manager may leave registration 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. For more information about Windows Workflow Foundation, see Windows Workflow Foundation (WF) on MSDN.