SharePoint Workflow Activities - What are they?

Workflow Activities

What are they?

Activities are the blocks with which a workflow is build. Every activity developed for the ready-made workflows used in SharePoint, Office Designer, and those which are self-developed, are all done by Microsoft Visual Studio.

There are two types of activities:

  •        Simple Activities: Their name in no way implies that these activities are easy to develop. As a matter of fact, it can lead to months of coding. Although it is not a rule, simple activities are most of the time made up of one single task. Simple activities examples include:

    o   Send an e-mail

    o   Create a WSS site

    o   Convert a document to PDF

    o   Insert a database row

    o   Copying a list item to another library not within the same site

    o   Delete a database row… etc.

  •             Composite Activities: Typically Composite Activities do not perform any tasks. Their behavior is that of a container – they do nothing, however it controls the flow of a process before and/or after other activities. The most common Composite Activity examples are:

     o   If else conditions

     o   Parallel

     o   Sequential 

An activity is made up of seven classes:

1.       Activity Definition: This class is required as it controls what the activity does and the properties of it. It contains the main method which is called Execute.

2.       Activity Toolbox Item: Used to manage what is happening within the activity when it is put in Office SharePoint Designer. It is also used in Visual Studio to display the activity in the toolbox (to be used another time).

3.       Activity Designer: Manages the behavior and structure of an activity while it is being designed in the Visual Studio.

4.       Activity Validator: Makes sure that the environment and properties of the activity made are built properly when being developed and run.

5.       Activity Theme: This is not usually important because all it does is controlling the looks in terms of appearance and colors of the activity when submitted on the Office SharePoint Designer.

6.       Activity Serializer: if the activity being developed makes use of an object which is not supported by the default serializers, this class provides custom serialization.

7.       Activity Code Generator: This class allows custom code generation during compile time.

This article is part of the GWB Archives. Original Author: Steffi

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.