共用方式為


SPWorkflowAssociation.ImportFromXml Method

Creates an SPWorkflowAssociation object from an XML formatted string.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Function ImportFromXml ( _
    rootWeb As SPWeb, _
    xml As String _
) As SPWorkflowAssociation
'Usage
Dim rootWeb As SPWeb
Dim xml As String
Dim returnValue As SPWorkflowAssociation

returnValue = SPWorkflowAssociation.ImportFromXml(rootWeb, _
    xml)
public static SPWorkflowAssociation ImportFromXml(
    SPWeb rootWeb,
    string xml
)

Parameters

  • xml
    Type: System.String

    An XML string that contains the state of all persisted properties of the association.

Return Value

Type: Microsoft.SharePoint.Workflow.SPWorkflowAssociation
The SPWorkflowAssociation reconstructed from the XML string.

Exceptions

Exception Condition
ArgumentNullException

rootWeb is null .

ArgumentOutOfRangeException

xml is null or empty.

Remarks

This method creates a new workflow association from the XML data represented by the xml parameter.

See Also

Reference

SPWorkflowAssociation Class

SPWorkflowAssociation Members

Microsoft.SharePoint.Workflow Namespace