Workflow Condition

SharePoint 2007

Represents a compiled class that is used as a part of the modular steps in a workflow. A condition is used to determine when to execute a workflow action. Workflow conditions run as server-side code when used within SharePoint Products and Technologies.

Real World Example

A commonly requested activity is to determine if a given user is currently online. This is implemented as a new custom workflow condition and is then made available to all custom and no-code workflows.

Technical Details

Workflow conditions are similar to workflow actions and are represented in the same system global WSS.ACTIONS file. Workflow conditions, like workflow actions, are composed of an assembly and metadata that describes how a workflow designer will represent the condition.

The following is an example workflow condition included in the WSS.ACTIONS file built into SharePoint Products and Technologies, with the class and assembly references:

<WorkflowInfo Language="en-us"><Conditions And="and" Or="or" Not="not" When="If" Else="Else if"><Condition Name="Modified by a specific person" FunctionName="ModifiedBy" ClassName="Microsoft.SharePoint.WorkflowActions.Helper" Assembly="Microsoft.SharePoint.WorkflowActions, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" AppliesTo="list" UsesCurrentItem="true">
         <RuleDesigner Sentence="modified by %1">
            <FieldBind Id="1" Field="_1_" DesignerType="Person" Text="specific person"/>
            <Parameter Name="_1_" Type="System.String, mscorlib" Direction="In" />

You must update the WSS.ACTIONS file in the following path with the information about the new workflow conditions to make it available to workflows designed in Microsoft Office SharePoint Designer 2007:

%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\TEMPLATE\1033\Workflow

Support Details

Workflow conditions have the same support concerns as workflow activities.

See Also

Community Additions