ISharePointService.SetState Method
Sets the workflow to the specified workflow status.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Sub SetState ( _
workflowId As Guid, _
index As Integer, _
state As Integer _
)
'Usage
Dim instance As ISharePointService
Dim workflowId As Guid
Dim index As Integer
Dim state As Integer
instance.SetState(workflowId, index, state)
void SetState(
Guid workflowId,
int index,
int state
)
Parameters
workflowId
Type: System.GuidThe ID of the workflow instance.
- index
Type: System.Int32
state
Type: System.Int32The status to which to set the workflow.
Remarks
Each workflow status column value corresponds to an integer that represents its place in a 0-based ordered list of column values. Use this integer, rather than the text value of the status, to refer to the status column value in the workflow code.
For more information, see ExtendedStatusColumnValues Element (Workflow).
This method is used by the SetState class of the Microsoft.SharePoint.WorkflowActions namespace.