Parameters Element (WorkflowConfig)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Represents a collection of the parameters for the workflow initiation form.
Definition
<Parameters>
</Parameters>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
Attributes
None |
Child elements
Element |
---|
Parameter Element (WorkflowConfig) |
Parent elements
Element |
---|
Initiation Element (WorkflowConfig) |
Remarks
For each Field Element (Field) element contained in the Fields Element (WorkflowConfig) element, there must be a corresponding Parameter Element (WorkflowConfig) element, in the Parameters element, with a matching Name attribute. The Parameter Element (WorkflowConfig) element specifies the System data type of the field.
The Fields Element (WorkflowConfig) element contains a collection of Field Element (Field) elements. Each Field Element (Field) element represents a data field on the workflow initiation form.
The Parameter Element (WorkflowConfig) element also represents a workflow variable of the same name. When the user submits the workflow initiation form, SharePoint Foundation passes the value specified for each parameter to the workflow instance as part of the InitiationData property.
Use the URL attribute of the Initiation Element (WorkflowConfig) element to specify the path to the workflow initiation form for the workflow.
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>