Share via


Workflow Element (Elements)

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.

Defines a workflow.

<Workflow
  Title="Text"
  Name="Text"
  CodeBesideAssembly="Text"
  CodeBesideClass="Text"
  Description="Text"
  Id="Text"
  EngineClass="Text"
  EngineAssembly="Text"
  AssociationUrl="Text"
  InstantiationUrl="Text"
  ModificationUrl="Text"
  StatusUrl="Text"
  TaskListContentTypeId="Text" >
</Workflow>

Attributes

Attribute

Description

Title

Optional Text.

Name

Required Text. Specifies the workflow name that is displayed in the Windows SharePoint Services interface. The workflow name can be up to 256 characters long.

CodeBesideAssembly

Required Text. Specifies the strong name of the code beside assembly.

CodeBesideClass

Required Text. Specifies the name of the workflow class in the code-beside file used to generate the workflow assembly. This should include the namespace of the class.

Description

Optional Text. Specifies the workflow description to be displayed in the Windows SharePoint Services interface. The workflow description can be up to 256 characters long.

Id

Required Text. Specifies the globally unique identifier (GUID) for the workflow.

EngineClass

Reserved for future use.

EngineAssembly

Reserved for future use.

AssociationUrl

Optional Text. Specifies the URL of the association form for this workflow. Set the value of the AssociationURL attribute to the custom form page you want to use for workflow association. For example:

AssociationURL = "MyWkflAssociationPage.aspx"
Note
Windows SharePoint Services supports absolute or server-relative paths in the workflow template definition. All form path URLs must be expressed in one of these formats. For example, an absolute path, such as "http://site/library/page.aspx"; or a server-relative path, such as "/layouts/page.aspx". Windows SharePoint Services does not support link fix-up in workflow template definitions.

To use the same form for instantiation and association of the workflow, set both elements to that form.

For more information about association forms, see Workflow Association and Initiation Forms (Windows SharePoint Services).

InstantiationUrl

Optional Text. Specifies the URL of the initiation form for this workflow. For example:

InstantiationURL = "MyWorkflowInitiationPage.aspx"
Note
Windows SharePoint Services supports absolute or server-relative paths in the workflow template definition. All form path URLs must be expressed in one of these formats. For example, an absolute path, such as "http://site/library/page.aspx"; or a server-relative path, such as "/layouts/page.aspx". Windows SharePoint Services does not support link fix-up in workflow template definitions.

For more information about initiation forms, see Workflow Association and Initiation Forms (Windows SharePoint Services).

ModificationUrl

Optional Text. Specifies the URL of the form handling the modifications for this workflow. If your workflow includes multiple modifications, you can program the form you specify with this attribute to:

  • Display a different view of the form, based on the modification identifier passed to this form.

  • Redirect to a separate form, based on the modification identifier passed to this form.

For more information about modification forms, see Workflow Modification Forms (Windows SharePoint Services).

StatusUrl

Obsolete. Do not use.

TaskListContentTypeId

Optional Text. Specifies the content type ID of the content type assigned to the workflow task list.

For more information about task forms, see Workflow Task Forms (Windows SharePoint Services).

Child Elements

AssociationData Element (Workflow)

MetaData Element (Workflow)

Categories Element (Workflow)

Parent Elements

Elements Element (Workflow)

Remarks

For more information about association and initiation forms, see Workflow Association and Initiation Forms (Windows SharePoint Services).

Example

Following is an example of the Workflow element in a workflow definition elements file. The example has been edited for clarity.

<?xml version="1.0" encoding="utf-8" ?> 
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Workflow
        Name="AdventureWorksWorkflow"
        Description="Use this workflow to track sequential tasks of users."
        Id="C6964BFF-BG8D-41ac-AC5E-B61EC111731C"
        CodeBesideClass="AdventureWorks.Workflow1"
        CodeBesideAssembly="AdventureWorks, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e3bce121e9429c"
        TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
        AssociationUrl="_layouts/myAssocPage.aspx"
        InstantiationUrl="_layouts/myIniPage.aspx"
        ModificationUrl="_layouts/myModPage.aspx">
    <Categories/>
    <AssociationData>
      …
    </AssociationData>
    <MetaData>
      …
    </MetaData>
  </Workflow>
</Elements>

See Also

Concepts

Workflow Deployment Using Features

Workflow Definition Schema

Workflow Association and Initiation Forms (Windows SharePoint Services)

Workflow Modification Forms (Windows SharePoint Services)

Workflow Task Forms (Windows SharePoint Services)

Other Resources

Workflows in Windows SharePoint Services