Note
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier les répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de changer de répertoire.
See an overview of the initiation and association properties that SharePoint sets on workflows.
Remarque
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.
Remarque
[!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
Les valeurs des propriétés d’association sont définies lorsque vous appelez 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 avec un astérisque (*) ne sont pas définies dans les API de flux de travail. Par conséquent, 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) .
Importante
[!IMPORTANTE] Properties marked with an asterisk (*) are not defined in the Workflow APIs, so to access them simply use their string values.
Remarque
[!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. Vous pouvez récupérer les valeurs des variables externes à l’extérieur du flux de travail à l’aide de Propriétés .
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:
Les instances de flux de travail de liste ont des variables externes supplémentaires définies par défaut lorsque vous appelez StartWorkflowOnListItem :
Remarque
[!REMARQUE] You can add custom initiation properties by using an initiation form.