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 they will not be erased or overwritten in case you change or upgrade your version of Glue42 Enterprise. <ENV-REG> in the link should be replaced with the region and environment folder name used for the deployment of your Glue42 Enterprise - e.g., T42-DEMO.

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

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.

Exe

An executable application which can be executed from your OS. This is a basic example of 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"
            }
        ]
    }
}
  • type - should 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"
        }
    }
]
  • 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 and the hidden property in the configuration object hides it from the user in the App Manager. For more details, see the application configuration schema.

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 Window.
  • Can deploy (copy) the created configuration to a specified application configuration folder.

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