Propriétés de configuration et d’initiation de flux de travail
See an overview of the initiation and association properties that SharePoint sets on workflows.
Notes
Les flux de travail SharePoint 2010 ont été retirés depuis le 1er août 2020 pour les nouveaux locataires et retirés des locataires existants le 1er novembre 2020. Si vous utilisez des flux de travail SharePoint 2010, nous vous recommandons de migrer vers Power Automate ou d'autres solutions prises en charge. Pour plus d'informations, voir la retraite du flux de travail SharePoint 2010.
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.
Notes
[!REMARQUE] 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 : Les propriétés marquées d’un astérisque ( ) ne sont pas définies dans les API de flux de travail, donc pour y accéder, utilisez simplement * leurs valeurs de chaîne.
In the case of list workflows, there are four additional association properties that are set by default when you call PublishSubscriptionForList(WorkflowSubscription, Guid) .
Important
Les propriétés marquées d’un astérisque ( ) ne sont pas définies dans les API de flux de travail, donc pour y accéder, utilisez simplement * leurs valeurs de chaîne.
Notes
[!REMARQUE] 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 :
Notes
[!REMARQUE] You can add custom initiation properties by using an initiation form.