FDC3 Workbench: Add Support for FDC3 2.0 features #788
Labels
enhancement
New feature or request
toolbox
Apps or code that isn't part of the standard but supports it use
Milestone
Enhancement Request
The FDC3 Workbench should be updated to support 2.0 features (after #787 is resolved)
Use the new names for
joinChannel()
->joinUserChannel()
andgetSystemChannels()
->getUserChannels()
App's own metadata
Originating app metadata
Receiving an Intent result
resolution.source
):Format with
JSON.stringify(context, null, 2)
and render in disabled text field (as used for 'Last received context' in right hand panel) and title 'RESULT CONTEXT'Check type of channel (
result.type == "app"
orresult.type == "private"
, see https://fdc3.finos.org/docs/next/api/ref/Channel for details)Add elements that are normally displayed on app channels tab after a channel is retrieved with
fdc3.getOrCreateChannel
id
, which needs to be displayed so it can be (manually) connected back to the result received2.
onAddContextListener(handler: (contextType?: string) => void): Listener;
3.
onUnsubscribe(handler: (contextType?: string) => void): Listener;
4.
onDisconnect(handler: () => void): Listener;
Simple string: No result returned
Sending an Intent Result
Note: The workbench will not be able to support complex intent result behaviors, but should be able to support example intent result behaviors to fulfill its purpose of enabling development and test.
☑️ Send Intent Result
🔘 Context result | Context template dropdown 🔽 |
🔘 Channel result
🔲 Use a private channel
|--Channel name–-------|
| my channel name |
|--------------------------|
☑️ Send context result over channel
| Context template dropdown 🔽 |
Note: The options selected should affect the code on the copy button next to the 'add listener' button \
fdc3.createPrivateChannel()
channel.onAddContextListener(...)
fdc3.getOrCreateChannel(channelName)
1 Return the (app) channel object.
Note: We may later decide that the delay before sending context should be configurable (but isn't needed for private channels that sync on the addition of the context listener). We may also decide that we need to be able send multiple contexts with a delay between, which will require further development to set up the sequence with delays…
Targeting a raised intent (at an app instance)
Note: Intents can be targeted at particular appIds in FDC3 1.2 and appId/instanceId pairs in 2.0. However, there is no way to retrieve the list of available appIds in FDC3, hence we will have to rely on user data entry for the AppId. Instance Ids can be retrieved for an appId however.
On the intents tab, add a check box under 'Raise Intent' and 'Raise Intent for Context' (above where results will be displayed, but below other controls):
☑️ Target an app
|--AppId–-----------|
| myAppId |
|---------------------|
☑️ Target an instance of the app
| Instance id drop down 🔽 |
Due to the space this will occupy, it is recommended that the fields are displayed when the checkboxes are clicked.
Instance id drop down can be populated via a call to
fdc3.findInstances(...)
See: https://fdc3.finos.org/docs/next/api/ref/DesktopAgent#findinstances
When the Raise Intent button is clicked, an object with the
appId
(andinstanceId
, if selected) should be passed as an argumentSee: https://fdc3.finos.org/docs/next/api/ref/DesktopAgent#raiseintent
The text was updated successfully, but these errors were encountered: