Data Sharing Between Apps
Overview
The Glue42 Channels are globally accessed named contexts that allow users to dynamically group apps, instructing them to work over the same shared data object. Assign a Glue42 enabled app to a Channel through the Channel Selector of the Glue42 Window:
When apps are on the same Channel, they share a context data object which they can monitor and/or update. See below how apps interact with each other using the Glue42 Channels:
Channels are based on Shared Contexts. A context object may contain various types of data - ids
, displayName
, etc.:
{
"contact": {
"ids": [
{
"systemName": "g42sfId",
"nativeId": "0031r00002IukOxAAJ"
},
{
"systemName": "rest.id",
"nativeId": "0e23375b-dd4f-456a-b034-98ee879f0eff"
}
],
"displayName": "Nola Rios",
"name": {
"lastName": "Rios",
"firstName": "Nola",
"otherNames": null,
"honorific": "Ms.",
"postNominalLetters": null
}
}
}
Different apps on the same Channel may use different parts of the data:
- The "Client List" app updates the context object with data for the selected user (
ids
,displayName
, etc.). - The "Portfolio" app uses the
ids
to load the portfolio of the client selected in the "Client List" app by the user. It also updates the shared context object with new values when the user selects different instruments (e.g., theRIC
field is updated).
Defining Channels
To define any number of Channels in Glue42 Enterprise for your apps to use, modify the channels.json
file located in the %LocalAppData%\Tick42\GlueDesktop\config
folder. Below is an example of adding a custom black Channel to the already existing default list of Channels in Glue42 Enterprise:
{
"name": "Black",
"meta": {
"color": "black"
}
}
For more details on how to configure Channels, see the Developers > Configuration > Channels section.
For details on using Channels in FDC3 apps, see the FDC3 Compliance section.
Channel Selector
To add the Channel Selector to your window, set "allowChannels"
to true
in your app configuration file under the "details"
top-level key:
{
"title": "Client List 🔗",
"type": "window",
"name": "channelsclientlist",
"icon": "https://dev-enterprise-demos.tick42.com/resources/icons/clients.ico",
"details": {
"url": "https://dev-enterprise-demos.tick42.com/client-list-portfolio-contact/#/clientlist",
"mode": "tab",
"allowChannels": true
}
}
In some cases, you may want to show the Channel Selector, but prevent the user from interacting with it. Set the "readOnlyChannelSelector"
property to true
under the "details"
top-level key in your app configuration file to achieve this:
{
"title": "Client List 🔗",
"type": "window",
"name": "channelsclientlist",
"icon": "https://dev-enterprise-demos.tick42.com/resources/icons/clients.ico",
"details": {
"url": "https://dev-enterprise-demos.tick42.com/client-list-portfolio-contact/#/clientlist",
"mode": "tab",
"allowChannels": true,
"readOnlyChannelSelector": true
}
}
You can also set the Channel Selector as read-only on a global level from the system.json
system configuration file of Glue42 Enterprise under the "windows"
top-level key:
{
"windows": {
"readOnlyChannelSelector": true
}
}
Note that the settings in your app configuration file will override the global settings in the system.json
file.