Confirm Workflow State Change
This application registers a VaultUI module that reacts when properties are changed on an object, allowing code to execute before the changes are sent to the server.
This application is only compatible with M-Files Desktop.
- The application consists of two files:
appdef.xml, which declares the application contents.
vaultui.js, a VaultUI module, which contains code which reacts to the
VaultEntry, and prompts the user for confirmation of the state change.
The application broadly takes the following approach:
- When the VaultEntry is created, a handler is registered to react to the
- When the
OnSetPropertiesOfObjectVersionevent occurs, the properties on the object are checked to see whether a state transition (MFBuiltInPropertyDefStateTransition) has been defined.
- If it has, the user is prompted to confirm their actions.
Testing and deploying
The simplest method to test an application is to copy the files into a local development folder. This allows you to alter the files and simply log out and into the vault to see the changes.
To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed on the M-Files Developer Portal.
When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. This can be avoided by pre-approving it using registry keys.