Workflow State Conditions

Note: This content is no longer updated. For the latest content, please go to the user guide for M-Files Online. For information on the supported product versions, refer to our lifecycle policy.

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.

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 Available VBScript Variables.

Note: The M-Files API documentation is available online: M-Files API. For more information about using VBScript in M-Files, see the How do I write VBScript code for M-Files purposes? tutorial.


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.