action function creates an action object that can be referenced by a custom component. Actions are the building blocks of integration flows — each action performs a discrete unit of work, such as making an API call, transforming data, or writing to a database.
Function signature
Parameters
An object describing the action. See fields below.
ActionDefinition fields
Controls how the action appears in the Prismatic UI.
The async function that runs when this action is invoked. Receives
context and params.A record of input field definitions presented to the integration builder. Values are resolved and passed to
perform via params. See input.When
true, execution of the flow terminates after this action completes.When
true, this action breaks out of the enclosing loop step.When
true, this action supports conditional branching. The perform function must return a result containing a branch field. See branching.Static list of branch names when
allowsBranching is true. Use when branch names are known at design time.The key of the input field whose value determines branch names at runtime. Use when branches are determined dynamically.
An example of the return value from
perform. Used in the Prismatic UI to preview output shape.Return type
Theperform function must return a Promise resolving to an ActionPerformReturn:
The payload data returned by the action.
MIME type of the returned data (e.g.,
"application/json").HTTP status code used when this action terminates a synchronous invocation.
HTTP headers sent back when this action terminates a synchronous invocation.
Values to persist in the flow-specific instance state for subsequent executions.
Values to persist in the cross-flow state.
Values to persist for the duration of the current execution.
Values to persist across all flows and versions of an integration instance.
Required when
allowsBranching is true. The name of the branch to take.Set by the platform to indicate whether the action failed.
Set by the platform with error details when the action fails.
