IWorkflowModificationService.EnableWorkflowModificationOfType Method
Enables a workflow modification by specifying a modification ID, a modification type ID, context data, and name format data.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<CorrelationInitializerAttribute> _
Sub EnableWorkflowModificationOfType ( _
modificationId As Guid, _
modificationTypeId As Guid, _
contextData As String, _
nameFormatData As String _
)
'Usage
Dim instance As IWorkflowModificationService
Dim modificationId As Guid
Dim modificationTypeId As Guid
Dim contextData As String
Dim nameFormatData As String
instance.EnableWorkflowModificationOfType(modificationId, _
modificationTypeId, contextData, _
nameFormatData)
[CorrelationInitializerAttribute]
void EnableWorkflowModificationOfType(
Guid modificationId,
Guid modificationTypeId,
string contextData,
string nameFormatData
)
Parameters
modificationId
Type: System.GuidThe identifier of the workflow modification. This GUID is used to identify the modification itself.
modificationTypeId
Type: System.GuidThe identifier of the the template on which the workflow modification is based. This GUID is used to identify the modification form.
contextData
Type: System.StringContext data to pass to the workflow modification form upon launch.
nameFormatData
Type: System.StringThe display name to use for the workflow modification.
Remarks
Like the EnableWorkflowModification(Guid, String) method, the EnableWorkflowModificationOfType method adds a link to a workflow modification on the workflow status page.
What the EnableWorkflowModificationOfType method offers in additional behavior is the ability to use the same modification in multiple places in the workflow. Internally, the modificationId parameter is used to keep track of the workflow modification activity. For example, when the workflow modification event is raised, this GUID is passed in the modificationId field of the SPModificationEventArgs object. In contrast, the modificationTypeId parameter identifies the workflow modification template, which in turn specifies the URL of a modification form in the ModificationUrl property. The nameFormatData parameter is used for the display name of the modification, enabling multiple uses of the same modification in the same workflow to have slightly different display string.
See Also
Reference
IWorkflowModificationService Interface
IWorkflowModificationService Members