Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: ActionDefinition

@react-form-builder/core.ActionDefinition

Represents the definition of an action.

Constructors

constructor

new ActionDefinition(func, body?, params?)

Creates a new instance of the ActionDefinition class.

Parameters

NameTypeDescription
funcFuncthe function of an action.
body?stringthe source code of the Action.
paramsActionParametersthe parameters of the Action.

Properties

body

Optional Readonly body: string

the source code of the Action.


func

Readonly func: Func

the function of an action.


params

Readonly params: ActionParameters = {}

the parameters of the Action.

Methods

createFromObject

Static createFromObject(value): ActionDefinition

Correctly creates the ActionDefinition from deserialized data.

Parameters

NameTypeDescription
valueanythe deserialized data.

Returns

ActionDefinition

the ActionDefinition instance.


functionalAction

Static functionalAction(func, params?): ActionDefinition

Creates an action from the function.

Parameters

NameTypeDescription
funcFuncthe function of an action.
paramsActionParametersthe parameters of the Action.

Returns

ActionDefinition

the new instance of the ActionDefinition class.


sourceAction

Static sourceAction(body, params?): ActionDefinition

Creates an action from the source code.

Parameters

NameTypeDescription
bodystringthe source code of the Action.
paramsActionParametersthe parameters of the Action.

Returns

ActionDefinition

the new instance of the ActionDefinition class.