Share via


Default Workflow Conditions (WorkflowInfo)

Applies to: SharePoint Foundation 2010

Conditions are rules that you configure to direct the flow of your workflow. They are used to compare values and perform logic checks. If a condition is satisfied with the parameters provided, Microsoft SharePoint Foundation 2010 executes a specified workflow activity.

SharePoint Foundation 2010 provides a number of default, or predefined, workflow conditions that you can use by themselves or combine to create complex business logic for your workflows.

Location of Default Workflow Conditions

Default workflow conditions are contained in the WSS.ACTIONS file, which is an XML file that lists all default conditions and actions that are available to the workflow editor. (For information about the default workflow actions that are included in the WSS.ACTIONS file, see Default Workflow Actions.) By default, the WSS.ACTIONS file is installed in the following location in SharePoint Foundation 2010:

%WSSRoot%\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\Workflow

Note

Direct modification of the WSS.ACTIONS file is not recommended or supported. However, you can expand the conditions that are available to your code-free workflow editor by creating and adding additional custom .ACTIONS files to the same directory. SharePoint Foundation 2010 parses all files that have the .ACTIONS file name extension and creates a combined list that it then presents to the declarative, code-free workflow editor.

Default Conditions

The following table lists the default workflow conditions that are included with SharePoint Foundation 2010. It also includes an example rule sentence for each condition, and the fields and values that apply.

Condition

Description

Compare<list or document library name> field

Instructs the workflow designer to compare a field in the current list or document library to a specified value.

Rule Sentence:

If fieldequalsvalue

Fields:

  • field - Displays a list of all fields in the current list.

  • equals - Shows a list of operators that can be used to compare the field and value specified in the rule sentence.

  • value - Presents a lookup dialog box that allows data binding to a SharePoint list item or directly to a text entry.

Compare any data source

Instructs the workflow designer to compare a field in any SharePoint list or document library in the current website to a specified value.

Rule Sentence:

If valueequalsvalue

Fields:

  • value - Displays a lookup control that allows data binding to any SharePoint list or document library item.

  • equals - Shows a list of operators that can be used to compare the field and value that are specified in the rule sentence.

  • value - Presents a lookup control that allows data binding to a SharePoint list item or directly to a text entry.

Title field contains keywords

Used to test whether specific keywords exist in the title field of the current list or document library item that the workflow is running on.

Rule Sentence:

If title field contains keywords

Fields:

  • keywords - Displays both a text editor dialog box where a text string can be entered for comparison, and a lookup dialog box for gathering information from another SharePoint Foundation 2010 list or document library item.

Modified in a specific date span

Checks the modified date of the item. If the modified date of a list item falls within a specified date range, this condition returns true.

Rule Sentence:

If modified between date and date

Fields:

  • date - Displays a date selector control and a lookup control. The date selector lets the workflow designer choose a specified date, and the lookup control enables the comparison of the current list item to another list or document library item.

Modified by a specific person

When a workflow is started that contains this condition, the list item is examined for last modified date. If the item was modified by the person who is specified in the workflow, this condition is satisfied and returns true.

Rule Sentence:

If modified by specific person

Fields:

  • specific person - This field opens a user selection dialog box. The workflow creator can use this condition to select a single person or group from the built-in server groups or from Active Directory directory service.

Created in a specific date span

Checks the date that the item was created. If the creation date falls within a specified date range, this condition returns true.

Rule Sentence:

If modified between date and date

Fields:

  • date - Displays a date selector control and a lookup control. The date selector lets the workflow designer choose a specified date, and the lookup control enables the comparison of the current list item to another list or document library item.

Created by a specific person

When a workflow is started that contains this condition, the list item is examined for its creator. If the item was modified by the person who is specified in the workflow, the condition is satisfied and returns true.

Rule Sentence:

If modified by specific person

Fields:

  • specific person - This field opens a user selection dialog box. The workflow creator can use this to select a single person or group from the built-in server groups or from Active Directory.

The file type is a specific type

Used to evaluate whether a file is of a certain type (for example, a Microsoft Word document, a Microsoft Excel worksheet, and so on.)

Rule Sentence:

If the file type is specific type

Fields:

  • specific type - Displays the field text editor. Enter a string value for the file type.

The file size in a specific range kilobytes

Used to evaluate whether a file is a specific size. This condition can be used to ensure that Word documents in a document library do not exceed a specific size.

Rule Sentence:

If the file size is between size and size kilobytes

Fields:

  • size - Displays a text box. Enter a number in kilobytes.

See Also

Concepts

Default Workflow Actions

Creating Declarative, No-Code Workflow Editors

WorkflowInfo Schema and WorkflowActions Schema Overview