Add a Fire Event Action

You add a Fire Event action to invoke a predefined event or a custom event that you have defined in your application.

A custom event, created using the Events tab, is defined for an application, flow, page, or fragment. It can be used to perform some action, such as navigating to a page, and it can carry a payload that you define when you create the event.

Here's an overview of how a custom event and the Fire Event action are used:
  1. Create a custom event, defining parameters if required.
  2. Create an event listener, which can start more than one action chain:
    1. In the Create Event Listener wizard, assign the event listener the custom event:

    2. Create a new action chain for the event, which is launched when the event is triggered. Create the action chain through the Event Listener tab, because if the listener's custom event has input parameters, the action chain is created with an event input parameter. This event object will contain the custom event's input parameters (example: event.param1, event.param2...), and the event object is automatically passed to the new action chain..
  3. In the action chain that will trigger the event, use the Fire Event action to trigger the custom event, providing any parameters defined for the event.

To use a Fire Event Action:

  1. Add the action in one of three ways, depending on your preference and where you want it added:
    • Drag the action from the Actions palette onto the canvas, dropping the action either at the bottom edge of the action it is to follow, or at the top edge of the action it is to precede.
    • Double-click the action in the Actions palette to add it to an empty canvas or to the end of an action chain.
    • On the canvas, select the action you want the new action to follow, then double-click the new action in the Actions palette.
  2. In the Properties pane, select an existing event from the Event Name drop-down list of available events, or click Create to create a new custom event at the appropriate scope level (page, flow, or application).

    The drop-down list displays the events that are available in the current scopef.

  3. If the event has input parameters, the Parameters property is shown. To pass in a parameter, hover over the far-right side of the parameter and click the down arrow that appears to choose the variable. If you need to create a variable, use the appropriate Create Variable link in the Variables dialogue to create it at the appropriate scope level.

  4. If the event returns a value, it is assigned to the auto-generated variable shown by the Store Result In property.

For API information about this action, see Fire Event in the Oracle Visual Builder Page Model Reference.