M-Files Download

The M-Files Upload plugin downloads a single file from an M-Files system (see M-Files).

This Action plugin is not initially installed with Workflow. It is available for download on the Resource Center (help.objectiflune.com).
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.

To be able to use this plugin you need a working M-Files installation and a user account with appropriate permissions.

Input

The input of this plugin can be any file, since it isn't used by the plugin.

Processing

The M-Files Download plugin starts by sending a login request to the M-Files Server. Once the connection is established, it tries to download a copy of the specified file from the Vault that it is connected to.
If the search for files results in multiple files being found, then only the first file is downloaded.
The downloaded file is not removed from the M-Files Server.
The plugin saves either the file name or the response that it gets from the M-Files Server in a specified variable.

Output

The output of this task - the Job File - is either the downloaded file, or the document index data in XML or JSON format. In the latter case, the JSON/XML file includes a path to the file so it can be downloaded separately. The response that the plugin gets from the M-Files Server is then stored in a variable (if specified).

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 of which the value 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 erver.

  • 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.
  • Username, Password: Enter the user name and password that the plugin can use to send a login request to the M-Files Server.

  • 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 Download tab.

Download Tab

  • Source:

    • Class: Document Classes are defined (per Vault) on the M-Files server. Select the Class of the document to download from the drop-down list.
    • Select whether to retrieve a document by ID or to search for a document by property.
      • Retrieve by ID:

        • Document ID: Specify the Document ID.

        • Version (optional): Specify the version of the document (at the root level of the Vault). If the version is not given, the latest version of the document will be retrieved.

        • FileID (optional): If the file ID is not given, the first file - the root document - will be retrieved.

      • Retrieve by search: This section allows the retrieval of files by searching for specific properties (Definition entries). Enter the properties under Index data.

        • Field: The property to search for. 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 value to search for.

        Use the Index data buttons to:

        • , Add and removeproperties.
        • , 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 arenotvalidated.
        • 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: Select whether to store the file name, response or document index data that the plugin gets from the M-Files server in a variable, and specify the name of the variable to use.

    • Response: Select which result you wish stored, and which Workflow variable is to be used to store the result.

      • Store file name in variable: Stores the name of the downloaded file in a variable.
      • Store response in variable: Stores the success/failure response in a variable.
      • Save document index data to Job as XML/JSON: Outputs the document index data to the Job File as XML or JSON (according to the selected option)andstores the status information in a variable (if it exists). The downloaded document itself is stored in the Connect File Store. The XML/JSON output file includes a URL to the document so that it can be downloaded separately.

      In the Response variable field you can enter the Workflow variable in which the file name or status information should be stored. (Right-click and select Variables > Local variables > yourvariable.)
      This is optional. If the variable exists, it will be used.

      The M-Files plugin searches for the variable by name and sets the selected response into the variable.
      So using var_response as the variable name would mean that M-Files Download searches for the local variable of that name.

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.