Skip to main content
Pentaho Documentation

ActionResult

pentaho.lang.ActionResult

An ActionResult represents the result from performing an action.

ActionResult Value

When successful, an action can return a value that represents its final state or undefined. For example, if you do a Google search using an executeAction, there is no value to be returned.

ActionResult Error

When an action is unsuccessful, it will return an error or a string with the reason why it was rejected. This can happen when an event is canceled, or the core components of that action were invalid.

If unsuccessful, the value is always undefined.

AMD Module

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

See also:  pentaho.visual.base.model#executeAction , pentaho.visual.base.model#selectAction

Extends

Constructor

Name Description
new ActionResult()

Classes

Name Summary
constructor

Members

Name Description
base : function
 
Protected

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

error : Error | pentaho.lang.UserError

Gets the error of the ActionResult.

isCanceled : boolean

Gets a value indicating if the ActionResult represents an action that has been canceled.

isFailed : boolean

Gets a value indicating if the ActionResult represents an action that has failed.

isFulfilled : boolean

Gets a value indicating if the ActionResult represents a successful action.

isRejected : boolean

Gets a value indicating if the ActionResult represents an action that failed or that was canceled.

value : object

Gets the value of the ActionResult.

Methods

Name Description
fulfill(value) : pentaho.lang.ActionResult
 
Static

Creates an action result that represents a successful action.

reject(error) : pentaho.lang.ActionResult
 
Static

Creates an action result that represents an unsuccessful action.

extend(source, keyArgs) : Object

Extend an object with the properties of another.

Constructor Details

new ActionResult()

Source: javascript/web/pentaho/lang/ActionResult.js, line 24

See also:  pentaho.visual.base.model#executeAction , pentaho.visual.base.model#selectAction

Members Details

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

error: Error | pentaho.lang.UserError

Gets the error of the ActionResult.

Source: javascript/web/pentaho/lang/ActionResult.js, line 93

isCanceled: boolean

Gets a value indicating if the ActionResult represents an action that has been canceled.

Source: javascript/web/pentaho/lang/ActionResult.js, line 103

isFailed: boolean

Gets a value indicating if the ActionResult represents an action that has failed.

Source: javascript/web/pentaho/lang/ActionResult.js, line 114

isFulfilled: boolean

Gets a value indicating if the ActionResult represents a successful action.

Source: javascript/web/pentaho/lang/ActionResult.js, line 125

isRejected: boolean

Gets a value indicating if the ActionResult represents an action that failed or that was canceled.

Source: javascript/web/pentaho/lang/ActionResult.js, line 135

value: object

Gets the value of the ActionResult.

Source: javascript/web/pentaho/lang/ActionResult.js, line 83

Methods Details

fulfill(value) : pentaho.lang.ActionResult
 
Static

Creates an action result that represents a successful action.

Source: javascript/web/pentaho/lang/ActionResult.js, line 146

Parameters:
Name Default Value Summary
value : Object
 
Optional

The value of the successful action.

Returns:
Name Description
pentaho.lang.ActionResult

A new action result.

reject(error) : pentaho.lang.ActionResult
 
Static

Creates an action result that represents an unsuccessful action.

Source: javascript/web/pentaho/lang/ActionResult.js, line 157

Parameters:
Name Default Value Summary
error : string | Error | pentaho.lang.UserError
 
Optional

The error that contains the reason why the action was rejected.

Returns:
Name Description
pentaho.lang.ActionResult

A new action result.

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 1037

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.