Action Element (WorkflowActions)

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.

Contains the information needed for the workflow engine to process a workflow activity, which is called an action in Windows SharePoint Services 3.0. A workflow Action element represents a workflow activity, such as sending e-mail notifications, updating Windows SharePoint Services 3.0 list items, creating and assigning tasks, as well as many other activities.

By default, Windows SharePoint Services 3.0 provides 23 built-in workflow actions. These are defined in the WSS.ACTIONS file.

<Actions>
    <Action>
    </Action>
</Actions>

Attributes

Attribute

Description

Name

Required text. Represents the description of the workflow action that is displayed to the workflow editor.

ClassName

Required text. Fully qualified name of the class that implements the workflow action. For example: [Microsoft.SharePoint.WorkflowActions.EmailActivity].

Assembly

Required text. The .NET assembly name that contains instructions to implement the Action element. The text should include the PublicKeyToken, Version and Culture.

Category

Optional text. Provides a category for the workflow action. This text is used to filter the list of available actions.

CreatesTask

Optional Boolean. If set to true, a task list item is created in the workflow. If left blank, the assumption is false and no task list items are created.

CreatesInList

Optional text. If a value is set for this attribute, the workflow creates an item in a list. Values must map to a parameter name that contains the ID of the list or document library.

AppliesTo

Required text. Indicates whether this workflow action should be available for lists, document libraries, or both. Valid values include list, doclib, and all.

ListModeration

Optional Boolean. If set to true, this Action element applies to a list or document library that has content approval enabled. If left blank, the assumption is false.

UsesCurrentItem

Optional Boolean. If set to true, indicates that the current item should be used or modified. If set to false or left blank, this Action element uses only the SharePoint list or document library item that is specified.

Child Elements

RuleDesigner

Parameters

Parent Elements

Actions

Example

The following code sample demonstrates how to construct an Action element so that it is displayed in the workflow editor. Note that this XML has been modified for readability.

<WorkflowInfo>
  <Conditions>…</Conditions>
  <Actions Sequential="then" Parallel="and">
    <Action Name="Update my custom SharePoint list"
            ClassName="CustomActivities.OrderListFunctions"
            Assembly="CustomActivities,      
                      PublicKeyToken=b03f5f7f11d50a3a, 
                      Version=1.0.0.0, 
                      Culture=neutral"
            Category="My Custom Actions"
            CreatesTask="true"
            CreatesInList="UpdateList"
            AppliesTo="all"
            ListModeration="false"
            UsesCurrentItem="true">
      <RuleDesigner Sentence="Update %1">
        <FieldBind Field="UpdateList"
                   Function="UpdateOrderList"
                   DesignerType="ChooseListItem"
                   ID="1"
                   Text="My Custom List">
        </FieldBind>
      </RuleDesigner>
      <Parameters>
        <Parameter Type="System.String, mscorlib"
                   Direction="In"
                   Name="UpdateList"
        </Parameters>
    </Action>
  </Actions>
</WorkflowInfo>

See Also

Tasks

.ACTIONS File Example

Concepts

Creating Declarative, No-Code Workflow Editors

Default Workflow Actions

Default Workflow Conditions