This documentation is archived and is not being maintained.

Conditions Element (WorkflowActions)

Windows SharePoint Services 3

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Conditions are used by declarative, rules-based code-free workflow editors, such as Microsoft Office SharePoint Designer 2007, to build workflows. Conditions are simply functions, in code, that return a Boolean value when called by Windows SharePoint Services 3.0.

When using a code-free workflow editor to develop workflows, conditions are presented to the workflow designer in the form of a list of phrases. Each of the conditions in this list has a corresponding function in code that is used to evaluate values provided either by the user or by Windows SharePoint Services 3.0.

The Conditions element is the parent element for all Condition elements.

NoteNote

The attributes listed below are only read from the default WSS.ACTIONS file and cannot be overridden in any custom .ACTIONS files.


   <Conditions>
      <Condition>…</Condition>
      <Default>…</Default>
   </Conditions>

Attribute

Description

And

Required text. The text defined in this attribute is displayed in the rule designer sentence when two or more conditions are used in the same conditional branch, and when all conditions must be satisfied before workflow actions can execute. The value is not case sensitive.

The default value is and (applies only to the English language version of Windows SharePoint Services 3.0).

Example:

<Conditions And="and">

Else

Required text. The text defined in this attribute is displayed in the rule designer sentence when a conditional branch activity is added to the workflow. The value is not case sensitive.

The default value is Else if (applies only to the English language version of Windows SharePoint Services 3.0).

Example:

<Conditions Else="Else if">

Not

Required text. The text defined in this attribute is displayed in the rule designer sentence when the condition must not contain a specified value or range of values. This value is not case sensitive.

The default value is Not.

Example:

<Conditions Not="not">

Or

Required text. The text defined in this attribute is displayed in the rule designer sentence when there are two or more conditions in the same conditional branch and any value will satisfy the conditions, allowing the workflow actions to execute. The value is not case sensitive.

The default value is or (applies only to the English language version of Windows SharePoint Services 3.0).

Example:

<Conditions Or="or">

When

Required text. The text defined in this attribute is displayed in the rule designer sentence when a conditional branch is added that requires the values or conditions that follow it to return true in order for the workflow actions to execute. The value is not case sensitive.

The default value is If (applies only to the English language version of Windows SharePoint Services 3.0).

Example:

<Conditions When="If">

Each Conditions element can occur only once in an .ACTIONS file.

The following example demonstrates how to format the Conditions element so that the individual Condition elements contained within it are displayed in the workflow editor.

<WorkflowInfo Language="en-us">
   <Conditions And="and" Or="or" Not="not" When="If" Else="Else if">
      <Condition>…</Condition>
      <Default>…</Default>
   </Conditions>
   <Actions>…</Actions>
</WorkflowInfo>
Show: