Initiation Element (WorkflowConfig)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Contains workflow initiation information, such as the workflow initiation form and the data fields on the initiation form.

Definition

<Initiation URL="Text"
</Initiation>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

**URL**

Required **Text**. Specifies the path to the workflow initiation form for the workflow.

The path specified must be relative to the location of the workflow configuration file.

Child elements

Element
Parameters Element (WorkflowConfig)
Fields Element (WorkflowConfig)

Parent elements

Element
WorkflowConfig Element

Remarks

The initiation form specified should contain a data field for each Field Element (Field) element defined in the Fields Element (WorkflowConfig) section of the workflow configuration file. If a data field is not present, the default value is used when the workflow starts.

After the workflow has been associated with a specific SharePoint list, the contents of the URL attribute are stored in the InstantiationUrl property of the SPWorkflowTemplate and SPWorkflowAssociation objects for the workflow.

Applications created to work as a declarative rules-based, code-free workflow editor can use the AssociateWorkflowMarkup(String, String) method of the websvcWebPartPages Web Service to create a workflow template and associate it to a SharePoint list specifying a workflow markup file, a workflow configuration file, and optionally, a workflow rules markup file.

For more information about creating an application that can act as a declarative rules-based, code-free workflow editor, see Creating Declarative, No-Code Workflow Editors.

Example

The following example Initiation element contains a URL attribute that specifies the location of the workflow initiation form to use for this workflow.

The element also contains a Fields element, which in turn contains a Field element that defines the single data field on the initiation form. Note that the Parameters element contains a corresponding Parameter element, with a matching Name attribute value that specifies the data type of the Field element.

This example has been edited for clarity.

    <Initiation
        URL="Workflows/Notify Me/Notify Me.aspx">
      <Fields>
        <Field
          Name="Reason_for_Review"
          …
          DisplayName="Reason_for_Review"
          …
        >
          <Default>Standard review of new documents</Default>
        </Field>
      </Fields>
      <Parameters>
        <Parameter Name="Reason_for_Review" Type="System.String" />
      </Parameters>
    </Initiation>

See also