Windows Workflow Foundation (WF) includes a set of predefined activities that provide capabilities such as flow control, code execution, and Web service interaction. You add these activities to a workflow to define the functionality that you require in the workflow.
WF also enables you to define reusable custom activities that encapsulate recurring functionality in your workflows. You can add custom activities to the toolbox in the Microsoft Visual Studio development system so that workflow developers can use your custom activities in their workflows
WF provides several predefined activities to enable you to build workflows. However, there will be times when the provided activities are not sufficient; you may require functionality that existing activities do not provide or you may need to implement existing functionality in a different way.
Custom activities enable you to implement new functionality, or refine existing functionality, as required. This can be anything from adding a new event to an existing activity to writing a completely new activity.
When you create custom activities, you may need to define a custom activity serializer to enable the activity to serialize to an Extensible Application Markup Language (XAML) format, and to deserialize from XAML into an activity.
You can also define an activity layout, which determines the way in which the activity is displayed in the workflow designer. By doing this, you can distinguish your custom activities from those that are provided or ensure that the activity always displays in the same way, rather than leaving control of how the activity looks to the default workflow theme