M-Files Upload
The M-Files Upload plugin uploads a single file to an M-Files system (see M-Files).
This Action plugin is not initially installed with Workflow. It is available for download on the OL Resource Center.
After downloading the .PPK file, you have to import it into Workflow; see Importing a plugin
Once installed, the plugin will appear in the Document Management category in the Plug-In Bar.
Note: To be able to use this plugin you need a working M-Files installation and a user account with appropriate permissions.
The M-Files Upload plugin is designed to be configured offline as well as online. Once a Test Connection has been established, the Vaults and properties data will be downloaded and stored locally. This allows authoring of Workflow configurations without requiring a constant live connection.
Input
The input of this plugin can be any file.
Processing
The M-Files Upload plugin starts by sending a login request to the M-Files Server. Once the connection is established, it tries to upload the specified file to the M-Files Server, either as a new document or as the new version of an existing document. The plugin saves the (JSON) response that it gets from the M-Files Server in the specified variable.
Output
The output of this plugin is the unchanged Job File.
Task properties
All of the task's General properties are dynamic. This means that you can use any combination of text, variables and data selections. The value of variables and data selections will be determined whenever the process runs (see Variable task properties).
Connection Tab
The plugin needs your M-Files Server's credentials and a Vault name in order to start communicating with the M-Files Server.
-
M-Files Server: Enter the address of the M-Files Server (e.g. https://mycloud.sample.com/m-files).
- Vault: Enter the name of the desired Vault. This is required. The uploaded file will be stored in this Vault.
-
Username, Password: Enter the user name and password that the plugin can use to send a login request to the M-Files Server. The user should have the appropriate rights.
- Test Connection: Click this button to establish a connection with the M-Files Server and retrieve the Document Classes of the selected Vault. This information is used on the Upload tab.
Upload Tab
-
File to upload:
-
Job file: Click this option to upload the current Job File (see Job file).
- External file: Click this option to upload an external file. Specify a full file name.
- File type: Select the file type of the file to upload. The default is Auto-detect, in which case the file extension is used to determine the file type.
-
- Destination:
- Class: Document Classes are defined (per Vault) on the M-Files server. Select the desired Class from the drop-down list.
Select whether to create a new document or update an existing one.
Create new document: In Create mode, a new document with a single file is created at the root level of the Vault.
Update existing document: In this mode, the file is added as the new version of an existing document (at the root level of the Vault) and its properties may be changed. To find the existing document, the plugin needs the following data:
Search Field: Select a property of the existing document. Properties are defined in the Metadata Structure of the respective Vault on the M-Files server.
Value to be searched: Enter the value of the given property. Note that this should uniquely identify the document. When multiple documents are found, this will result in an error.
-
Index data: Specify properties that must be set in M-Files as metadata for the uploaded file. Any existing values will be replaced with the given value.
-
Field: Enter a property, or click the button between the Field and Value columns to select one of the properties defined for this particular Document Class in the Metadata Structure of the Vault on the M-Files server.
-
Value: The (new) value of the property.
Note: The plugin will fail if a required property is missing from the Index data, or if the Index data contains a property that does not exist for the chosen Class.
Use the Index data buttons to:
- Add and remove properties.
- Change the order of the properties by moving them up or down. This is for convenience only; to the M-Files Server, this order is not important.
- Validate properties and check for duplicates. Any properties that have already been defined higher up in the list are displayed in orange. Any properties that are not defined in the Metadata Structure for the selected Document Class are displayed in red.
Note that values are not validated. - Add missing properties. Any properties that are defined in the Metadata Structure for the selected Document Class, but not specified in the Index data, are added to the Index data.
-
-
Response:
-
Store response in a variable (optional): Specify a variable if you want the plugin to store the JSON response that it gets from the M-Files server.
-
Advanced properties
To get access to the following properties tabs, right-click the plugin in the process and select Advanced Properties.
On Error Tab
For a description of the options on the On Error tab see Using the On Error tab.
Miscellaneous Tab
The Miscellaneous tab is common to all tasks.
It contains a text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button and are displayed in The Task Comments Pane.
Check the option Use as step description to display the text next to the icon of the plugin in the Process area.
The tab also provides an option to highlight the task in The Process area with the default color, set in the Preferences (see Colors), or the color selected or defined under Highlight color on this tab.
To revert the selected highlight color to the default color, open this tab, turn the Highlight option off and close the dialog with the OK button; then turn highlighting back on.
Highlighting can also be turned on and off via the task's contextual menu and with the Highlight button on the View ribbon.