This method move the state up to index position in the workflow state order

Namespace: DotNetNuke.Entities.Content.Workflow
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
void MoveState(
	int stateId,
	int index
)
Visual Basic
Sub MoveState ( 
	stateId As Integer,
	index As Integer
)

Parameters

stateId
Type: System..::..Int32
State Id
index
Type: System..::..Int32
Index where the stateId will be moved. Since first and last states can't be moved, this index has to be a number between 1 and the number of states minus 2.

Remarks

This method takes care of state reordering.

Exceptions

ExceptionCondition
DotNetNuke.Entities.Content.Workflow.Exceptions..::..WorkflowDoesNotExistExceptionThrown when moving a state that does not exist
DotNetNuke.Entities.Content.Workflow.Exceptions..::..WorkflowInvalidOperationExceptionThrown when state cannot be moved (i.e.: is the first/last state, etc...)
DotNetNuke.Entities.Content.Workflow.Exceptions..::..WorkflowInvalidOperationExceptionThrown when index is not a valid value (index = 0 or index >= number of states - 2)

See Also