Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Axway Flow SDK (axway-flow-sdk) is a standalone utility that enables the creation of custom flow-nodes for API Builder flows. By offering the Axway Flow SDK as a standalone utility, new flow-nodes can be developed and consumed in the API Builder Console without upgrading API Builder Toolswithout upgrading the version.

Features

The Axway Flow SDK has the following content:

...

Anchor
NodeBuilder
NodeBuilder
axway-flow-sdk~NodeBuilder

Kind: Inner class of axway-flow-sdk

Anchor
add
add
nodeBuilder.add(key, [options])

Adds a new flow-node specification and prepares the NodeBuilder to accept the following specification operations:

The key parameter is used to uniquely identify the specification and represents a distinct instance of a flow-node for the flow editor. The key will be used as the name unless the name option is provided. The new flow-node will appear in the general category by default, or under the provided category option.

The icon option can be a bmp, jpeg, png, gif, tiff, or svg file. The .method option is used to add method(s), and the .output option is used to define an output. The .action option is used to define an action function and finish the specification.

Kind: Instance method of NodeBuilder

Returns: Current NodeBuilder object

Access: Public

ParameterTypeDefaultDescription
key
string
 A unique key identifier for the flow-node.
[options]
object
 Options for the flow-node.
[options.name]
string
 A friendly name for the flow-node as it will appear in the UI.
[options.icon]
string
 An icon file.
[options.description]
string
 A description for the flow-node.
[options.category]
string
general
A category under which the flow-node will appear in the UI.

...

Adds a new method to the current flow-node specification and prepares the NodeBuilder to accept the following method operations:

The .add(key, [options]) must be called prior to adding a method.

The key uniquely identifies the method for the flow-node and will be used as the name unless the name option is provided.

Kind: Instance method of NodeBuilder

Returns: Current NodeBuilder object

Access: Public

ParameterTypeDescription
key
string
A unique key identifier for the method.
[options]
object
Options for the method.
[options.name]
string
A friendly name for the method as it will appear in the UI.

...

Adds a new parameter to the current method. Any number of parameters can be added to a method.

The .method(key, [options]) must be called prior to adding a parameter.

The name uniquely identifies the parameter, and the schema is a valid JSON Schema definition (both draft-04 and draft-06 are supported).

Kind: Instance method of NodeBuilder

Returns: Current NodeBuilder object

Access: Public

ParameterTypeDefaultDescription
name
string
 A unique name for the parameter as it will appear in the UI.
schema
object
 A schema used to validate the parameter.
[required]
boolean
true
A flag to indicate the parameter is required or optional.

...

Adds a new output to the current method. Any number of outputs can be added to a method, but for usability-sake, you should limit this.  The output represents one of the possible callback routes for your method. For example, if your method tested prime numbers, then one output might be prime, and the other not-prime.

The .method(key, [options]) must be called prior to adding an output.

...

The context is a valid JSON Path and is used as the default by the flow editor. When the output is invoked, the configured context is where the output value will be written.

Kind: Instance method of NodeBuilder

Returns: Current NodeBuilder object

Access: Public

ParameterTypeDescription
key
string
A unique key for the output.
[options.name]
string
A friendly name for the output as it will appear in the UI.
[options.description]
string
The output description.
[options.context]
string
The default context string.
[options.schema]
object
The expected JSON schema for the output value.

...

Assigns an action handler to the current method. The method can only have one action handler. Assigning an action will terminate the current method definition.

Kind: Instance method of NodeBuilder

Returns: Current NodeBuilder object

Access: Public

ParameterTypeDescription
handler
handler
The action handler function.

...

Axway API Builder SDK for creating custom flow-nodes to work with flows.

Kind: Inner method of axway-flow-sdk

Returns: NodeBuilder - A newly constructed NodeBuilder object 

ParameterTypeDescription
module
object
The flow-node module.

...

Kind: Inner type definition of axway-flow-sdk

Access: Public

ParameterTypeDescription
req
request
The Request object.
cb
callback
The output callback.

...

Kind: Inner type definition of axway-flow-sdk

Access: Public

ParameterTypeDescription

[err]

*
A non null value indicates a terminal error (flow processing will stop).
[value]
*
The output value to be written back to the flow processing context.

...

Kind: Inner type definition of axway-flow-sdk

Properties:

NameTypeDescription
envobjectThe application configuration.
paramsobjectThe params method, as supplied during runtime (see .parameter).