Using Workflows and Event Receivers

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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. Figure 1 illustrates a flowchart that can help you decide if you should use an event receiver or a workflow.

Ff649084.Event_receiver-workflow(en-us,PandP.10).png

Figure 1
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 rather than a workflow. For more information about Windows Workflow Foundation, see Windows Workflow Foundation (WF) on MSDN.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Footer image

To provide feedback, get assistance, or download additional, please visit the SharePoint Guidance Community Web site.

Copyright © 2008 by Microsoft Corporation. All rights reserved.