Workflow initiation and configuration properties
See an overview of the initiation and association properties that SharePoint sets on workflows.
Note
SharePoint 2010 workflows have been retired since August 1, 2020 for new tenants and removed from existing tenants on November 1, 2020. If you’re using SharePoint 2010 workflows, we recommend migrating to Power Automate or other supported solutions. For more info, see SharePoint 2010 workflow retirement.
When you launch a workflow, SharePoint automatically sets a number of association and initiation properties that support the workflow. These are listed below. The set of properties that are set differs slightly depending whether it is a site workflows or a list workflow. These differences are identified in the lists.
Use the following guidelines to associate and launch (initiate) your workflows using the workflow object model:
- To create an association for a list workflow, use the PublishSubscriptionForList method.
- To create an association for a site workflow, use the PublishSubscription method.
- To initiate a list workflow, use the StartWorkflowOnListItem method.
- To initiate a site workflow, use the StartWorkflow method.
Note
The two methods for associating workflows are found on the WorkflowSubscriptionService class, while the two methods for launching workflows are found on the WorkflowInstanceService class.
Association properties
The values of association properties are set when you call PublishSubscription . The association property values are association-level properties, meaning that all workflow instances with a given association share the same property value. You can retrieve an association property value within the workflow itself by using the GetConfigurationValue activity.
Following is a list of association properties that are set by default for both list and site workflows when you call PublishSubscription .
- AssociationTitle
- AssociatorUserId
- LayoutsFolder
- ParentContentTypeId()
- HistoryListId*
- TaskListId*
- FormData*
- SharePointWorkflowContext.Subscription.EventSourceId*
- SharePointWorkflowContext.Subscription.EventType*
- SharePointWorkflowContext.Subscription.DisplayName*
- SharePointWorkflowContext.Subscription.Id*
- SharePointWorkflowContext.Subscription.Name*
- SharePointWorkflowContext.Subscription.CreatedDate*
Important: Properties marked with an asterisk (*) are not defined in the Workflow APIs, so to access them simply use their string values.
In the case of list workflows, there are four additional association properties that are set by default when you call PublishSubscriptionForList(WorkflowSubscription, Guid) .
Important
Properties marked with an asterisk (*) are not defined in the Workflow APIs, so to access them simply use their string values.
Note
You can add custom association properties by using an association form.
Initiation properties
Initiation properties are external variables whose values are set when the workflow is initiated - that is, when you call StartWorkflow. Note, however, that the property values can be updated at runtime from within the workflow instance by using the ExternalVariableValue activity. You can retrieve the values of external variables from outside the workflow by using Properties .
External variable values are specific to each workflow instance (as opposed to association properties, where all workflow instances share the same property values).
All workflow instances (both list and site) have some external variables that are set by default when you call StartWorkflow:
List workflows instances have some additional external variables that are set by default when you call StartWorkflowOnListItem :
Note
You can add custom initiation properties by using an initiation form.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for