Configuration Provider node
Creates a dynamic node configuration, based on the current node state.
This node references a script that builds up a configuration map object with custom values and provides this configuration map to the specified node type.
The node has all the outcomes of the specified node and an additional outcome, Configuration failure
.
Use the Configuration failure
outcome to specify what should happen
when the node is unable to build the configuration map,
the configuration map is missing required values,
or the configuration map is invalid.
Before you use this node,
create a script
of type Config Provider
that provides the functionality for the node.
The map that you build in the script must be named config
and must be populated with the required configuration.
To obtain the list of required attributes that your script must set for a specific node type, refer to the
API Explorer, and the endpoint
The following request returns the required attributes for the Message node: For example:
|
This example creates a configuration map that pulls in the username
from the node shared state
to display a custom message, requesting the user to confirm that they are over 18:
config = {
"message": {"en-GB": "Hi " + nodeState.get("username") + ". Please confirm that you are over 18."},
"messageYes": {"en-GB": "Confirm"},
"messageNo": {"en-GB": "Deny"},
};
Refer to the sample script for a reference to the bindings available to this script.
Properties
Property | Usage |
---|---|
Script |
Select the |
Node Type (required) |
Select the type of node for which you are generating a configuration. This node cannot provide configuration for all node types.
The node type must have a fixed set of outcomes that cannot be changed by the node’s configuration.
(If the node’s |