Skip to main content

Pentaho+ documentation is moving!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Base

pentaho.action Base

The action.Base class represents a certain model of actions.

Synchronous or Asynchronous

An action can be synchronous or asynchronous, as determined by the type property, pentaho.action.Base.isSync. The execution of a synchronous action is completed synchronously, while that of an asynchronous action only completes asynchronously.

Execution

Actions are executed at and by target objects, which implement the interface ITarget, by being passed as the argument to the ITarget#act method.

Targets control the exact implementation of the execution of an action, which is returned from the act method, in the form of an Execution. However, it is the action that imposes whether execution is synchronous or not, and the phases by which execution goes through, which are, for all action types:

  1. "init" - the execution is being initialized and a chance is given to mutate the action and change what will be done;
  2. "will" - action is now frozen and the action can be canceled based on what will be done;
  3. "do" - the action is executed;
  4. "finally" - the action execution has finished successfully or not.

For more information, see Execution.

AMD Module

require(["pentaho/action/Base"], function(Base) { /* code goes here */ });

Extends

Constructor

Name Description
new Base()
Abstract

Members

Name Description
id :  string
Static
Abstract

Gets the identifier of the action type module.

isSync :  boolean
Static

Indicates if the action is synchronous.

base :  function
Protected

If a method has been overridden, then the base method provides access to the overridden method.

eventName :  string

Gets the event name of the action.

Methods

Name Description
clone() : pentaho.action.Base

Creates a shallow clone of this action.

extend(source, keyArgs) : object

Extend an object with the properties of another.

validate() : Array.<pentaho.lang.UserError>

Determines if the given action is valid.

Constructor Details

new Base()
Abstract

Source: javascript/web/pentaho/action/Base.js, line 61

Members Details

id:  string
Static
Abstract

Gets the identifier of the action type module.

Source: javascript/web/pentaho/action/Base.js, line 63

isSync:  boolean
Static

Indicates if the action is synchronous.

Source: javascript/web/pentaho/action/Base.js, line 115

Default Value: true

base:  function
Protected

If a method has been overridden, then the base method provides access to the overridden method.

Can also be called from within a constructor function.

Source: javascript/web/pentaho/lang/Base.js, line 299

Inherited From: pentaho.lang.Base#base

eventName:  string

Gets the event name of the action.

The default implementation returns the value of pentaho.action.Base.id.

Source: javascript/web/pentaho/action/Base.js, line 82

Methods Details

clone() : pentaho.action.Base

Creates a shallow clone of this action.

Source: javascript/web/pentaho/action/Base.js, line 103

Returns:
Name Description
pentaho.action.Base

The action clone.

extend(source, keyArgs) : object

Extend an object with the properties of another.

Methods that are overridden are accessible through this.base.

This object is extended, but its class doesn't change.

Source: javascript/web/pentaho/lang/Base.js, line 1040

Inherited From: pentaho.lang.Base#extend

Parameters:
Name Default Value Summary
source : object

The instance specification.

keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
exclude : object
Optional

A map of property names to exclude from source.

Returns:
Name Description
object

This object.

validate() : Array.<pentaho.lang.UserError>

Determines if the given action is valid.

The default implementation does nothing and considers the instance valid. Override to implement an action's specific validation logic.

Source: javascript/web/pentaho/action/Base.js, line 94

Returns:
Name Description
Array.<pentaho.lang.UserError> | null

A non-empty array of errors or null.