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:

  1. Creates a PanelGadgetInfo that acts as the parent GadgetInfo for the GadgetInfos that the data action returns.
  2. Calls getGadgetInfos() on the data action.
  3. Adds the data action's GadgetInfos as children of the PanelGadgetInfo created in the first step.
  4. Creates the PanelGadgetView that renders the PanelGadgetInfo.
  5. Sets the HTMLElement that's the container of the PanelGadgetView.
  6. Registers the PanelGadgetView as a child HostedComponent of a HostedComponent that's already attached to the HostedComponent tree.

    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:

  1. Publishes an INVOKE_DATA_ACTION event containing the data action's ID, the DataVisualization that the data action is invoked from, and a TransientVizContext object.
  2. The DataActionManager handles this event by:
    1. Obtaining the data action instance from its ID.
    2. Obtaining the LogicalFilterTrees for the marked data points in the specified DataVisualization.
    3. Constructing a DataActionContext that contains all the information to pass to the data action's target.
    4. Calling invoke(oDataActionContext) on the data action.