Chapter 11. Custom workflow activities and conditions

 

This chapter covers

  • Building custom leaf activities
  • Building custom composite activities
  • Publishing activities to SharePoint Designer
  • Coding custom conditions for SharePoint Designer

In the most fundamental sense, activities are object-oriented classes. In object-oriented programming, you would never have one class that does everything. Instead, you would have many classes that combine to make up an application. This approach applies to workflows and activities as well. You would never want a large, complex Visual Studio workflow to have, for example, 10,000 lines of code in its code view. It’s a better practice to extract discrete pieces of code into custom activities that are managed outside the workflow’s template. The workflow template should be used to model the workflow’s activities, and pictorially show the flow of work. The vast majority of the custom code should be managed outside the template in custom activities.

11.1. Building custom leaf activities

11.2. Building custom composite activities

11.3. Publishing activities to SharePoint Designer

11.4. Building custom conditions for SharePoint Designer

11.5. Summary