Conditions

On the Conditions tab you can specify different pre- and post-conditions for the state transitions. For example, you can define specific properties or their values that a document should meet before it can moved to this state. The conditions can also specify that, for instance, the basic documents related to the project (specification document, implementation and project timetable instructions, etc.) must be on a certain level before moving to the next level is possible.

Video: State Transition Conditions

The conditions can be specified in broader scope and detail using variables, generic features of VBScript, and M-Files API. The following variables can be used in advanced conditions: VaultSharedVariables, MFScriptCancel, CurrentUserID, Vault, DisplayID, ObjVer, PropertyValues, StateID, PropertyDef, SavepointVariables, TransactionCache, and GetExtensionObject. For more information about variables, refer to VBScript Variables Explained.

Note: The documentation for the M-Files API is located in Start > Programs > M-Files > Documentation > M-Files API. For more information about VBScript code and M-Files API, go to www.m-files.com/api. Instructions on writing VBScript code and working with the M-Files API are available for a separate fee from M-Files customer support ([email protected]).

The "Conditions" tab of the workflow state properties.

Preconditions

The state preconditions specify the object properties that are required in order for the object to be moved to this state.

For example, you can specify that the Approved by information must be entered before the document can be moved to the Approved state.

Postconditions

The state postconditions specify the object properties that are required in order for the object to be moved out of this state.

For example, you can specify that the Cost center information in a purchase invoice must be entered before the document can be moved from the Awaiting definition of cost center state.