Vault Application

Hello,

We are developing an M-Files application that needs to include:

  • A Vault Application Framework 22.12 server component (C# class VaultApplication : ConfigurableVaultApplicationBase<T>), and
  • A User Interface Extensibility Framework client component (ShellUI module with right-pane dashboards and custom commands).

We would like to deploy this as a single application package.

We attempted to merge the two by updating appdef.xml like this:

 

<application type="both" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

             xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-Server-v5.xsd">

  <guid>eb1ec555-b326-46df-899b-8ece191a08bd</guid>

  <name>My Company</name>

  <version>1.0</version>

  <required-mfiles-version>22.3.0.0</required-mfiles-version>

 

  <extension-objects>

    <extension-object>

      <name>GCG.Vault.Hybrid</name>

      <assembly>GCG.Vault.Hybrid.dll</assembly>

      <class>GCG.Vault.Hybrid.VaultApplication</class>

      <installation-method>Install</installation-method>

      <uninstallation-method>Uninstall</uninstallation-method>

      <initialization-method>Initialize</initialization-method>

      <uninitialization-method>Uninitialize</uninitialization-method>

      <start-operations-method>StartOperations</start-operations-method>

    </extension-object>

  </extension-objects>

 

  <modules>

    <module environment="shellui" fast-browsing-compatible="true">

      <file>Client/main.js</file>

    </module>

  </modules>

 

  <dashboards>

    <dashboard id="eforms-dashboard">

      <content>Client/eforms.html</content>

      <allow-selection>true</allow-selection>

    </dashboard>

  </dashboards>

</application>

 

 

We tried appdef-Server-v5.xsd as well as appdef -v5.xsd

 

When we install this application:

  • If we use appdef-server-v5.xsd, the server component loads, but the dashboard never appears.
  • If we use appdef-v5.xsd with type="both", I get an error:

The structure of the application is invalid. (Unrecognized application definition schema or application structure.)

 

So, my questions are:

  1. Does M-Files 22.12 fully support hybrid applications (type="both") with both server extension objects and client dashboards?
  2. Which schema (appdef-server-v5.xsd or appdef-v5.xsd) is correct for hybrid apps?
  3. Is there an official example or template for packaging Vault Application Framework + UIX into one app?

We have installed M-Files extension for VS-2022

Parents Reply
  • Apology for multiple posts for the question, however, I have tried and it is not working the way it is advised.
    1. I have used the server app guid in client.
    2. compiled the client app and created .mfappx.
    3. using this .mfappx in server application with below code

     

    public override void Initialize(MFilesAPI.Vault vaultSrc)
    {
    try
    {
    SysUtils.ReportToEventLog($"The application path is {Directory.GetCurrentDirectory()}", System.Diagnostics.EventLogEntryType.Information);
    string appPath = "app.mfappx";

    if (File.Exists(appPath))
    {
    vaultSrc.CustomApplicationManagementOperations.InstallCustomApplication(appPath);
    }
    else
    {
    SysUtils.ReportErrorToEventLog("File: " + appPath + " does not exist");
    }
    }
    catch (Exception ex)
    {
    if (!MFUtils.IsMFilesAlreadyExistsError(ex))
    SysUtils.ReportErrorToEventLog(ex.Message);
    }

    base.Initialize(vaultSrc);
    }

    it says in event logs
    The system cannot find the file specified. (app.mfappx)
    please note that app.mfappx is also installed as an application

Children