SetState.State Property
Specifies the status to set the workflow to.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
<ValidationOptionAttribute(ValidationOption.Required)> _
Public Property State As Integer
Get
Set
'Usage
Dim instance As SetState
Dim value As Integer
value = instance.State
instance.State = value
[ValidationOptionAttribute(ValidationOption.Required)]
public int State { get; set; }
Property Value
Type: System.Int32
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. The first fifteen status column values (that is, 0 through 14) either refer to default workflow status values or are reserved by SharePoint Foundation for internal use.
You can also specify custom workflow status column values in the workflow definition file. The first status column value you specify is assigned the integer value of 15; the second status value, 16; and so on.
For more information, see ExtendedStatusColumnValues Element (Workflow).
The maximum workflow status value index reserved by SharePoint Foundation is represented by SPWorkflowStatus.Max. Therefore, in code, to set the workflow status to the first custom workflow value you've defined, you would set the State property to SPWorkflowStatus.Max plus one.
See Also
Reference
Microsoft.SharePoint.WorkflowActions Namespace