State transition trigger
On the Trigger tab of the State Transition dialog, you can specify a trigger to automatically start a state transition when certain conditions are fulfilled. For example, you can set a state transition to occur when all the assignments of a workflow state are completed or approved.
An automatic state transition for an object can occur for example on the basis of the property
values of the object.The server does automatic state transitions. User permissions are ignored. This means that you can use permissions to prevent users from manually starting a state transition.
You can set the transition to take place based on these criteria:
- The number of days that have passed
- Completed, approved, or rejected assignments
- Specific conditions that the object fulfills
- Conditions specified in a vault application or VBScript code
State transition after X days
You can set the state transition to occur after a set number of days. Specify the number of days in the Trigger the state transition after field.
State transition after assignments are completed, approved, or rejected
You can set M-Files Server to carry out the transition after users have a) completed or approved all assignments of a workflow state, or b) rejected any of them.
State transition when the object fulfills the specified criteria
You can set the state transition to occur when an object fulfills certain conditions. You can configure, for example, that the object is moved to the next state when a user gives it a certain property value. For example, you can specify that when a user adds a date to the Sent field for a document, M-Files automatically moves it to the Sent state.
For more information about filter settings, see Additional conditions .
State transition when the conditions specified in a vault application or VBScript code are met
You can also use a vault application or VBScript code to make the state transition occur. This lets you create transition logic beyond what the built-in configuration options provide. For example, you can validate multiple metadata values, check related objects, and apply custom business rules.
In VBScript code, you can use these M-Files
variables: StateID, StateTransitionID,
AllowStateTransition, NextStateID,
ObjVer, DisplayID, Vault, CurrentUserID, CurrentUserSessionInfo, PropertyValues, VaultSharedVariables, SavepointVariables,
TransactionCache, MFScriptCancel,
GetExtensionObject, MasterTransactionID, CurrentTransactionID, ParentTransactionID. For more information about variables, see Available VBScript variables.
Evaluation priority
With the evaluation priority, you can define the priority of parallel state transitions on M-Files Server. The priority is sorted from the lowest to the highest number. Zero (0) represents the highest priority.
Defining vaults for state transitions
You can define in which vaults the state transitions occur. Enter the vault GUIDs separated by semicolons (;). This can be especially useful with content replication.
Evaluation of the triggering criteria
M-Files evaluates the state transition trigger every 60 minutes and every time the object is changed.