Creating Custom Activities in Windows Workflow Foundation
Introduction
Activities are basic units in workflow execution. Activities are two types basic activities and composite activities. Basic activities are steps in the workflow and composite activities can contain other activities.
Base activities are comes with Workflow Foundation and these can be used by dragging it from visual studio toolbox. We can also create custom activities that appear in the visual studio toolbox.
Activities are like classes and we can define properties, methods and events.
We can build an activity or multiple activities into .NET assembly and deploy them as re-usable assemblies.
In this post we will learn how to create custom activities and properties in workflow foundation.
Create a workflow project
1. Create a workflow project by selecting the File->New->Project menu command and it displays a dialogue box select the Sequential Workflow Console Application template and click ok.
2. Rename the Workflow1.cs workflow to SendMailWorkflow.cs.
Create an Activity Project
1. Add new project to the existing solution by selecting the Add new project option. select the Workflow Activity Library template from the dialogue box.
2. Enter the SendMailActivityLibrary in the name field and visual studio creates a active library project.
3. Rename the single activity named ativity1 to SendMailActivity.
4. Click on the SendMailActivity in the workarea to view the properties window.
1 comment.NET Framework Features
.NET Framework 1.1/2.0/3.0/3.5 main features comparision
1.1
Side-by-Side Execution
ASP.NET Mobile Controls
IPv6 Support
2.0
64-Bit Platform Support
Click-Once Deployment
Strongly-Typed Application Settings
No comments