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.

You can trigger a custom event by using a Fire Event action in an action chain, which can be started in several ways (see Start an Action Chain). You could also trigger a custom event by using an event helper's fireCustomEvent() method (see Module Function Event Helper) in a module function (JavaScript function). For more about triggering a custom event this way, see Start an Action Chain By Firing a Custom Event.

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

Here's an overview of how to use the Fire Event action in an action chain to trigger a custom event that starts a different action chain to handle the event:
  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 an action chain for the custom event, which will be started when the event is triggered by a Fire Event action. 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 and passed an event object that contains the input parameters (example: event.param1, event.param2...).
  3. To trigger the custom event and start its action chain, create an action chain and add a 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, as explained at the end of Built-In Actions.
  2. In the Properties pane, select an existing event from the Event Name list of available events, or click Create to create a new custom event at the appropriate scope level (page, flow, or application). The list contains events that are available within the current scope.
  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 Select Variable to choose the variable. If you need to create a variable, use a Create 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.