Add a Call Variable Action

You add a Call Variable action to an action chain to call a method on an InstanceFactory variable defined for the current scope (flow, page, or application). Using this action with any other type results in an error.

You can call any method on the current instance associated with the InstanceFactory variable, including asynchronous ones. However, since actions are by design synchronous, this action will wait for the asynchronous call to resolve before proceeding to the next action in the chain.

Before you use a Call Variable action, make sure an InstanceFactory type variable is already defined for the application. See Create a Type From Code.

To use a Call Variable 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 that the new action is to follow, then double-click the new action in the Actions palette.
  2. From the Variable drop-down list, select an InstanceFactory type variable defined for the application.
  3. For the Method field, select the method you want to call. The available methods are based on the definition file imported for the type.
  4. If the method requires input parameters, hover over the far-right side of a parameter and click the down arrow or fx icon that appears to choose the appropriate variable.

    If the method returns a value, it is assigned to the auto-generated variable shown by the Store Result In property in the Properties pane.

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