Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@axway/api-builder-flow-graph

Package Overview
Dependencies
Maintainers
19
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axway/api-builder-flow-graph

Graph structure for parsing and manipulating flows.

  • 4.0.0
  • joyce
  • austen
  • huxley
  • irving
  • latest
  • beckett
  • dickens
  • ellison
  • fleming
  • christie
  • glaspell
  • npm
  • Socket score

Version published
Weekly downloads
140
decreased by-6.67%
Maintainers
19
Weekly downloads
 
Created
Source

@axway/api-builder-flow-graph

Graph structure for parsing and manipulating flows.

API Reference

api-builder-flow-graph~FlowGraph

Kind: inner class of api-builder-flow-graph

new FlowGraph()

FlowGraph object

new FlowGraph(flowId, flowdef)

Creates an instance of FlowGraph.

ParamTypeDescription
flowIdstringThe id of this flow.
flowdefobjectThe flow definition.

flowGraph._ensureVertex(vertexId, info) ⇒ object

Ensures that a vertex will exist

Kind: instance method of FlowGraph
Returns: object - the vertex which matched or was created.
Access: protected

ParamTypeDescription
vertexIdstringthe ID of the vertex
infoobjectinfo to be set on the vertex. If vertex already exists, the info will be merged with the existing info.

flowGraph._deleteVertex(vertexId)

Deletes a vertex from the graph

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
vertexIdstringthe id of the vertex to delete

flowGraph._getVertexChildren(vertexId, output, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the children of a vertex in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the child vertices of a vertex in the flow

ParamTypeDescription
vertexIdstringthe Id of the vertex to get children for.
outputstringthe vetex output to get the children for.
[idsOnly]boolif the vertex idsOnly should be returned rather than the vertices

flowGraph._getVertexParents(vertexId, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the parents of a vertex in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the parent nodes of a vertex in the flow

ParamTypeDescription
vertexIdstringthe Id of the vertex to get parents for.
[idsOnly]boolif the vertex ids should be returned rather than the vertices

flowGraph._ensureEdge(output, fromId, toId) ⇒ object

Ensures that an edge will exist between any two vertices. If any of the vertices do not exist, they will be created.

Kind: instance method of FlowGraph
Returns: object - the edge which matched or was created.
Access: protected

ParamTypeDescription
outputstringthe vertex output group the edge belongs to.
fromIdstringthe ID of the vertex where the edge starts
toIdstringthis ID of the vertex where the edge ends

flowGraph._deleteEdge(fromId, output, toId)

Deletes an edge from one node to another. Removes the parent/child where necesarry from each vertex.

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
fromIdstringthe vertex where the edge starts
outputstringthe vertex output group the edge belongs to.
toIdstringthe vertex where the edge ends

flowGraph._deleteEdges(fromId, toId)

Deletes the edges from one node to another (across all outputs). Removes the parent/child where necesarry from each vertex.

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
fromIdstringthe vertex where the edge starts
toIdstringthe vertex where the edge ends

flowGraph._setValidation(validation)

Sets the validation state on the flow definition

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
validationobjectthe validation state

flowGraph._getOutputRoutes(nodeId) ⇒ object

Gets a list of all nodes which a node may route to grouped by output.

Kind: instance method of FlowGraph
Returns: object - A map of IDs for routes from the node specified grouped by output.
Access: protected

ParamTypeDescription
nodeIdstringthe ID of a node to get routes for

flowGraph._onChange()

Generates a unique symbol of the flow. Should be called whenever the flow changes.

Kind: instance method of FlowGraph

flowGraph._buildGraph()

Build a graph from the flow definition.

Kind: instance method of FlowGraph
Access: protected

flowGraph._buildVertex(nodeId)

Builds a vertex for a nodeId

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringThe nodeId from which to build a vertex.

flowGraph.changeNodeName(nodeId, name)

Sets the name of a node

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringNode ID
namestringNew node name

flowGraph.changeMethod(nodeId, method, nodehandler)

Modifies the method of a node to match a new spec

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringThe id of the node to update.
methodstringthe method to use
nodehandlerobjectthe node handler in use

flowGraph.insertNode(node, nodeId) ⇒ string

Inserts a node into the flow graph.

Kind: instance method of FlowGraph
Returns: string - - the inserted nodeId

ParamTypeDescription
nodeobjectThe node to insert.
nodeIdstringThe id of the node to insert. If supplied, it must be unique. If not supplied, the node id will be generated.

flowGraph.deleteNode(nodeId)

Delete a specific node from the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe id of the node to delete

flowGraph.deleteRoute(output, fromId, toId)

Delete the output route from one node to another.

Kind: instance method of FlowGraph

ParamTypeDescription
outputstringthe output to delete the route for.
fromIdstringthe node id the routes are being deleted from.
toIdstringthe node id being removed from the routes.

flowGraph.deleteRoutes(fromId, toId)

Delete all the output routes from one node to another.

Kind: instance method of FlowGraph

ParamTypeDescription
fromIdstringthe node id the routes are being deleted from.
toIdstringthe node id being removed from the routes.

flowGraph.setStart(nodeId)

Sets a node as the start node for the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringThe start node for the flow.

flowGraph.unsetStart()

Clears the start node for the flow. This action will make the flow invalid.

Kind: instance method of FlowGraph

flowGraph.addParameter(nodeId, name, value, [type])

Adds a parameter to a node in the flow

Kind: instance method of FlowGraph

ParamTypeDefaultDescription
nodeIdstringthe node id
namestringthe name of the parameter
valuestringthe value of the parameter
[type]string"jsonpath"the type of the parameter.

flowGraph.updateParameter(nodeId, name, prop, newValue)

Updates a parameter from a node in the flow

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe node id
namestringthe current name of the parameter
propstring | objectthe field to update (name
newValuestringthe new value of the prop specified if it is a string

flowGraph.removeParameter(nodeId, name) ⇒ object

Removes a parameter by name from a node in the flow

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph.addAuthorization(nodeId, name, value, [type])

Adds a authorization parameter to a node in the flow

Kind: instance method of FlowGraph

ParamTypeDefaultDescription
nodeIdstringthe node id
namestringthe name of the parameter
valuestringthe value of the parameter
[type]string"jsonpath"the type of the parameter.

flowGraph.updateAuthorization(nodeId, name, prop, newValue)

Updates a authorization parameter from a node in the flow

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe node id
namestringthe current name of the parameter
propstring | objectthe field to update (name
newValuestringthe new value of the prop specified if it is a string

flowGraph.removeAuthorization(nodeId, name) ⇒ object

Removes a authorization parameter by name from a node in the flow

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph._addParameter(location, nodeId, name, value, [type])

Adds a parameter to a node in the flow

Kind: instance method of FlowGraph

ParamTypeDefaultDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe name of the parameter
valuestringthe value of the parameter
[type]string"jsonpath"the type of the parameter.

flowGraph._getParameter(location, nodeId, name) ⇒ object

Gets a parameter from the node by name

Kind: instance method of FlowGraph
Returns: object - the parameter

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph._getParameterIndex(location, nodeId, name) ⇒ number

Gets a parameter index from the node by name

Kind: instance method of FlowGraph
Returns: number - the parameter index

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph._updateParameter(location, nodeId, name, prop, newValue)

Updates a parameter from a node in the flow

Kind: instance method of FlowGraph

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe current name of the parameter
propstring | objectthe field to update (name
newValuestringthe new value of the prop specified if it is a string

flowGraph._removeParameterByName(location, nodeId, name) ⇒ object

Removes a parameter by name from a node in the flow

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namenumberthe name of the parameter

flowGraph._removeParameter(location, nodeId, index) ⇒ object

Removes a parameter by index from a node in the flow. Does not trigger change.

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
indexnumberthe index of the parameter

flowGraph.updateOutputContext(nodeId, name, value)

Modifies the JSONPath context of an output

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe node id
namestringthe name of the output
valuestringthe new JSONPath context

flowGraph.connectNode(sourceId, sourceOutput, targetId)

Connects a node output to the specified target.

Kind: instance method of FlowGraph

ParamTypeDescription
sourceIdstringThe source node for the connection.
sourceOutputstringThe output in the source node for the connection.
targetIdstringThe id of the target node to connect to.

flowGraph.disconnectNode(sourceId, sourceOutput, targetId)

Disconnects a target node from a parent node's source and output.

Kind: instance method of FlowGraph

ParamTypeDescription
sourceIdstringThe source node for the connection.
sourceOutputstringThe output in the source node for the connection.
targetIdstringThe id of the target node to connect to.

flowGraph.isEmpty() ⇒ boolean

Indicates if the flow is empty, with no nodes.

Kind: instance method of FlowGraph
Returns: boolean - true if the flow is empty.

flowGraph.getName() ⇒ string

Gets the name of the flow from flow info meta-data.

Kind: instance method of FlowGraph
Returns: string - The flow name.

flowGraph.setName(name)

Sets the name of the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
namestringThe flow name.

flowGraph.getDescription() ⇒ string

Gets the description of the flow from flow info meta-data.

Kind: instance method of FlowGraph
Returns: string - The flow description.

flowGraph.setDescription(description)

Sets the description of the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
descriptionstringThe flow description.

flowGraph.getSymbol() ⇒ symbol

Get the unique symbol of the flow

Kind: instance method of FlowGraph
Returns: symbol - the flow symbol

flowGraph.getDefinition() ⇒ object

Gets the definition of the flow

Kind: instance method of FlowGraph
Returns: object - the flow definition

flowGraph.getGraph() ⇒ object

Gets the graph representation of the flow

Kind: instance method of FlowGraph
Returns: object - the flow graph representation

flowGraph.getId() ⇒ string

Gets the Id of the flow

Kind: instance method of FlowGraph
Returns: string - the flow id

flowGraph.getEdges() ⇒ Array.<object>

Gets the edges of the flow graph

Kind: instance method of FlowGraph
Returns: Array.<object> - the edges of the graph

flowGraph.getEdge(output, fromId, toId) ⇒ object | null

Get the edge between two nodes.

Kind: instance method of FlowGraph
Returns: object | null - the edge between two nodes. Null if no edge exists.

ParamTypeDescription
outputstringthe node output the edges belong to.
fromIdstringthe ID of the vertex where the edge starts
toIdstringthis ID of the vertex where the edge ends

flowGraph.getVertices([idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the vertices of the graph

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the vertices of the graph

ParamTypeDescription
[idsOnly]boolif the vertex ids should be returned rather than the vertices

flowGraph.getNodes([idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the nodes of the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the nodes of the flow

ParamTypeDescription
[idsOnly]boolif the node ids should be returned rather than the nodes

flowGraph.getChildren(nodeId, output, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the children of a node in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the child nodes of a node in the flow

ParamTypeDescription
nodeIdstringthe Id of the node to get children for.
outputstringthe node output to get the children for. If omitted then all children are returned.
[idsOnly]boolif the node idsOnly should be returned rather than the nodes

flowGraph.getParents(nodeId, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the parents of a node in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the parent nodes of a node in the flow

ParamTypeDescription
nodeIdstringthe Id of the node to get parents for.
[idsOnly]boolif the node ids should be returned rather than the nodes

flowGraph.getTerminalNodes([idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the terminal nodes of the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the terminal nodes of the flow

ParamTypeDescription
[idsOnly]boolif the node ids should be returned rather than the nodes

flowGraph.getVertex(vertexId) ⇒ object

Get the vertex which matches the ID specified

Kind: instance method of FlowGraph
Returns: object - a vertex in the graph

ParamTypeDescription
vertexIdstringthe ID of the vertex to return

flowGraph.getNode(nodeId) ⇒ object | null

Get the node which matches the ID specified

Kind: instance method of FlowGraph
Returns: object | null - a node in the flow, or null

ParamTypeDescription
nodeIdstringthe ID of the node to return

flowGraph.getNodeUnsafe(nodeId) ⇒ object

Get the node which matches the ID specified and will throw an error if node was not found. Call this if you expect the node to exist

Kind: instance method of FlowGraph
Returns: object - a node in the flow

ParamTypeDescription
nodeIdstringthe ID of the node to return

flowGraph.getValidation() ⇒ object

Get the validation state of the flow

Kind: instance method of FlowGraph
Returns: object - the validation state of the flow

flowGraph.registerValidator(validator)

Registers a FlowValidator type class to the flow. When validation is run, this class will be used to validate the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
validatorFlowValidatorA class which is a FlowValidator

flowGraph.validate() ⇒ object

Validate the flow - check all the nodes, no cycles, syntax, etc. Update the definition to make validation report available to clients

Kind: instance method of FlowGraph
Returns: object - the validation state

api-builder-flow-graph~FlowGraph

Kind: inner class of api-builder-flow-graph

new FlowGraph()

FlowGraph object

new FlowGraph(flowId, flowdef)

Creates an instance of FlowGraph.

ParamTypeDescription
flowIdstringThe id of this flow.
flowdefobjectThe flow definition.

flowGraph._ensureVertex(vertexId, info) ⇒ object

Ensures that a vertex will exist

Kind: instance method of FlowGraph
Returns: object - the vertex which matched or was created.
Access: protected

ParamTypeDescription
vertexIdstringthe ID of the vertex
infoobjectinfo to be set on the vertex. If vertex already exists, the info will be merged with the existing info.

flowGraph._deleteVertex(vertexId)

Deletes a vertex from the graph

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
vertexIdstringthe id of the vertex to delete

flowGraph._getVertexChildren(vertexId, output, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the children of a vertex in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the child vertices of a vertex in the flow

ParamTypeDescription
vertexIdstringthe Id of the vertex to get children for.
outputstringthe vetex output to get the children for.
[idsOnly]boolif the vertex idsOnly should be returned rather than the vertices

flowGraph._getVertexParents(vertexId, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the parents of a vertex in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the parent nodes of a vertex in the flow

ParamTypeDescription
vertexIdstringthe Id of the vertex to get parents for.
[idsOnly]boolif the vertex ids should be returned rather than the vertices

flowGraph._ensureEdge(output, fromId, toId) ⇒ object

Ensures that an edge will exist between any two vertices. If any of the vertices do not exist, they will be created.

Kind: instance method of FlowGraph
Returns: object - the edge which matched or was created.
Access: protected

ParamTypeDescription
outputstringthe vertex output group the edge belongs to.
fromIdstringthe ID of the vertex where the edge starts
toIdstringthis ID of the vertex where the edge ends

flowGraph._deleteEdge(fromId, output, toId)

Deletes an edge from one node to another. Removes the parent/child where necesarry from each vertex.

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
fromIdstringthe vertex where the edge starts
outputstringthe vertex output group the edge belongs to.
toIdstringthe vertex where the edge ends

flowGraph._deleteEdges(fromId, toId)

Deletes the edges from one node to another (across all outputs). Removes the parent/child where necesarry from each vertex.

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
fromIdstringthe vertex where the edge starts
toIdstringthe vertex where the edge ends

flowGraph._setValidation(validation)

Sets the validation state on the flow definition

Kind: instance method of FlowGraph
Access: protected

ParamTypeDescription
validationobjectthe validation state

flowGraph._getOutputRoutes(nodeId) ⇒ object

Gets a list of all nodes which a node may route to grouped by output.

Kind: instance method of FlowGraph
Returns: object - A map of IDs for routes from the node specified grouped by output.
Access: protected

ParamTypeDescription
nodeIdstringthe ID of a node to get routes for

flowGraph._onChange()

Generates a unique symbol of the flow. Should be called whenever the flow changes.

Kind: instance method of FlowGraph

flowGraph._buildGraph()

Build a graph from the flow definition.

Kind: instance method of FlowGraph
Access: protected

flowGraph._buildVertex(nodeId)

Builds a vertex for a nodeId

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringThe nodeId from which to build a vertex.

flowGraph.changeNodeName(nodeId, name)

Sets the name of a node

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringNode ID
namestringNew node name

flowGraph.changeMethod(nodeId, method, nodehandler)

Modifies the method of a node to match a new spec

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringThe id of the node to update.
methodstringthe method to use
nodehandlerobjectthe node handler in use

flowGraph.insertNode(node, nodeId) ⇒ string

Inserts a node into the flow graph.

Kind: instance method of FlowGraph
Returns: string - - the inserted nodeId

ParamTypeDescription
nodeobjectThe node to insert.
nodeIdstringThe id of the node to insert. If supplied, it must be unique. If not supplied, the node id will be generated.

flowGraph.deleteNode(nodeId)

Delete a specific node from the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe id of the node to delete

flowGraph.deleteRoute(output, fromId, toId)

Delete the output route from one node to another.

Kind: instance method of FlowGraph

ParamTypeDescription
outputstringthe output to delete the route for.
fromIdstringthe node id the routes are being deleted from.
toIdstringthe node id being removed from the routes.

flowGraph.deleteRoutes(fromId, toId)

Delete all the output routes from one node to another.

Kind: instance method of FlowGraph

ParamTypeDescription
fromIdstringthe node id the routes are being deleted from.
toIdstringthe node id being removed from the routes.

flowGraph.setStart(nodeId)

Sets a node as the start node for the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringThe start node for the flow.

flowGraph.unsetStart()

Clears the start node for the flow. This action will make the flow invalid.

Kind: instance method of FlowGraph

flowGraph.addParameter(nodeId, name, value, [type])

Adds a parameter to a node in the flow

Kind: instance method of FlowGraph

ParamTypeDefaultDescription
nodeIdstringthe node id
namestringthe name of the parameter
valuestringthe value of the parameter
[type]string"jsonpath"the type of the parameter.

flowGraph.updateParameter(nodeId, name, prop, newValue)

Updates a parameter from a node in the flow

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe node id
namestringthe current name of the parameter
propstring | objectthe field to update (name
newValuestringthe new value of the prop specified if it is a string

flowGraph.removeParameter(nodeId, name) ⇒ object

Removes a parameter by name from a node in the flow

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph.addAuthorization(nodeId, name, value, [type])

Adds a authorization parameter to a node in the flow

Kind: instance method of FlowGraph

ParamTypeDefaultDescription
nodeIdstringthe node id
namestringthe name of the parameter
valuestringthe value of the parameter
[type]string"jsonpath"the type of the parameter.

flowGraph.updateAuthorization(nodeId, name, prop, newValue)

Updates a authorization parameter from a node in the flow

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe node id
namestringthe current name of the parameter
propstring | objectthe field to update (name
newValuestringthe new value of the prop specified if it is a string

flowGraph.removeAuthorization(nodeId, name) ⇒ object

Removes a authorization parameter by name from a node in the flow

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph._addParameter(location, nodeId, name, value, [type])

Adds a parameter to a node in the flow

Kind: instance method of FlowGraph

ParamTypeDefaultDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe name of the parameter
valuestringthe value of the parameter
[type]string"jsonpath"the type of the parameter.

flowGraph._getParameter(location, nodeId, name) ⇒ object

Gets a parameter from the node by name

Kind: instance method of FlowGraph
Returns: object - the parameter

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph._getParameterIndex(location, nodeId, name) ⇒ number

Gets a parameter index from the node by name

Kind: instance method of FlowGraph
Returns: number - the parameter index

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe name of the parameter

flowGraph._updateParameter(location, nodeId, name, prop, newValue)

Updates a parameter from a node in the flow

Kind: instance method of FlowGraph

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namestringthe current name of the parameter
propstring | objectthe field to update (name
newValuestringthe new value of the prop specified if it is a string

flowGraph._removeParameterByName(location, nodeId, name) ⇒ object

Removes a parameter by name from a node in the flow

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
namenumberthe name of the parameter

flowGraph._removeParameter(location, nodeId, index) ⇒ object

Removes a parameter by index from a node in the flow. Does not trigger change.

Kind: instance method of FlowGraph
Returns: object - the parameter that was removed

ParamTypeDescription
locationstringthe parameter location, one of: parameters
nodeIdstringthe node id
indexnumberthe index of the parameter

flowGraph.updateOutputContext(nodeId, name, value)

Modifies the JSONPath context of an output

Kind: instance method of FlowGraph

ParamTypeDescription
nodeIdstringthe node id
namestringthe name of the output
valuestringthe new JSONPath context

flowGraph.connectNode(sourceId, sourceOutput, targetId)

Connects a node output to the specified target.

Kind: instance method of FlowGraph

ParamTypeDescription
sourceIdstringThe source node for the connection.
sourceOutputstringThe output in the source node for the connection.
targetIdstringThe id of the target node to connect to.

flowGraph.disconnectNode(sourceId, sourceOutput, targetId)

Disconnects a target node from a parent node's source and output.

Kind: instance method of FlowGraph

ParamTypeDescription
sourceIdstringThe source node for the connection.
sourceOutputstringThe output in the source node for the connection.
targetIdstringThe id of the target node to connect to.

flowGraph.isEmpty() ⇒ boolean

Indicates if the flow is empty, with no nodes.

Kind: instance method of FlowGraph
Returns: boolean - true if the flow is empty.

flowGraph.getName() ⇒ string

Gets the name of the flow from flow info meta-data.

Kind: instance method of FlowGraph
Returns: string - The flow name.

flowGraph.setName(name)

Sets the name of the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
namestringThe flow name.

flowGraph.getDescription() ⇒ string

Gets the description of the flow from flow info meta-data.

Kind: instance method of FlowGraph
Returns: string - The flow description.

flowGraph.setDescription(description)

Sets the description of the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
descriptionstringThe flow description.

flowGraph.getSymbol() ⇒ symbol

Get the unique symbol of the flow

Kind: instance method of FlowGraph
Returns: symbol - the flow symbol

flowGraph.getDefinition() ⇒ object

Gets the definition of the flow

Kind: instance method of FlowGraph
Returns: object - the flow definition

flowGraph.getGraph() ⇒ object

Gets the graph representation of the flow

Kind: instance method of FlowGraph
Returns: object - the flow graph representation

flowGraph.getId() ⇒ string

Gets the Id of the flow

Kind: instance method of FlowGraph
Returns: string - the flow id

flowGraph.getEdges() ⇒ Array.<object>

Gets the edges of the flow graph

Kind: instance method of FlowGraph
Returns: Array.<object> - the edges of the graph

flowGraph.getEdge(output, fromId, toId) ⇒ object | null

Get the edge between two nodes.

Kind: instance method of FlowGraph
Returns: object | null - the edge between two nodes. Null if no edge exists.

ParamTypeDescription
outputstringthe node output the edges belong to.
fromIdstringthe ID of the vertex where the edge starts
toIdstringthis ID of the vertex where the edge ends

flowGraph.getVertices([idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the vertices of the graph

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the vertices of the graph

ParamTypeDescription
[idsOnly]boolif the vertex ids should be returned rather than the vertices

flowGraph.getNodes([idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the nodes of the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the nodes of the flow

ParamTypeDescription
[idsOnly]boolif the node ids should be returned rather than the nodes

flowGraph.getChildren(nodeId, output, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the children of a node in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the child nodes of a node in the flow

ParamTypeDescription
nodeIdstringthe Id of the node to get children for.
outputstringthe node output to get the children for. If omitted then all children are returned.
[idsOnly]boolif the node idsOnly should be returned rather than the nodes

flowGraph.getParents(nodeId, [idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the parents of a node in the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the parent nodes of a node in the flow

ParamTypeDescription
nodeIdstringthe Id of the node to get parents for.
[idsOnly]boolif the node ids should be returned rather than the nodes

flowGraph.getTerminalNodes([idsOnly]) ⇒ Array.<string> | Array.<object>

Gets the terminal nodes of the flow

Kind: instance method of FlowGraph
Returns: Array.<string> | Array.<object> - the terminal nodes of the flow

ParamTypeDescription
[idsOnly]boolif the node ids should be returned rather than the nodes

flowGraph.getVertex(vertexId) ⇒ object

Get the vertex which matches the ID specified

Kind: instance method of FlowGraph
Returns: object - a vertex in the graph

ParamTypeDescription
vertexIdstringthe ID of the vertex to return

flowGraph.getNode(nodeId) ⇒ object | null

Get the node which matches the ID specified

Kind: instance method of FlowGraph
Returns: object | null - a node in the flow, or null

ParamTypeDescription
nodeIdstringthe ID of the node to return

flowGraph.getNodeUnsafe(nodeId) ⇒ object

Get the node which matches the ID specified and will throw an error if node was not found. Call this if you expect the node to exist

Kind: instance method of FlowGraph
Returns: object - a node in the flow

ParamTypeDescription
nodeIdstringthe ID of the node to return

flowGraph.getValidation() ⇒ object

Get the validation state of the flow

Kind: instance method of FlowGraph
Returns: object - the validation state of the flow

flowGraph.registerValidator(validator)

Registers a FlowValidator type class to the flow. When validation is run, this class will be used to validate the flow.

Kind: instance method of FlowGraph

ParamTypeDescription
validatorFlowValidatorA class which is a FlowValidator

flowGraph.validate() ⇒ object

Validate the flow - check all the nodes, no cycles, syntax, etc. Update the definition to make validation report available to clients

Kind: instance method of FlowGraph
Returns: object - the validation state

api-builder-flow-graph~objectToArray(object, map) ⇒ Array.<string> | array

Converts an object into an array of keys or values

Kind: inner method of api-builder-flow-graph
Returns: Array.<string> | array - an array of values based on the map.

ParamTypeDescription
objectobjectthe object to convert into an array
mapfunction | boolif true, return all the keys of the object if false, return all the values of the object if function, map object keys to array values.

Building

npm run build

Author

Axway support@axway.com https://axway.com

License

This code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: https://support.axway.com/en/auth/general-conditions; EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.

Keywords

FAQs

Package last updated on 09 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc