The enclosed zip file contains two custom Windows Workflow Foundation Activities:
- BackupDatabase: Performs a full or incremental backup of a database
- RestoreDatabase: Performs a restore of a database
Both activities leverage the SQL Server 2005 System Management Objects (SMO). The implementation of the activities is done in the SMOActivityLibrary project. The TestWorkflow sequential workflow project contains two sample workflows that leverage these activities. A simple console application which invokes both workflows is provided in the WorkflowConsoleApplication1 project.
This sample illustrates a couple of interesting concepts, specifically:
- Implementing Validators for custom activities.
- Developing a custom Designer for an activity.
- Leveraging inheritance to develop custom activities.
- Leveraging a custom WorkflowRuntimeService to provide feedback about long-running operations to the hosting application.