Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

ITarget

pentaho.type.action.ITarget

The ITarget interface represents the entity which is acted upon or the place where the action takes place.

In turn, commonly, an action target will emit events for each of the action's phases, events in which it is its source.

Source: doc-js/pentaho/type/action/ITarget.jsdoc, line 17

See also:  pentaho.type.action.Base

Methods

Name Description
act(action) : pentaho.type.action.Base

Executes a given action in this target and does not wait for its outcome.

actAsync(action) : Promise

Executes a given action in this target and waits for its outcome.

Methods Details

act(action) : pentaho.type.action.Base

Executes a given action in this target and does not wait for its outcome.

This method can be given synchronous or asynchronous actions. However, in the latter case, this method is only suitable for fire-and-forget scenarios, where it is not needed to know the outcome of the asynchronous action.

It is up to the action target implementation to call the given action's execute method with itself as target and, optionally, with an appropriate action executor.

Source: doc-js/pentaho/type/action/ITarget.jsdoc, line 31

Parameters:
Name Default Value Summary
action : pentaho.type.action.Base | pentaho.type.action.spec.IBase

The action or action specification to execute.

Returns:
Name Description
pentaho.type.action.Base

The given action.

See also:  pentaho.type.action.ITarget#actAsync

actAsync(action) : Promise

Executes a given action in this target and waits for its outcome.

This method can be given either synchronous or asynchronous actions which allows for uniform treatment regardless of the synchronous nature of the action. This method can also be used when the outcome of an asynchronous action must be known.

It is up to the action target implementation to call the given action's executeAsync method with itself as target and, optionally, with an appropriate action executor.

Source: doc-js/pentaho/type/action/ITarget.jsdoc, line 52

Parameters:
Name Default Value Summary
action : pentaho.type.action.Base | pentaho.type.action.spec.IBase

The action or action specification to execute.

Returns:
Name Description
Promise

A promise that is fulfilled with the action's result or rejected with the action's error.

See also:  pentaho.type.action.ITarget#act