Workflow state conditions

On the Conditions tab of the State Properties dialog, you can specify different preconditions and postconditions for the state transitions. For example, you can select properties or their values that a document must have before M-Files moves it to a different state. The conditions can also show users that specified documents (for example, project documentation) must be on a certain level before it is possible to move them to the next level.

To open the dialog, see instructions on editing states.

You can use variables, generic features of VBScript, and M-Files API to specify conditions that meet special needs.

Important: When you develop new extensions or edit existing ones, we recommend that you replace VBScript content with Vault Application Framework (VAF) compatible code for future compatibility. For information on the benefits of VAF over VBScript, refer to The Vault Application Framework in M-Files Developer Portal.

You can use these variables: VaultSharedVariables, MFScriptCancel, CurrentUserID, Vault, DisplayID, ObjVer, PropertyValues, StateID, PropertyDef, SavepointVariables, TransactionCache, and GetExtensionObject. For more information about variables, see Available VBScript variables.

Note: The M-Files API documentation is available online: M-Files API.


The Conditions tab of the workflow state properties.

Preconditions

The state preconditions specify the properties that an object must have before it can be moved to this state.

For example, the document must contain the Approved by information before it is moved to the Approved state.

Postconditions

The state postconditions specify the properties that an object must have for it to be moved out of this state.

For example, the purchase invoice must have the Cost center information before it is moved from the Awaiting definition of cost center state.