Data Action Code Interactions
A data action interacts with Oracle Analytics code when it creates a user interface field, and when a user invokes a data action.
Create the Field for a New Data Action Instance
This interaction starts when Oracle Analytics wants to render a data action user interface field. To do so, it:
- Creates a 
PanelGadgetInfothat acts as the parentGadgetInfofor theGadgetInfosthat the data action returns. - Calls 
getGadgetInfos()on the data action. - Adds the data action's 
GadgetInfosas children of thePanelGadgetInfocreated in the first step. - Creates the 
PanelGadgetViewthat renders thePanelGadgetInfo. - Sets the 
HTMLElementthat's the container of thePanelGadgetView. - Registers the 
PanelGadgetViewas a childHostedComponentof aHostedComponentthat's already attached to theHostedComponenttree.This renders the data action's gadgets inside the Panel gadget in the order they appear in the array returned by
getGadgetInfos(). 
Invoke a Data Action
This interaction starts when the user invokes a data action through the Oracle Analytics user interface (for example, from the context menu on a data point in a visualization).
In response to the user interaction, the code:
- Publishes an 
INVOKE_DATA_ACTIONevent containing the data action's ID, theDataVisualizationthat the data action is invoked from, and aTransientVizContextobject. - The 
DataActionManagerhandles this event by:- Obtaining the data action instance from its ID.
 - Obtaining the 
LogicalFilterTreesfor the marked data points in the specifiedDataVisualization. - Constructing a 
DataActionContextthat contains all the information to pass to the data action's target. - Calling 
invoke(oDataActionContext)on the data action.