FDC3 Technical Reference

Summary

  • FDC3 Options are to used configure FDC3
  • FDC3 API provides runtime programmatic access to FDC3
  • FDC3 Message Event is fired whenver an FDC3 Message is sent or received

FDC3 Options

The FDC3 Options section of Adaptable Options is the primary way to configure and manage FDC3:

PropertyTypeDescriptionDefault
actionColumnDefaultConfigurationActionColumnDefaultConfigurationConfigures the default FDC3 Actions columncolumnId: 'fdc3ActionColumn', headerName: 'FDC3 Actions', width: 200, resizable: true, movable: false, rowScope: ExcludeDataRows: false, ExcludeGroupRows: true, ExcludeSummaryRows: true, ExcludeTotalRows: true
contextsFdc3ContextOptionsConfigures FDC3 standard Contexts that AdapTable will listen for and broadcast
enableLoggingbooleanEnable logging message exchanges to Consolefalse
gridDataContextMappingGridDataContextMappingMaps Context Type to AdapTable Grid Data
intentsFdc3IntentOptionsConfigures FDC3 standard Intents that AdapTable will listen for and raise
resolveContextData(context:ResolveContextDataContext) => ContextBuilds Context Data (useful for postprocessing Context Data mapped from Grid data)
uiControlsDefaultConfiguration\{ contexts?: \{ [contextName in StandardContextType]?:UIControlConfig; \}; intents?: \{ [intentName in StandardIntent]?:UIControlConfig; \}; \}Customises FDC3 UI Controlscontexts: , intents:

FDC3 Intent Options

The FDC3 Intent Options property handles FDC3 Intents behaviour:

PropertyTypeDescription
handleIntent(context:HandleFdc3IntentContext) => Promise<IntentResult> | voidHandles incoming Intents (standard and custom)
handleIntentResolution(context:HandleFdc3IntentResolutionContext) => Promise<void>Handles the IntentResolution that a raised Intent might return
listensForIntent[]Subscribe to given standard Intent(s)
raisesRaiseIntentConfigurationRaises given standard Intent(s) on various Grid Actions

FDC3 Context Options

The FDC3 Context Options property handles FDC3 Context behaviour:

PropertyTypeDescription
broadcastsBroadcastConfigurationBroadcasts given standard Context(s) on various Grid Actions
handleContext(context:HandleFdc3Context) => voidHandles incoming Contexts (standard and custom)
listensForContextType[]Subscribe to given standard Context(s)

FDC3 API

The FDC3 API section of Adaptable API contains functions relating to FDC3:

MethodReturnsDescription
broadcastFromPrimaryKey(primaryKeyValue, contextType, channel)Promise<void> | undefinedBroadcasts the given Context from the given Row Node with the given Primary Key Value
broadcastFromRow(rowNode, contextType, channel)Promise<void>Broadcasts the given Context from the given Row Node
buildContextDataForPrimaryKey(contextType, primaryKeyValue)Context | undefinedBuilds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value
buildContextDataFromRow(contextType, rowNode)ContextBuilds FDC3 Context Data based on the given Context Type and Row Node
getContextLabel(contextType)stringReturns the human-friendly label for the given Context Type
getDesktopAgent()DesktopAgentReturns the FDC3 Desktop Agent
isStandardContextType(contextType)booleanChecks if the given Context Type is a FDC3 standard Context Type
isStandardIntentType(intentType)booleanChecks if the given Intent is a FDC3 standard Intent Type
raiseIntentForContextFromPrimaryKey(primaryKeyValue, contextType, appIdentifier)Promise<IntentResolution> | undefinedFinds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value
raiseIntentForContextFromRow(rowNode, contextType, appIdentifier)Promise<IntentResolution>Finds and raises an Intent based on the given Context from the given Row Node
raiseIntentFromPrimaryKey(primaryKeyValue, intent, contextType, appIdentifier)Promise<IntentResolution> | undefinedRaises an Intent with the given Context from the given Row Node with the given Primary Key Value
raiseIntentFromRow(rowNode, intent, contextType, appIdentifier)Promise<IntentResolution>Raises an Intent with the given Context from the given Row Node

FDC3 Message Event

The FDC3 Message Event is triggered whenever a FDC3 Message is sent or received.

Fdc3MessageInfo

There are 2 different Message Info objects that the Event provides depending whether the FDC3 message was sent or received:

PropertyTypeDescription
appAppIdentifierTarget application for the message
contextContextFull FDC3 Context for object related to the Event
direction'sent'Direction - always 'sent'
eventType'RaiseIntent' | 'RaiseIntentForContext' | 'BroadcastMessage'Event Type: RaiseIntent, RaiseIntentForContext,BroadcastMessage
intentIntentFDC3 Intent which caused Event to fire (if type is RaiseIntent)
adaptableContextanyCustom application Context provided in AdaptableOptions.adaptableContext
PropertyTypeDescription
contextContextFull FDC3 Context for object related to the Event
direction'received'Direction - always 'received'
eventType'IntentRaised' | 'ContextBroadcast'EventType: IntentRaised, ContextBroadcast
intentIntentFDC3 Intent which caused Event to fire (if type is IntentRaised)
metadataContextMetadataMetadata associated with the FDC3 Context
adaptableContextanyCustom application Context provided in AdaptableOptions.adaptableContext

Event Subscription

Subscribing to the Event is done the same way as with all Adaptable Events:

api.eventApi.on('Fdc3Message', (eventInfo: Fdc3MessageSentInfo) => {
    // do something with the info
});

api.eventApi.on('Fdc3Message', (eventInfo: Fdc3MessageReceivedInfo) => {
    // do something with the info
});