Changes the current lifecycle state of this document. Note that you cannot change the state of a document that is a reservation object. Valid lifecycle states are defined by the collection of DocumentState objects belonging to this document's associated DocumentLifecyclePolicy object. You can change a document's current lifecycle state to another predefined state, place a document into the exception state, or remove a document from the exception state by specifying a LifecycleChangeFlags constant in the LifecycleChangeFlags parameter as follows:

  • PROMOTE: Promotes the document's current lifecycle state to the next state in its document lifecycle policy and sets the document's CurrentState property to the name of the next state. Throws an error if the document is in the exception state, in the first state of its lifecycle, or does not allow demotion.
  • DEMOTE: Demotes the document's current lifecycle state to the previous state in its document lifecycle policy and sets the document's CurrentState property to the name of the previous state, unless the CanBeDemoted property of the document’s current state (DocumentState object) is set to false. Throws an error if the document is in the exception state or in the first state of its lifecycle.
  • SET_EXCEPTION: Places the document into the exception state and sets its IsInExceptionState property to true. Throws an error if the document's IsInExceptionState property is already set to true.
  • CLEAR_EXCEPTION: Removes the document from the exception state and sets its IsInExceptionState property to false. Throws an error if the document's IsInExceptionState property is already set to false.
  • RESET: Resets the lifecycle state to the initial state in its document lifecycle policy and sets the document's CurrentState property to the name of the initial state. Throws an error if the document is in the exception state.


Namespace: FileNet.Api.Core
Assembly: FileNet.Api (in filenet.api.dll)

Syntax

Visual Basic (Declaration)
Sub ChangeState( _ 
   ByVal flags As LifecycleChangeFlags _ 
)
C#
void ChangeState(
   LifecycleChangeFlags flags
)
C++
void ChangeState(
   LifecycleChangeFlags flags
) abstract 
J#
void ChangeState(
   LifecycleChangeFlags flags
)
JScript
function ChangeState(
   flags : LifecycleChangeFlags
)

Parameters

flags
A LifecycleChangeFlags constant that specifies the new lifecycle state for this document.

See Also