Quantcast
Viewing all articles
Browse latest Browse all 10

SharePoint Workflows: Activities and Validators

SharePoint Server workflow activities are mostly defined within the Microsoft.SharePoint.WorkflowActions component, in Microsoft.SharePoint.WorkflowActions and Microsoft.SharePoint.WorkflowActions.WithKey namespaces. SharePoint workflows use the Windows Workflow Foundation (WF) defined in .NET 3.0. Activity types must derive from a top Activity class, defined in the System.Workflow.ComponentModel namespace. Activities may define custom validators, derived from the top class ActivityValidator, defined in the System.Workflow.ComponentModel.Compiler namespace. Validators call the Validate(…) method, to return a collection of ValidationError entries.

Microsoft.SharePoint.WorkflowActions Namespace

We start with CoreceActivity and derived classes for different data types (boolean, integer, double, string, date& time, key item). There is also a generic activity validator, CoerceActivityValidator. We highlighted the main types and methods specific rather to the WF, as described before, to see how SharePoint workflows follow the standard and fit in:

Diagram Not Found!

A couple of SharePoint workflow activities do not derive directly from Activity class, but from an intermediate derived class, usually also defined by the Workflow Foundation (WF), in either System.Workflow.ComponentModel or System.Workflow.Activities namespace:
  • CallExternalMethodActivity
  • HandleExternalEventActivity
  • CompositeActivity
  • SequenceActivity
  • SequentialWorkflowActivity

Here are SharePoint activity classes (no validators) derived from CallExternalMethodActivity or HandleExternalEventActivity subtypes:

Diagram Not Found!

Composite activities, derived from the subtype System.Workflow.ComponentModel.CompositeActivity, are presented by this diagram:

Diagram Not Found!

The rest of the SharePoint workflow activity types and their related validator classes (if any) from the Microsoft.SharePoint.WorkflowActions namespace, directly derived from the top Activity class, are presented in the following diagram:

Diagram Not Found!

Microsoft.SharePoint.WorkflowActions.WithKey Namespace

Here are some activities and related validators defined in the WithKey sub-namespace, which inherit directly from classes defined in the Workflow Foundation:

Diagram Not Found!

The second diagram shows the rest of activity and related validator types, derived from classes defined in the Microsoft.SharePoint.WorkflowActions namespace, such as WaitForDocumentUnlockActivity and ImpersonationSequenceActivityValidator:

Diagram Not Found!

Viewing all articles
Browse latest Browse all 10

Trending Articles