Interface

Action

Action

Represents a single action that can be run from a State. `action` and `href` identify the action for the backend, `inputs` describes the input fields the action accepts (see State#actions for how these map to a concrete state), and `description` is a human-readable summary of what running the action does.
Properties:
Name Type Description
action string The unique name of the action within the current flow.
href string The URL the action is submitted to when run.
inputs TInputs The input fields accepted by the action.
description string A human-readable description of the action.

View Source lib/flow-api/types/action.ts, line 5

Classes

Action

Methods

# async run(inputValuesopt, configopt) → {Promise.<AnyState>}

Executes the action, transitioning to a new state.
Parameters:
Name Type Attributes Default Description
inputValues ExtractInputValues.<TInputs> <optional>
null Values for the action's inputs.
config ActionRunConfig <optional>
{} Configuration options.
dispatchAfterStateChangeEvent boolean <optional>
true Whether to dispatch an event after state change.

View Source lib/flow-api/State.ts, line 523

If the action is disabled or already invoked.
FlowError
A promise resolving to the next state.
Promise.<AnyState>

# static createDisabled(name, parentState) → {Action.<TInputs>}

Creates a disabled action instance.
Parameters:
Name Type Description
name string The name of the action.
parentState State The state this action belongs to.

View Source lib/flow-api/State.ts, line 512

A disabled action instance.
Action.<TInputs>