Configuration

Overview

Channels are based on Shared Contexts - named objects, holding cross-app data in the form of key/value pairs. The io.Connect Channels are defined in a channels.json file located in %LocalAppData%/interop.io/io.Connect Desktop/Desktop/config. It contains an array of objects, each one defining a different Channel. The Channel Selector app, which enables users to manually assign Channels to apps and control the data flow for directional Channels, can be configured globally and per app from the system.json file of io.Connect Desktop and from the app definition respectively.

Defining Channels

The following example demonstrates a minimal definition of two Channels - red and blue:

[
    {
        "name": "Red",
        "meta": {
            "color": "red"
        }
    },
    {
        "name": "Blue",
        "meta": {
            "color": "#66ABFF"
        }
    }
]

Each Channel object must have the following required properties:

Property Type Description
"name" string Required. Unique ID of the Channel.
"meta" object Required. Meta data about the Channel. The minimum you must specify here is the Channel color. You can also define other meta data which will be visible to all apps using the Channel.

The "meta" object has the following required property:

Property Type Description
"color" string Required. The Channel color, displayed on the Channel Selector UI and on each app using that Channel. Can be either an HTML color name or a hexadecimal color code.

You can define any number of Channels in io.Connect Desktop for your apps to use.

The following example demonstrates adding a custom black Channel to the already existing list of Channels in io.Connect Desktop:

{
    "name": "Black",
    "meta": {
        "color": "black"
    }
}

Custom Channel

Channel Selector

You can configure the Channel Selector globally via the system.json system configuration file of io.Connect Desktop located in the %LocalAppData%/interop.io/io.Connect Desktop/Desktop/config folder, and per app via the app definition. The settings in the app definition will override the global system settings.

Available since io.Connect Desktop 9.3

To configure the Channel Selector globally, use the "channelSelector" property of the "windows" top-level key in the system.json file:

{
    "windows": {
        "channelSelector": {
            "enabled": true,
            "type": "directionalSingle"
        }
    }
}

To configure the Channel Selector per app, use the "channelSelector" property of the "details" top-level key in the app definition:

{
    "details": {
        "channelSelector": {
            "enabled": true,
            "type": "single",
            "channelId": "Black"
        }
    }
}

The "channelSelector" object has the following properties:

Property Type Description
"enabled" boolean If true, will allow showing the Channel Selector. Defaults to false.
"channelId" string Name of the Channel to which the window will be joined by default when it's started.
"readOnly" boolean If true, the Channel Selector will be visible, but the user won't be able to switch between Channels from it. Defaults to false.
"type" "single" | "directionalSingle" | "multi" Type of the Channel Selector to show on the io.Connect Windows.
- "single" (default) - allows the window to join a single Channel to which it can subscribe and publish data unrestrictedly;
- "directionalSingle" - allows the window to join a single Channel, but also enables the user to restrict the window from publishing or from subscribing to the current Channel;
- "multi" - allows the window to join multiple Channels simultaneously; Available since io.Connect Desktop 9.7.

Multiple Channels

Available since io.Connect Desktop 9.7

The multi Channel Selector allows users to select multiple Channels for the window. The window will be able to subscribe and publish to the selected Channels simultaneously and unrestrictedly:

Multi Channels

⚠️ Note that this functionality is still experimental and you should take into consideration the following:

  • There may be hidden bugs.
  • Currently, there is only JavaScript API for working with multiple Channels.
  • There isn't backwards compatibility between the versions of the @interopio/desktop library that support only single Channels and the ones that support both single and multiple Channels. If you want to use multiple Channels, all apps using Channels must be upgraded to the latest version of the @interopio/desktop library.
  • Currently, directional Channels aren't supported in multi Channel mode.
  • Supplementary methods for working with multiple Channels have been added to the io.Connect JavaScript FDC3 implementation. These methods are specific io.Connect implementations and are outside the scope of the FDC3 standard. Their purpose is to enable working with multiple Channels in FDC3 apps.

Inheriting Channels

Available since io.Connect Desktop 9.3

To make apps opened from your app inherit its current Channel, use the "childrenInheritChannel" top-level property in the app definition. It accepts a Boolean value or a list of app names specifying the child apps that will inherit the current Channel:

{
    "childrenInheritChannel": true
}

// Or:

{
    "childrenInheritChannel": ["my-app", "my-other-app"]
}

⚠️ Note that if the definition of the child app contains a "channelId" property, it will be joined to the Channel specified in its definition and not to the current Channel of the parent.

Channel Mapping

The default io.Connect Channels are mapped to Channels (or other similar implementations) that other third-party apps may use, like the Bloomberg Groups used by the Bloomberg Adapter, or the default FDC3 User Channels.

The following example demonstrates how an io.Connect Channel is mapped to a Bloomberg Group and to an FDC3 User Channel by using the "meta" object in its configuration:

{
    "name": "Red",
    "meta": {
        "color": "red",
        // Mapping to a Bloomberg Group.
        "blpGroup": {
            "name": "Group-G",
            "readDataFieldPath": "data.partyPortfolio.ric",
            "writeDataFieldPath": "data.partyPortfolio.ric",
            "read": "ric",
            "write": "ric"
        },
        // Mapping to an FDC3 User Channel.
        "fdc3": {
            "id": "fdc3.channel.1",
            "displayMetadata": {
                "name": "Channel 1",
                "glyph": "1"
            }
        }
    }
}