Skip to content

Suggestion: fdc3.addContextListener() should accept an array of contextTypes to listen for #1646

@Bruno-LSEG

Description

@Bruno-LSEG

Enhancement Request

fdc3.addContextListener(type, handler) method should offer an option to pass an array of types the client is interested in.

Use Case:

A lot of our apps at LSEG are able to handle both fdc3.instrument and fdc3.instrumentList. As such, our apps add a handler for null to handle any of the two incoming context types. But given the example below, sometimes it is not possible to determine what is the latest between the two when an app is joining a channel.

LSEG is moving forward with the approach of offering to run our apps in our customers' platforms / Desktop Agents.
Therefore we need to have a standardized way of ensuring we get the latest context between a subset of types when the app joins a channel to ensure consistency with the rest of the apps in the platform.

For example:

11:00 App A and App B both join channel green
11.01 App A broadcasts an instrument
11.02 App A broadcasts an instrumentList
11.03 App B broadcasts a contact
11.04 App C joins channel green

App C only supports instrument and instrumentList - but cotnact being the latest, how can App C determine that instrumentList was sent after instrument in this case?

Workflow Description

App C would add a context listener such as:

    fdc3.addContextListener(['fdc3.instrument','fdc3.instrumentList'], (ctx) => { console.log(ctx); });

And, given the above example, when App C joins the channel, it would log instrumentList since it is the latest between 2 types in the channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiFDC3 API Working GroupenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions