Configuration

Application

Application Configuration

The configuration of an application consists of base properties which are common for all types of applications, while type-specific ones are located in the "details" property. The bare minimum of properties, regardless of the type of application, is to set the "name", "type" and "details".

User application configuration files should be stored in the %LocalAppData%\Tick42\UserData\<ENV-REG>\apps folder where <ENV-REG> should be replaced by the environment and region of your Glue42 Enterprise copy (e.g., T42-DEMO). The files at this location will not be erased or overwritten in case you change or upgrade your version of Glue42 Enterprise.

The configuration files of the apps that come with the Glue42 Enterprise installer are located in the %LocalAppData%\Tick42\GlueDesktop\config\apps folder. For more details, see the application configuration schema.

Window

Window applications are web applications which run in a Glue42 browser window.

{
    "name":"GlueWebsite",
    "title":"Glue42 website",
    "caption": "The website of Glue42",
    "icon": "http://localhost:22080/resources/icons/tick42.ico",
    "type": "window",
    "details":{
         "url":"https://glue42.com",
         "mode": "flat",
         "width": 400,
         "height": 400
    }
}

Only "url" is required for this type of application. However, for a better user experience, the "title" should be set ("title" is the name of the app that appears in the App Manager). The "mode", "width" and "height" properties are responsible for the appearance of the window and the "caption" is just a description.

The supported formats for the application icon are ICO, PNG, APNG and JPG.

For more details, see the application configuration schema.

Workspaces App

A Workspaces App is a web application that can host Glue42 Workspaces. Note that Glue42 Enterprise expects only one application definition for a Workspaces App - i.e., one configuration file with "type" property set to "workspaces". Having multiple Workspaces App definitions will cause unexpected behavior when handling Workspaces. Glue42 Enterprise comes with a Workspaces UI app and a configuration file for it named workspaces.json and located in %LocalAppData%\Tick42\GlueDesktop\config\apps. If you are creating your custom Workspaces App, make sure to modify or replace this file with your own configuration file, or delete it, if your application configurations are stored at another location.

The "type" property must be set to "workspaces":

{
    "title": "Workspaces UI",
    "type": "workspaces",
    "name": "workspaces-demo",
    "icon": "http://localhost:22080/resources/icons/workspaces.ico",
    "details": {
        "layouts": [],
        "url": "http://localhost:3000"
    },
    "allowMultiple": true,
    "customProperties": {}
}

The "type" and "name" top-level properties are required. The "url" and "layouts" properties in the "details" object are optional.

Use "url" to specify where the application is hosted, otherwise it will default to the Workspaces App template distributed with Glue42 Enterprise.

Defining Workspace Layouts

Use the "layouts" property to predefine Workspace layouts that will be loaded automatically when the Workspace App starts:

"details": {
    "layouts": [
        // Standard Workspace layout definition.
        {
            "children": [
                {
                    "type": "column",
                    "children": [
                        {
                            "type": "group",
                            "children": [
                                {
                                    "type": "window",
                                    "appName": "clientlist"
                                }
                            ]
                        },
                        {
                            "type": "group",
                            "children": [
                                {
                                    "type": "window",
                                    "appName": "clientportfolio"
                                }
                            ]
                        }
                    ]
                }
            ]
        },

        // Or a simpler Workspace layout definition for an already existing layout.
        {
            "layoutName": "My Workspace"
        }
    ]
}

Use the "config" property of the standard Workspace layout object or the "restoreConfig" property of the simpler object to pass context to the Workspace or to hide/show its tab header:

"details": {
    "layouts": [
        // Standard Workspace layout definition.
        {
            "children": [
               ...
            ],
            "config": {
                "noTabHeader": true,
                "context": { "glue" : 42 }
            }
        },

        // Or a simpler Workspace layout definition for an already existing layout.
        {
            "layoutName": "My Workspace",
            "restoreConfig": {
                "noTabHeader": true,
                "context": { "glue" : 42 }
            }
        }
    ]
}

Hiding the Workspace tab header with the "noTabHeader" property prevents the user from manipulating the Workspace through the UI and allows for the Workspace to be controlled entirely through API calls. For instance, a Workspace may be tied programmatically to certain logic, a button, etc., designed to manage its state without any user interaction. For a demonstration of this functionality, see the Pinned Workspace Tabs example on GitHub. It shows how to load default Workspaces with hidden tab headers and control them with custom buttons in the Workspaces App header area.

Exe

An executable application which can be executed from your OS. This is a basic example for an EXE configuration:

{
    "name":"MyApplication",
    "title":"My application",
    "caption": "An application description",
    "type": "exe",
    "details":{
         "path":"%GDDIR%/../PathToWpfApplication/",
         "command": "WpfApplication.exe",
         "parameters": "param1 param2",
         "width": 400,
         "height": 400
    }
}

For more details, see the application configuration schema.

ClickOnce

Example configuration of a Glue42 enabled ClickOnce application:

{
    "title": "Client List - ClickOnce",
    "type": "clickonce",
    "name": "cl-clickonce",
    "details": {
        "url": "http://enterprise.glue42.com/install/enterprise/demos/ClickOnce/ClickOnceClientProfileDemo.application",
        "width": 1000,
        "height": 400,
        "appParameters": [
            {
                "name": "p1",
                "value": "customParameter"
            }
        ]
    }
}
Property Description
"type" Must be "clickonce".
"url" The web address pointing to the physical location where the ClickOnce application is deployed and from where it will be installed on the user machine.
"appParameters" Array of objects which define custom parameters that your application can access at runtime through glue.GDStartingContext.ApplicationConfig.Details.AppParameters. Each object sets the "name" and the "value" of a custom parameter.

For more details, see the application configuration schema.

Batch file

Batch files can also be included as Glue42 Enterprise applications. Here is an example:

{
    "name":"MyBatchFile",
    "title":"My batch file",
    "caption": "An application description",
    "type": "exe",
    "details":{
         "path":"%GDDIR%/../PathToMyBatchFile",
         "command": "bat.bat",
         "parameters": "param1 param2",
         "width": 400,
         "height": 400
    }
}

For more details, see the application configuration schema.

Activity

An activity is an application which defines a set of windows that have a common context. Only the "owner" property is required:

[
    {
        "title": "Clients",
        "type": "activity",
        "name": "clients",
        "icon": "http://localhost:22080/resources/icons/client-list.ico",
        "hidden": false,
        "details": {
            "initialContext": {
                "context": "someContext"
            },
            "layout": {
                "mode": "pixels"
            },
            "owner": {
                "type": "clientlist",
                "name": "ClientList",
                "left": 20,
                "top": 20,
                "width": 400,
                "height": 400
            },
            "windows": [    
                {
                    "type": "clientportfolio",
                    "name": "ClientPortfolio",
                    "left": 420,
                    "top": 20,
                    "width": 400,
                    "height": 400
                }
            ]
        }
    },
    {
        "title": "Client List",
        "type": "window",
        "name": "ClientList",
        "hidden": true,
        "details": {
            "url": "http://localhost:22080/client-list-portfolio-contact/dist/#/clientlist",
            "mode": "html"
        },
        "activityTarget": {
            "enabled": true,
            "windowType": "clientlist"  
        }                               
    },
    {
        "title": "Client Portfolio",
        "type": "window",
        "name": "ClientPortfolio",
        "hidden": true,
        "details": {
            "url": "http://localhost:22080/client-list-portfolio-contact/dist/#/clientportfolio/",
            "mode": "html"
        },
        "activityTarget": {
            "enabled": true,
            "windowType": "clientportfolio"
        }
    }
]
Property Description
"owner" The owner window of the activity.
"windows" Array of helper windows.
"type" Unique window identifier within the Activities" API (defaults to the application name).

Only the "owner" property is required. It is useful to specify the "activityTarget" property in order to describe how your application will look when it is an activity window. The same is valid for the "layout" property, which specifies whether the window dimensions are in "pixels" (default) or relative to the screen ("percents"). For more details, you can see the application configuration schema.

Node.js

An application which runs under Node.js:

  {
    "title": "MyNodeServer",
    "name": "nodeServer",
    "caption": "Server description",
    "type": "node",
    "service": true,
    "details": {
      "path": "%GDDIR%/PathToMyServer",
      "showConsole": true
    }
  }

For a Node.js application, the only type specific property which is required is the "path". It must lead to a JS file which will be executed by Node.js from Glue42 Enterprise. For more details, see the application configuration schema.

Service Window

Service windows are more of a specific usage of a window than an actual type, nevertheless they play a big a role in the development of Glue42 enabled applications, because they can provide data and/or enhance other applications throughout the Glue42 Enterprise life cycle. The window is defined as an application that is hidden and is started along with Glue42 Enterprise (its "autoStart" property is set to true). An example function of a service window is an app which listens for received emails and notifies applications that require this information.

{
    "name": "EmailsCollector",
    "type": "window",
    "service": true,
    "hidden": true,
    "autoStart": true, 
    "details": {
        "hidden":true,
        "url": "https://myemailcollectorservicewindow.com"
    }
}

Note that the "hidden" property in the "details" object hides the window from the user while the "hidden" top-level key hides it from the user in the App Manager.

For more details, see the application configuration schema.

Citrix App

A Citrix Virtual Application can be configured just like any other Glue42 enabled application. It can participate in the Glue42 environment as a first-class citizen and use all Glue42 functionalities. A Citrix application must be configured as a "citrix" type and the "name" property in the "details" key must be set with the exact published name of the Citrix application. Use the "parameters" property under "details" to pass command line arguments for starting the app.

The following demonstrates a basic Citrix app configuration:

{
    "title": "Client List - Citrix",
    "type": "citrix",
    "name": "clientlist-citrix",
    "details": {
        "name": "Client List",
        "parameters": "--mode=3 --clients=http://localhost:22060/clients",
        "left": 100,
        "top": 100,
        "width": 600,
        "height": 700
    }
}

For system-wide Citrix configuration, see the System Configuration section.

Grouping Applications

Applications can be grouped in folders and subfolders in the Application Manager via configuration:

App Grouping

To group applications in folders/subfolders, use the "customProperties" top-level key in the application configuration file:

{
    "name":"ClientList",
    "title":"Client List",
    "icon": "http://localhost:22080/resources/icons/tick42.ico",
    "type": "window",
    "customProperties": {
        "folder": "Clients"
    },
    "details":{
         "url":"http://localhost:3000/client-list"
    }
}

The configuration below shows how to group applications in a subfolder:

{
    ...
    "customProperties": {
        "folder": "Clients/Corporate"
    },
    ...
}

Configuration Validator

We offer a free Glue42 Configuration Validator tool which you can install as a Visual Studio Code extension. The validator tool has several functionalities:

  • Performs real time validation of JSON files on save or change of the active editor.
  • Can generate template configurations for five types of Glue42 applications - "window", "exe", "activity", "node" and Service Windows.
  • Can deploy (copy) the created configuration to a specified application configuration folder.

For more detailed information, see the README of the Glue42 Configuration Validator.