# axway-flow-graph

Graph structure for parsing and manipulating flows

# API Reference

<a name="module_axway-flow-graph..FlowValidator"></a>

### axway-flow-graph~FlowValidator
Helper for validating flows. The validation checks for:
- no cyclical loops
- no undefined nodes in the routing

**Kind**: inner class of [<code>axway-flow-graph</code>](#module_axway-flow-graph)  
**Access**: public  

* [~FlowValidator](#module_axway-flow-graph..FlowValidator)
    * [new FlowValidator(flowGraph, credentialManager)](#new_module_axway-flow-graph..FlowValidator_new)
    * [._strongconnect(vertex, stack, stronglyConnectedGroups)](#module_axway-flow-graph..FlowValidator+_strongconnect)
    * [._parseParamValue(param)](#module_axway-flow-graph..FlowValidator+_parseParamValue) ⇒ <code>object</code>
    * [._addValidationError(validationData, error)](#module_axway-flow-graph..FlowValidator+_addValidationError)
    * [._addValidationWarning(validationData, warning)](#module_axway-flow-graph..FlowValidator+_addValidationWarning)
    * [.checkForLoops(validationData)](#module_axway-flow-graph..FlowValidator+checkForLoops) ⇒ <code>boolean</code>
    * [.checkForMissingRoutes(validationData)](#module_axway-flow-graph..FlowValidator+checkForMissingRoutes) ⇒ <code>boolean</code>
    * [.checkForInvalidStart(validationData)](#module_axway-flow-graph..FlowValidator+checkForInvalidStart) ⇒ <code>boolean</code>
    * [.checkNodeOutputContext(validationData)](#module_axway-flow-graph..FlowValidator+checkNodeOutputContext) ⇒ <code>boolean</code>
    * [.validate()](#module_axway-flow-graph..FlowValidator+validate) ⇒ <code>object</code>

<a name="new_module_axway-flow-graph..FlowValidator_new"></a>

#### new FlowValidator(flowGraph, credentialManager)
Create a flow validator.


| Param | Type | Description |
| --- | --- | --- |
| flowGraph | <code>object</code> | a FlowGraph instance |
| credentialManager | <code>object</code> | a credentialManager |

<a name="module_axway-flow-graph..FlowValidator+_strongconnect"></a>

#### flowValidator.\_strongconnect(vertex, stack, stronglyConnectedGroups)
Using 'Tarjan's strongly connected components algorithm' to group strongly
conencted nodes (loops).

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| vertex | <code>object</code> | The node/vertex to process. |
| stack | <code>array</code> | The stack for vertex processing. |
| stronglyConnectedGroups | <code>array</code> | The resulting list of strongly connected groups. |

<a name="module_axway-flow-graph..FlowValidator+_parseParamValue"></a>

#### flowValidator.\_parseParamValue(param) ⇒ <code>object</code>
Parses a parameter to a given type.

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Returns**: <code>object</code> - containing error code in 'error' or parsed value in 'data'.  

| Param | Type | Description |
| --- | --- | --- |
| param | <code>object</code> | flow node param object |
| param.type | <code>string</code> | type of data to parse. Defaults to jsonpaht |
| param.value | <code>string</code> | stringified data to be parsed |

<a name="module_axway-flow-graph..FlowValidator+_addValidationError"></a>

#### flowValidator.\_addValidationError(validationData, error)
Adds a validation error to validationData

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  

| Param | Type | Description |
| --- | --- | --- |
| validationData | <code>object</code> | Object containing the validation warnings and errors |
| error | <code>object</code> | Object containg an error |

<a name="module_axway-flow-graph..FlowValidator+_addValidationWarning"></a>

#### flowValidator.\_addValidationWarning(validationData, warning)
Adds a validation warning to validationData

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  

| Param | Type | Description |
| --- | --- | --- |
| validationData | <code>object</code> | Object containing the validation warnings and errors |
| warning | <code>object</code> | Object containg an warning |

<a name="module_axway-flow-graph..FlowValidator+checkForLoops"></a>

#### flowValidator.checkForLoops(validationData) ⇒ <code>boolean</code>
Check for any closed loops in the graph.
If there are loops loop chains are stored in validationData.errors.flowErrors.loops.

Possible errors and error codes:
 type: loop
 code: INVALID_NODE

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Returns**: <code>boolean</code> - true if there are loops detected.  
**Access**: public  

| Param | Type | Description |
| --- | --- | --- |
| validationData | <code>object</code> | The object to add the validation errors to. |

<a name="module_axway-flow-graph..FlowValidator+checkForMissingRoutes"></a>

#### flowValidator.checkForMissingRoutes(validationData) ⇒ <code>boolean</code>
Check nodes that have connections to non-existent targets.
If there are undefined connections the details are are stored in
validationData.errors.nodeErrors[nodeId].missingRoutes.

Possible errors and error codes:
 type: invalidNodeRoute
 code: INVALID_NODE

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Returns**: <code>boolean</code> - true if there are missing routes detected.  
**Access**: public  

| Param | Type | Description |
| --- | --- | --- |
| validationData | <code>object</code> | The object to add the validation errors to. |

<a name="module_axway-flow-graph..FlowValidator+checkForInvalidStart"></a>

#### flowValidator.checkForInvalidStart(validationData) ⇒ <code>boolean</code>
Check start to see if it is an invalid type or pointing to a non-existant node.
If start is invalid the details are are stored in
validationData.errors.flowErrors.invalidStart.

Possible errors and error codes:
 type: invalidStart
 code: INVALID_NODE

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Returns**: <code>boolean</code> - true if start is invalid.  
**Access**: public  

| Param | Type | Description |
| --- | --- | --- |
| validationData | <code>object</code> | The object to add the validation errors to. |

<a name="module_axway-flow-graph..FlowValidator+checkNodeOutputContext"></a>

#### flowValidator.checkNodeOutputContext(validationData) ⇒ <code>boolean</code>
Check that the flow node output contexts are valid JSONPath selectors.
If output contexts are invalid, the details are are stored in
validationData.errors.nodeErrors[nodeId].invalidOuputContext.

Possible errors and error codes:
 type: invalidNodeOutput
 code: INVALID_JSONPATH

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Returns**: <code>boolean</code> - true if there are invalid ouput contexts detected.  
**Access**: public  

| Param | Type | Description |
| --- | --- | --- |
| validationData | <code>object</code> | The object to add the validation errors to. |

<a name="module_axway-flow-graph..FlowValidator+validate"></a>

#### flowValidator.validate() ⇒ <code>object</code>
Run checks on the flow and report validation errors as they are found.

Possible errors and error codes:
 type: loop
 code: INVALID_NODE

 type: invalidNodeRoute
 code: INVALID_NODE

 type: invalidStart
 code: INVALID_NODE

 type: invalidNodeOutput
 code: INVALID_JSONPATH

**Kind**: instance method of [<code>FlowValidator</code>](#module_axway-flow-graph..FlowValidator)  
**Returns**: <code>object</code> - the validation report  
**Access**: public  
<a name="module_axway-flow-graph..FlowGraph"></a>

### axway-flow-graph~FlowGraph
**Kind**: inner class of [<code>axway-flow-graph</code>](#module_axway-flow-graph)  

* [~FlowGraph](#module_axway-flow-graph..FlowGraph)
    * [new FlowGraph()](#new_module_axway-flow-graph..FlowGraph_new)
    * [new FlowGraph(flowId, flowdef)](#new_module_axway-flow-graph..FlowGraph_new)
    * [._ensureVertex(vertexId, info)](#module_axway-flow-graph..FlowGraph+_ensureVertex) ⇒ <code>object</code>
    * [._deleteVertex(vertexId)](#module_axway-flow-graph..FlowGraph+_deleteVertex)
    * [._getVertexChildren(vertexId, output, [idsOnly])](#module_axway-flow-graph..FlowGraph+_getVertexChildren) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [._getVertexParents(vertexId, [idsOnly])](#module_axway-flow-graph..FlowGraph+_getVertexParents) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [._ensureEdge(output, fromId, toId)](#module_axway-flow-graph..FlowGraph+_ensureEdge) ⇒ <code>object</code>
    * [._deleteEdge(fromId, output, toId)](#module_axway-flow-graph..FlowGraph+_deleteEdge)
    * [._deleteEdges(fromId, toId)](#module_axway-flow-graph..FlowGraph+_deleteEdges)
    * [._setValidation(validation)](#module_axway-flow-graph..FlowGraph+_setValidation)
    * [._getOutputRoutes(nodeId)](#module_axway-flow-graph..FlowGraph+_getOutputRoutes) ⇒ <code>object</code>
    * [._onChange()](#module_axway-flow-graph..FlowGraph+_onChange)
    * [._buildGraph()](#module_axway-flow-graph..FlowGraph+_buildGraph)
    * [._buildVertex(nodeId)](#module_axway-flow-graph..FlowGraph+_buildVertex)
    * [.changeNodeName(nodeId, name)](#module_axway-flow-graph..FlowGraph+changeNodeName)
    * [.changeMethod(nodeId, method, nodehandler)](#module_axway-flow-graph..FlowGraph+changeMethod)
    * [.insertNode(node, nodeId)](#module_axway-flow-graph..FlowGraph+insertNode) ⇒ <code>string</code>
    * [.deleteNode(nodeId)](#module_axway-flow-graph..FlowGraph+deleteNode)
    * [.deleteRoute(output, fromId, toId)](#module_axway-flow-graph..FlowGraph+deleteRoute)
    * [.deleteRoutes(fromId, toId)](#module_axway-flow-graph..FlowGraph+deleteRoutes)
    * [.setStart(nodeId)](#module_axway-flow-graph..FlowGraph+setStart)
    * [.unsetStart()](#module_axway-flow-graph..FlowGraph+unsetStart)
    * [.addParameter(nodeId, name, value, [type])](#module_axway-flow-graph..FlowGraph+addParameter)
    * [.updateParameter(nodeId, name, prop, newValue)](#module_axway-flow-graph..FlowGraph+updateParameter)
    * [.removeParameter(nodeId, name)](#module_axway-flow-graph..FlowGraph+removeParameter) ⇒ <code>object</code>
    * [.addAuthorization(nodeId, name, value, [type])](#module_axway-flow-graph..FlowGraph+addAuthorization)
    * [.updateAuthorization(nodeId, name, prop, newValue)](#module_axway-flow-graph..FlowGraph+updateAuthorization)
    * [.removeAuthorization(nodeId, name)](#module_axway-flow-graph..FlowGraph+removeAuthorization) ⇒ <code>object</code>
    * [._addParameter(location, nodeId, name, value, [type])](#module_axway-flow-graph..FlowGraph+_addParameter)
    * [._getParameter(location, nodeId, name)](#module_axway-flow-graph..FlowGraph+_getParameter) ⇒ <code>object</code>
    * [._getParameterIndex(location, nodeId, name)](#module_axway-flow-graph..FlowGraph+_getParameterIndex) ⇒ <code>number</code>
    * [._updateParameter(location, nodeId, name, prop, newValue)](#module_axway-flow-graph..FlowGraph+_updateParameter)
    * [._removeParameterByName(location, nodeId, name)](#module_axway-flow-graph..FlowGraph+_removeParameterByName) ⇒ <code>object</code>
    * [._removeParameter(location, nodeId, index)](#module_axway-flow-graph..FlowGraph+_removeParameter) ⇒ <code>object</code>
    * [.updateOutputContext(nodeId, name, value)](#module_axway-flow-graph..FlowGraph+updateOutputContext)
    * [.connectNode(sourceId, sourceOutput, targetId)](#module_axway-flow-graph..FlowGraph+connectNode)
    * [.disconnectNode(sourceId, sourceOutput, targetId)](#module_axway-flow-graph..FlowGraph+disconnectNode)
    * [.isEmpty()](#module_axway-flow-graph..FlowGraph+isEmpty) ⇒ <code>boolean</code>
    * [.getName()](#module_axway-flow-graph..FlowGraph+getName) ⇒ <code>string</code>
    * [.setName(name)](#module_axway-flow-graph..FlowGraph+setName)
    * [.getDescription()](#module_axway-flow-graph..FlowGraph+getDescription) ⇒ <code>string</code>
    * [.setDescription(description)](#module_axway-flow-graph..FlowGraph+setDescription)
    * [.getSymbol()](#module_axway-flow-graph..FlowGraph+getSymbol) ⇒ <code>symbol</code>
    * [.getDefinition()](#module_axway-flow-graph..FlowGraph+getDefinition) ⇒ <code>object</code>
    * [.getGraph()](#module_axway-flow-graph..FlowGraph+getGraph) ⇒ <code>object</code>
    * [.getId()](#module_axway-flow-graph..FlowGraph+getId) ⇒ <code>string</code>
    * [.getEdges()](#module_axway-flow-graph..FlowGraph+getEdges) ⇒ <code>Array.&lt;object&gt;</code>
    * [.getEdge(output, fromId, toId)](#module_axway-flow-graph..FlowGraph+getEdge) ⇒ <code>object</code> \| <code>null</code>
    * [.getVertices([idsOnly])](#module_axway-flow-graph..FlowGraph+getVertices) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getNodes([idsOnly])](#module_axway-flow-graph..FlowGraph+getNodes) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getChildren(nodeId, output, [idsOnly])](#module_axway-flow-graph..FlowGraph+getChildren) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getParents(nodeId, [idsOnly])](#module_axway-flow-graph..FlowGraph+getParents) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getTerminalNodes([idsOnly])](#module_axway-flow-graph..FlowGraph+getTerminalNodes) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getVertex(vertexId)](#module_axway-flow-graph..FlowGraph+getVertex) ⇒ <code>object</code>
    * [.getNode(nodeId)](#module_axway-flow-graph..FlowGraph+getNode) ⇒ <code>object</code> \| <code>null</code>
    * [.getNodeUnsafe(nodeId)](#module_axway-flow-graph..FlowGraph+getNodeUnsafe) ⇒ <code>object</code>
    * [.getValidation()](#module_axway-flow-graph..FlowGraph+getValidation) ⇒ <code>object</code>
    * [.registerValidator(validator)](#module_axway-flow-graph..FlowGraph+registerValidator)
    * [.validate()](#module_axway-flow-graph..FlowGraph+validate) ⇒ <code>object</code>

<a name="new_module_axway-flow-graph..FlowGraph_new"></a>

#### new FlowGraph()
FlowGraph object

<a name="new_module_axway-flow-graph..FlowGraph_new"></a>

#### new FlowGraph(flowId, flowdef)
Creates an instance of FlowGraph.


| Param | Type | Description |
| --- | --- | --- |
| flowId | <code>string</code> | The id of this flow. |
| flowdef | <code>object</code> | The flow definition. |

<a name="module_axway-flow-graph..FlowGraph+_ensureVertex"></a>

#### flowGraph.\_ensureVertex(vertexId, info) ⇒ <code>object</code>
Ensures that a vertex will exist

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the vertex which matched or was created.  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the ID of the vertex |
| info | <code>object</code> | info to be set on the vertex. If vertex already exists, the info will                      be merged with the existing info. |

<a name="module_axway-flow-graph..FlowGraph+_deleteVertex"></a>

#### flowGraph.\_deleteVertex(vertexId)
Deletes a vertex from the graph

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the id of the vertex to delete |

<a name="module_axway-flow-graph..FlowGraph+_getVertexChildren"></a>

#### flowGraph.\_getVertexChildren(vertexId, output, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the children of a vertex in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the child vertices of a vertex in the flow  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the Id of the vertex to get children for. |
| output | <code>string</code> | the vetex output to get the children for. |
| [idsOnly] | <code>bool</code> | if the vertex idsOnly should be returned rather than the vertices |

<a name="module_axway-flow-graph..FlowGraph+_getVertexParents"></a>

#### flowGraph.\_getVertexParents(vertexId, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the parents of a vertex in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the parent nodes of a vertex in the flow  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the Id of the vertex to get parents for. |
| [idsOnly] | <code>bool</code> | if the vertex ids should be returned rather than the vertices |

<a name="module_axway-flow-graph..FlowGraph+_ensureEdge"></a>

#### flowGraph.\_ensureEdge(output, fromId, toId) ⇒ <code>object</code>
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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the edge which matched or was created.  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| output | <code>string</code> | the vertex output group the edge belongs to. |
| fromId | <code>string</code> | the ID of the vertex where the edge starts |
| toId | <code>string</code> | this ID of the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+_deleteEdge"></a>

#### 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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| fromId | <code>string</code> | the vertex where the edge starts |
| output | <code>string</code> | the vertex output group the edge belongs to. |
| toId | <code>string</code> | the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+_deleteEdges"></a>

#### 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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| fromId | <code>string</code> | the vertex where the edge starts |
| toId | <code>string</code> | the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+_setValidation"></a>

#### flowGraph.\_setValidation(validation)
Sets the validation state on the flow definition

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| validation | <code>object</code> | the validation state |

<a name="module_axway-flow-graph..FlowGraph+_getOutputRoutes"></a>

#### flowGraph.\_getOutputRoutes(nodeId) ⇒ <code>object</code>
Gets a list of all nodes which a node may route to grouped by output.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - A map of IDs for routes from the node specified grouped by output.  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the ID of a node to get routes for |

<a name="module_axway-flow-graph..FlowGraph+_onChange"></a>

#### flowGraph.\_onChange()
Generates a unique symbol of the flow. Should be called whenever the flow changes.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
<a name="module_axway-flow-graph..FlowGraph+_buildGraph"></a>

#### flowGraph.\_buildGraph()
Build a graph from the flow definition.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  
<a name="module_axway-flow-graph..FlowGraph+_buildVertex"></a>

#### flowGraph.\_buildVertex(nodeId)
Builds a vertex for a nodeId

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | The nodeId from which to build a vertex. |

<a name="module_axway-flow-graph..FlowGraph+changeNodeName"></a>

#### flowGraph.changeNodeName(nodeId, name)
Sets the name of a node

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | Node ID |
| name | <code>string</code> | New node name |

<a name="module_axway-flow-graph..FlowGraph+changeMethod"></a>

#### flowGraph.changeMethod(nodeId, method, nodehandler)
Modifies the method of a node to match a new spec

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | The id of the node to update. |
| method | <code>string</code> | the method to use |
| nodehandler | <code>object</code> | the node handler in use |

<a name="module_axway-flow-graph..FlowGraph+insertNode"></a>

#### flowGraph.insertNode(node, nodeId) ⇒ <code>string</code>
Inserts a node into the flow graph.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - - the inserted nodeId  

| Param | Type | Description |
| --- | --- | --- |
| node | <code>object</code> | The node to insert. |
| nodeId | <code>string</code> | The id of the node to insert.  If supplied, it must be unique.  If not supplied, the node id will be generated. |

<a name="module_axway-flow-graph..FlowGraph+deleteNode"></a>

#### flowGraph.deleteNode(nodeId)
Delete a specific node from the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the id of the node to delete |

<a name="module_axway-flow-graph..FlowGraph+deleteRoute"></a>

#### flowGraph.deleteRoute(output, fromId, toId)
Delete the output route from one node to another.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| output | <code>string</code> | the output to delete the route for. |
| fromId | <code>string</code> | the node id the routes are being deleted from. |
| toId | <code>string</code> | the node id being removed from the routes. |

<a name="module_axway-flow-graph..FlowGraph+deleteRoutes"></a>

#### flowGraph.deleteRoutes(fromId, toId)
Delete all the output routes from one node to another.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| fromId | <code>string</code> | the node id the routes are being deleted from. |
| toId | <code>string</code> | the node id being removed from the routes. |

<a name="module_axway-flow-graph..FlowGraph+setStart"></a>

#### flowGraph.setStart(nodeId)
Sets a node as the start node for the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | The start node for the flow. |

<a name="module_axway-flow-graph..FlowGraph+unsetStart"></a>

#### flowGraph.unsetStart()
Clears the start node for the flow.  This action will make the flow invalid.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
<a name="module_axway-flow-graph..FlowGraph+addParameter"></a>

#### flowGraph.addParameter(nodeId, name, value, [type])
Adds a parameter to a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| nodeId | <code>string</code> |  | the node id |
| name | <code>string</code> |  | the name of the parameter |
| value | <code>string</code> |  | the value of the parameter |
| [type] | <code>string</code> | <code>&quot;jsonpath&quot;</code> | the type of the parameter. |

<a name="module_axway-flow-graph..FlowGraph+updateParameter"></a>

#### flowGraph.updateParameter(nodeId, name, prop, newValue)
Updates a parameter from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the current name of the parameter |
| prop | <code>string</code> \| <code>object</code> | the field to update (name|type|value) if string,                               or the new value of the parameter |
| newValue | <code>string</code> | the new value of the prop specified if it is a string |

<a name="module_axway-flow-graph..FlowGraph+removeParameter"></a>

#### flowGraph.removeParameter(nodeId, name) ⇒ <code>object</code>
Removes a parameter by name from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+addAuthorization"></a>

#### flowGraph.addAuthorization(nodeId, name, value, [type])
Adds a authorization parameter to a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| nodeId | <code>string</code> |  | the node id |
| name | <code>string</code> |  | the name of the parameter |
| value | <code>string</code> |  | the value of the parameter |
| [type] | <code>string</code> | <code>&quot;jsonpath&quot;</code> | the type of the parameter. |

<a name="module_axway-flow-graph..FlowGraph+updateAuthorization"></a>

#### flowGraph.updateAuthorization(nodeId, name, prop, newValue)
Updates a authorization parameter from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the current name of the parameter |
| prop | <code>string</code> \| <code>object</code> | the field to update (name|type|value) if string,                               or the new value of the parameter |
| newValue | <code>string</code> | the new value of the prop specified if it is a string |

<a name="module_axway-flow-graph..FlowGraph+removeAuthorization"></a>

#### flowGraph.removeAuthorization(nodeId, name) ⇒ <code>object</code>
Removes a authorization parameter by name from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_addParameter"></a>

#### flowGraph.\_addParameter(location, nodeId, name, value, [type])
Adds a parameter to a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| location | <code>string</code> |  | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> |  | the node id |
| name | <code>string</code> |  | the name of the parameter |
| value | <code>string</code> |  | the value of the parameter |
| [type] | <code>string</code> | <code>&quot;jsonpath&quot;</code> | the type of the parameter. |

<a name="module_axway-flow-graph..FlowGraph+_getParameter"></a>

#### flowGraph.\_getParameter(location, nodeId, name) ⇒ <code>object</code>
Gets a parameter from the node by name

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_getParameterIndex"></a>

#### flowGraph.\_getParameterIndex(location, nodeId, name) ⇒ <code>number</code>
Gets a parameter index from the node by name

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>number</code> - the parameter index  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_updateParameter"></a>

#### flowGraph.\_updateParameter(location, nodeId, name, prop, newValue)
Updates a parameter from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the current name of the parameter |
| prop | <code>string</code> \| <code>object</code> | the field to update (name|type|value) if string,                               or the new value of the parameter |
| newValue | <code>string</code> | the new value of the prop specified if it is a string |

<a name="module_axway-flow-graph..FlowGraph+_removeParameterByName"></a>

#### flowGraph.\_removeParameterByName(location, nodeId, name) ⇒ <code>object</code>
Removes a parameter by name from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>number</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_removeParameter"></a>

#### flowGraph.\_removeParameter(location, nodeId, index) ⇒ <code>object</code>
Removes a parameter by index from a node in the flow.  Does not trigger change.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| index | <code>number</code> | the index of the parameter |

<a name="module_axway-flow-graph..FlowGraph+updateOutputContext"></a>

#### flowGraph.updateOutputContext(nodeId, name, value)
Modifies the JSONPath context of an output

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the output |
| value | <code>string</code> | the new JSONPath context |

<a name="module_axway-flow-graph..FlowGraph+connectNode"></a>

#### flowGraph.connectNode(sourceId, sourceOutput, targetId)
Connects a node output to the specified target.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| sourceId | <code>string</code> | The source node for the connection. |
| sourceOutput | <code>string</code> | The output in the source node for the connection. |
| targetId | <code>string</code> | The id of the target node to connect to. |

<a name="module_axway-flow-graph..FlowGraph+disconnectNode"></a>

#### flowGraph.disconnectNode(sourceId, sourceOutput, targetId)
Disconnects a target node from a parent node's source and output.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| sourceId | <code>string</code> | The source node for the connection. |
| sourceOutput | <code>string</code> | The output in the source node for the connection. |
| targetId | <code>string</code> | The id of the target node to connect to. |

<a name="module_axway-flow-graph..FlowGraph+isEmpty"></a>

#### flowGraph.isEmpty() ⇒ <code>boolean</code>
Indicates if the flow is empty, with no nodes.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>boolean</code> - `true` if the flow is empty.  
<a name="module_axway-flow-graph..FlowGraph+getName"></a>

#### flowGraph.getName() ⇒ <code>string</code>
Gets the name of the flow from flow info meta-data.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - The flow name.  
<a name="module_axway-flow-graph..FlowGraph+setName"></a>

#### flowGraph.setName(name)
Sets the name of the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| name | <code>string</code> | The flow name. |

<a name="module_axway-flow-graph..FlowGraph+getDescription"></a>

#### flowGraph.getDescription() ⇒ <code>string</code>
Gets the description of the flow from flow info meta-data.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - The flow description.  
<a name="module_axway-flow-graph..FlowGraph+setDescription"></a>

#### flowGraph.setDescription(description)
Sets the description of the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| description | <code>string</code> | The flow description. |

<a name="module_axway-flow-graph..FlowGraph+getSymbol"></a>

#### flowGraph.getSymbol() ⇒ <code>symbol</code>
Get the unique symbol of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>symbol</code> - the flow symbol  
<a name="module_axway-flow-graph..FlowGraph+getDefinition"></a>

#### flowGraph.getDefinition() ⇒ <code>object</code>
Gets the definition of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the flow definition  
<a name="module_axway-flow-graph..FlowGraph+getGraph"></a>

#### flowGraph.getGraph() ⇒ <code>object</code>
Gets the graph representation of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the flow graph representation  
<a name="module_axway-flow-graph..FlowGraph+getId"></a>

#### flowGraph.getId() ⇒ <code>string</code>
Gets the Id of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - the flow id  
<a name="module_axway-flow-graph..FlowGraph+getEdges"></a>

#### flowGraph.getEdges() ⇒ <code>Array.&lt;object&gt;</code>
Gets the edges of the flow graph

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;object&gt;</code> - the edges of the graph  
<a name="module_axway-flow-graph..FlowGraph+getEdge"></a>

#### flowGraph.getEdge(output, fromId, toId) ⇒ <code>object</code> \| <code>null</code>
Get the edge between two nodes.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> \| <code>null</code> - the edge between two nodes. Null if no edge exists.  

| Param | Type | Description |
| --- | --- | --- |
| output | <code>string</code> | the node output the edges belong to. |
| fromId | <code>string</code> | the ID of the vertex where the edge starts |
| toId | <code>string</code> | this ID of the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+getVertices"></a>

#### flowGraph.getVertices([idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the vertices of the graph

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the vertices of the graph  

| Param | Type | Description |
| --- | --- | --- |
| [idsOnly] | <code>bool</code> | if the vertex ids should be returned rather than the vertices |

<a name="module_axway-flow-graph..FlowGraph+getNodes"></a>

#### flowGraph.getNodes([idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the nodes of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the nodes of the flow  

| Param | Type | Description |
| --- | --- | --- |
| [idsOnly] | <code>bool</code> | if the node ids should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getChildren"></a>

#### flowGraph.getChildren(nodeId, output, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the children of a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the child nodes of a node in the flow  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the Id of the node to get children for. |
| output | <code>string</code> | the node output to get the children for.                          If omitted then all children are returned. |
| [idsOnly] | <code>bool</code> | if the node idsOnly should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getParents"></a>

#### flowGraph.getParents(nodeId, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the parents of a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the parent nodes of a node in the flow  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the Id of the node to get parents for. |
| [idsOnly] | <code>bool</code> | if the node ids should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getTerminalNodes"></a>

#### flowGraph.getTerminalNodes([idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the terminal nodes of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the terminal nodes of the flow  

| Param | Type | Description |
| --- | --- | --- |
| [idsOnly] | <code>bool</code> | if the node ids should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getVertex"></a>

#### flowGraph.getVertex(vertexId) ⇒ <code>object</code>
Get the vertex which matches the ID specified

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - a vertex in the graph  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the ID of the vertex to return |

<a name="module_axway-flow-graph..FlowGraph+getNode"></a>

#### flowGraph.getNode(nodeId) ⇒ <code>object</code> \| <code>null</code>
Get the node which matches the ID specified

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> \| <code>null</code> - a node in the flow, or null  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the ID of the node to return |

<a name="module_axway-flow-graph..FlowGraph+getNodeUnsafe"></a>

#### flowGraph.getNodeUnsafe(nodeId) ⇒ <code>object</code>
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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - a node in the flow  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the ID of the node to return |

<a name="module_axway-flow-graph..FlowGraph+getValidation"></a>

#### flowGraph.getValidation() ⇒ <code>object</code>
Get the validation state of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the validation state of the flow  
<a name="module_axway-flow-graph..FlowGraph+registerValidator"></a>

#### 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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| validator | <code>FlowValidator</code> | A class which is a FlowValidator |

<a name="module_axway-flow-graph..FlowGraph+validate"></a>

#### flowGraph.validate() ⇒ <code>object</code>
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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the validation state  
<a name="module_axway-flow-graph..FlowGraph"></a>

### axway-flow-graph~FlowGraph
**Kind**: inner class of [<code>axway-flow-graph</code>](#module_axway-flow-graph)  

* [~FlowGraph](#module_axway-flow-graph..FlowGraph)
    * [new FlowGraph()](#new_module_axway-flow-graph..FlowGraph_new)
    * [new FlowGraph(flowId, flowdef)](#new_module_axway-flow-graph..FlowGraph_new)
    * [._ensureVertex(vertexId, info)](#module_axway-flow-graph..FlowGraph+_ensureVertex) ⇒ <code>object</code>
    * [._deleteVertex(vertexId)](#module_axway-flow-graph..FlowGraph+_deleteVertex)
    * [._getVertexChildren(vertexId, output, [idsOnly])](#module_axway-flow-graph..FlowGraph+_getVertexChildren) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [._getVertexParents(vertexId, [idsOnly])](#module_axway-flow-graph..FlowGraph+_getVertexParents) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [._ensureEdge(output, fromId, toId)](#module_axway-flow-graph..FlowGraph+_ensureEdge) ⇒ <code>object</code>
    * [._deleteEdge(fromId, output, toId)](#module_axway-flow-graph..FlowGraph+_deleteEdge)
    * [._deleteEdges(fromId, toId)](#module_axway-flow-graph..FlowGraph+_deleteEdges)
    * [._setValidation(validation)](#module_axway-flow-graph..FlowGraph+_setValidation)
    * [._getOutputRoutes(nodeId)](#module_axway-flow-graph..FlowGraph+_getOutputRoutes) ⇒ <code>object</code>
    * [._onChange()](#module_axway-flow-graph..FlowGraph+_onChange)
    * [._buildGraph()](#module_axway-flow-graph..FlowGraph+_buildGraph)
    * [._buildVertex(nodeId)](#module_axway-flow-graph..FlowGraph+_buildVertex)
    * [.changeNodeName(nodeId, name)](#module_axway-flow-graph..FlowGraph+changeNodeName)
    * [.changeMethod(nodeId, method, nodehandler)](#module_axway-flow-graph..FlowGraph+changeMethod)
    * [.insertNode(node, nodeId)](#module_axway-flow-graph..FlowGraph+insertNode) ⇒ <code>string</code>
    * [.deleteNode(nodeId)](#module_axway-flow-graph..FlowGraph+deleteNode)
    * [.deleteRoute(output, fromId, toId)](#module_axway-flow-graph..FlowGraph+deleteRoute)
    * [.deleteRoutes(fromId, toId)](#module_axway-flow-graph..FlowGraph+deleteRoutes)
    * [.setStart(nodeId)](#module_axway-flow-graph..FlowGraph+setStart)
    * [.unsetStart()](#module_axway-flow-graph..FlowGraph+unsetStart)
    * [.addParameter(nodeId, name, value, [type])](#module_axway-flow-graph..FlowGraph+addParameter)
    * [.updateParameter(nodeId, name, prop, newValue)](#module_axway-flow-graph..FlowGraph+updateParameter)
    * [.removeParameter(nodeId, name)](#module_axway-flow-graph..FlowGraph+removeParameter) ⇒ <code>object</code>
    * [.addAuthorization(nodeId, name, value, [type])](#module_axway-flow-graph..FlowGraph+addAuthorization)
    * [.updateAuthorization(nodeId, name, prop, newValue)](#module_axway-flow-graph..FlowGraph+updateAuthorization)
    * [.removeAuthorization(nodeId, name)](#module_axway-flow-graph..FlowGraph+removeAuthorization) ⇒ <code>object</code>
    * [._addParameter(location, nodeId, name, value, [type])](#module_axway-flow-graph..FlowGraph+_addParameter)
    * [._getParameter(location, nodeId, name)](#module_axway-flow-graph..FlowGraph+_getParameter) ⇒ <code>object</code>
    * [._getParameterIndex(location, nodeId, name)](#module_axway-flow-graph..FlowGraph+_getParameterIndex) ⇒ <code>number</code>
    * [._updateParameter(location, nodeId, name, prop, newValue)](#module_axway-flow-graph..FlowGraph+_updateParameter)
    * [._removeParameterByName(location, nodeId, name)](#module_axway-flow-graph..FlowGraph+_removeParameterByName) ⇒ <code>object</code>
    * [._removeParameter(location, nodeId, index)](#module_axway-flow-graph..FlowGraph+_removeParameter) ⇒ <code>object</code>
    * [.updateOutputContext(nodeId, name, value)](#module_axway-flow-graph..FlowGraph+updateOutputContext)
    * [.connectNode(sourceId, sourceOutput, targetId)](#module_axway-flow-graph..FlowGraph+connectNode)
    * [.disconnectNode(sourceId, sourceOutput, targetId)](#module_axway-flow-graph..FlowGraph+disconnectNode)
    * [.isEmpty()](#module_axway-flow-graph..FlowGraph+isEmpty) ⇒ <code>boolean</code>
    * [.getName()](#module_axway-flow-graph..FlowGraph+getName) ⇒ <code>string</code>
    * [.setName(name)](#module_axway-flow-graph..FlowGraph+setName)
    * [.getDescription()](#module_axway-flow-graph..FlowGraph+getDescription) ⇒ <code>string</code>
    * [.setDescription(description)](#module_axway-flow-graph..FlowGraph+setDescription)
    * [.getSymbol()](#module_axway-flow-graph..FlowGraph+getSymbol) ⇒ <code>symbol</code>
    * [.getDefinition()](#module_axway-flow-graph..FlowGraph+getDefinition) ⇒ <code>object</code>
    * [.getGraph()](#module_axway-flow-graph..FlowGraph+getGraph) ⇒ <code>object</code>
    * [.getId()](#module_axway-flow-graph..FlowGraph+getId) ⇒ <code>string</code>
    * [.getEdges()](#module_axway-flow-graph..FlowGraph+getEdges) ⇒ <code>Array.&lt;object&gt;</code>
    * [.getEdge(output, fromId, toId)](#module_axway-flow-graph..FlowGraph+getEdge) ⇒ <code>object</code> \| <code>null</code>
    * [.getVertices([idsOnly])](#module_axway-flow-graph..FlowGraph+getVertices) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getNodes([idsOnly])](#module_axway-flow-graph..FlowGraph+getNodes) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getChildren(nodeId, output, [idsOnly])](#module_axway-flow-graph..FlowGraph+getChildren) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getParents(nodeId, [idsOnly])](#module_axway-flow-graph..FlowGraph+getParents) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getTerminalNodes([idsOnly])](#module_axway-flow-graph..FlowGraph+getTerminalNodes) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
    * [.getVertex(vertexId)](#module_axway-flow-graph..FlowGraph+getVertex) ⇒ <code>object</code>
    * [.getNode(nodeId)](#module_axway-flow-graph..FlowGraph+getNode) ⇒ <code>object</code> \| <code>null</code>
    * [.getNodeUnsafe(nodeId)](#module_axway-flow-graph..FlowGraph+getNodeUnsafe) ⇒ <code>object</code>
    * [.getValidation()](#module_axway-flow-graph..FlowGraph+getValidation) ⇒ <code>object</code>
    * [.registerValidator(validator)](#module_axway-flow-graph..FlowGraph+registerValidator)
    * [.validate()](#module_axway-flow-graph..FlowGraph+validate) ⇒ <code>object</code>

<a name="new_module_axway-flow-graph..FlowGraph_new"></a>

#### new FlowGraph()
FlowGraph object

<a name="new_module_axway-flow-graph..FlowGraph_new"></a>

#### new FlowGraph(flowId, flowdef)
Creates an instance of FlowGraph.


| Param | Type | Description |
| --- | --- | --- |
| flowId | <code>string</code> | The id of this flow. |
| flowdef | <code>object</code> | The flow definition. |

<a name="module_axway-flow-graph..FlowGraph+_ensureVertex"></a>

#### flowGraph.\_ensureVertex(vertexId, info) ⇒ <code>object</code>
Ensures that a vertex will exist

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the vertex which matched or was created.  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the ID of the vertex |
| info | <code>object</code> | info to be set on the vertex. If vertex already exists, the info will                      be merged with the existing info. |

<a name="module_axway-flow-graph..FlowGraph+_deleteVertex"></a>

#### flowGraph.\_deleteVertex(vertexId)
Deletes a vertex from the graph

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the id of the vertex to delete |

<a name="module_axway-flow-graph..FlowGraph+_getVertexChildren"></a>

#### flowGraph.\_getVertexChildren(vertexId, output, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the children of a vertex in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the child vertices of a vertex in the flow  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the Id of the vertex to get children for. |
| output | <code>string</code> | the vetex output to get the children for. |
| [idsOnly] | <code>bool</code> | if the vertex idsOnly should be returned rather than the vertices |

<a name="module_axway-flow-graph..FlowGraph+_getVertexParents"></a>

#### flowGraph.\_getVertexParents(vertexId, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the parents of a vertex in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the parent nodes of a vertex in the flow  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the Id of the vertex to get parents for. |
| [idsOnly] | <code>bool</code> | if the vertex ids should be returned rather than the vertices |

<a name="module_axway-flow-graph..FlowGraph+_ensureEdge"></a>

#### flowGraph.\_ensureEdge(output, fromId, toId) ⇒ <code>object</code>
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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the edge which matched or was created.  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| output | <code>string</code> | the vertex output group the edge belongs to. |
| fromId | <code>string</code> | the ID of the vertex where the edge starts |
| toId | <code>string</code> | this ID of the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+_deleteEdge"></a>

#### 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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| fromId | <code>string</code> | the vertex where the edge starts |
| output | <code>string</code> | the vertex output group the edge belongs to. |
| toId | <code>string</code> | the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+_deleteEdges"></a>

#### 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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| fromId | <code>string</code> | the vertex where the edge starts |
| toId | <code>string</code> | the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+_setValidation"></a>

#### flowGraph.\_setValidation(validation)
Sets the validation state on the flow definition

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| validation | <code>object</code> | the validation state |

<a name="module_axway-flow-graph..FlowGraph+_getOutputRoutes"></a>

#### flowGraph.\_getOutputRoutes(nodeId) ⇒ <code>object</code>
Gets a list of all nodes which a node may route to grouped by output.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - A map of IDs for routes from the node specified grouped by output.  
**Access**: protected  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the ID of a node to get routes for |

<a name="module_axway-flow-graph..FlowGraph+_onChange"></a>

#### flowGraph.\_onChange()
Generates a unique symbol of the flow. Should be called whenever the flow changes.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
<a name="module_axway-flow-graph..FlowGraph+_buildGraph"></a>

#### flowGraph.\_buildGraph()
Build a graph from the flow definition.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Access**: protected  
<a name="module_axway-flow-graph..FlowGraph+_buildVertex"></a>

#### flowGraph.\_buildVertex(nodeId)
Builds a vertex for a nodeId

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | The nodeId from which to build a vertex. |

<a name="module_axway-flow-graph..FlowGraph+changeNodeName"></a>

#### flowGraph.changeNodeName(nodeId, name)
Sets the name of a node

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | Node ID |
| name | <code>string</code> | New node name |

<a name="module_axway-flow-graph..FlowGraph+changeMethod"></a>

#### flowGraph.changeMethod(nodeId, method, nodehandler)
Modifies the method of a node to match a new spec

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | The id of the node to update. |
| method | <code>string</code> | the method to use |
| nodehandler | <code>object</code> | the node handler in use |

<a name="module_axway-flow-graph..FlowGraph+insertNode"></a>

#### flowGraph.insertNode(node, nodeId) ⇒ <code>string</code>
Inserts a node into the flow graph.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - - the inserted nodeId  

| Param | Type | Description |
| --- | --- | --- |
| node | <code>object</code> | The node to insert. |
| nodeId | <code>string</code> | The id of the node to insert.  If supplied, it must be unique.  If not supplied, the node id will be generated. |

<a name="module_axway-flow-graph..FlowGraph+deleteNode"></a>

#### flowGraph.deleteNode(nodeId)
Delete a specific node from the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the id of the node to delete |

<a name="module_axway-flow-graph..FlowGraph+deleteRoute"></a>

#### flowGraph.deleteRoute(output, fromId, toId)
Delete the output route from one node to another.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| output | <code>string</code> | the output to delete the route for. |
| fromId | <code>string</code> | the node id the routes are being deleted from. |
| toId | <code>string</code> | the node id being removed from the routes. |

<a name="module_axway-flow-graph..FlowGraph+deleteRoutes"></a>

#### flowGraph.deleteRoutes(fromId, toId)
Delete all the output routes from one node to another.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| fromId | <code>string</code> | the node id the routes are being deleted from. |
| toId | <code>string</code> | the node id being removed from the routes. |

<a name="module_axway-flow-graph..FlowGraph+setStart"></a>

#### flowGraph.setStart(nodeId)
Sets a node as the start node for the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | The start node for the flow. |

<a name="module_axway-flow-graph..FlowGraph+unsetStart"></a>

#### flowGraph.unsetStart()
Clears the start node for the flow.  This action will make the flow invalid.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
<a name="module_axway-flow-graph..FlowGraph+addParameter"></a>

#### flowGraph.addParameter(nodeId, name, value, [type])
Adds a parameter to a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| nodeId | <code>string</code> |  | the node id |
| name | <code>string</code> |  | the name of the parameter |
| value | <code>string</code> |  | the value of the parameter |
| [type] | <code>string</code> | <code>&quot;jsonpath&quot;</code> | the type of the parameter. |

<a name="module_axway-flow-graph..FlowGraph+updateParameter"></a>

#### flowGraph.updateParameter(nodeId, name, prop, newValue)
Updates a parameter from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the current name of the parameter |
| prop | <code>string</code> \| <code>object</code> | the field to update (name|type|value) if string,                               or the new value of the parameter |
| newValue | <code>string</code> | the new value of the prop specified if it is a string |

<a name="module_axway-flow-graph..FlowGraph+removeParameter"></a>

#### flowGraph.removeParameter(nodeId, name) ⇒ <code>object</code>
Removes a parameter by name from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+addAuthorization"></a>

#### flowGraph.addAuthorization(nodeId, name, value, [type])
Adds a authorization parameter to a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| nodeId | <code>string</code> |  | the node id |
| name | <code>string</code> |  | the name of the parameter |
| value | <code>string</code> |  | the value of the parameter |
| [type] | <code>string</code> | <code>&quot;jsonpath&quot;</code> | the type of the parameter. |

<a name="module_axway-flow-graph..FlowGraph+updateAuthorization"></a>

#### flowGraph.updateAuthorization(nodeId, name, prop, newValue)
Updates a authorization parameter from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the current name of the parameter |
| prop | <code>string</code> \| <code>object</code> | the field to update (name|type|value) if string,                               or the new value of the parameter |
| newValue | <code>string</code> | the new value of the prop specified if it is a string |

<a name="module_axway-flow-graph..FlowGraph+removeAuthorization"></a>

#### flowGraph.removeAuthorization(nodeId, name) ⇒ <code>object</code>
Removes a authorization parameter by name from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_addParameter"></a>

#### flowGraph.\_addParameter(location, nodeId, name, value, [type])
Adds a parameter to a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| location | <code>string</code> |  | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> |  | the node id |
| name | <code>string</code> |  | the name of the parameter |
| value | <code>string</code> |  | the value of the parameter |
| [type] | <code>string</code> | <code>&quot;jsonpath&quot;</code> | the type of the parameter. |

<a name="module_axway-flow-graph..FlowGraph+_getParameter"></a>

#### flowGraph.\_getParameter(location, nodeId, name) ⇒ <code>object</code>
Gets a parameter from the node by name

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_getParameterIndex"></a>

#### flowGraph.\_getParameterIndex(location, nodeId, name) ⇒ <code>number</code>
Gets a parameter index from the node by name

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>number</code> - the parameter index  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_updateParameter"></a>

#### flowGraph.\_updateParameter(location, nodeId, name, prop, newValue)
Updates a parameter from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the current name of the parameter |
| prop | <code>string</code> \| <code>object</code> | the field to update (name|type|value) if string,                               or the new value of the parameter |
| newValue | <code>string</code> | the new value of the prop specified if it is a string |

<a name="module_axway-flow-graph..FlowGraph+_removeParameterByName"></a>

#### flowGraph.\_removeParameterByName(location, nodeId, name) ⇒ <code>object</code>
Removes a parameter by name from a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| name | <code>number</code> | the name of the parameter |

<a name="module_axway-flow-graph..FlowGraph+_removeParameter"></a>

#### flowGraph.\_removeParameter(location, nodeId, index) ⇒ <code>object</code>
Removes a parameter by index from a node in the flow.  Does not trigger change.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the parameter that was removed  

| Param | Type | Description |
| --- | --- | --- |
| location | <code>string</code> | the parameter location, one of: parameters|authorizations |
| nodeId | <code>string</code> | the node id |
| index | <code>number</code> | the index of the parameter |

<a name="module_axway-flow-graph..FlowGraph+updateOutputContext"></a>

#### flowGraph.updateOutputContext(nodeId, name, value)
Modifies the JSONPath context of an output

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the node id |
| name | <code>string</code> | the name of the output |
| value | <code>string</code> | the new JSONPath context |

<a name="module_axway-flow-graph..FlowGraph+connectNode"></a>

#### flowGraph.connectNode(sourceId, sourceOutput, targetId)
Connects a node output to the specified target.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| sourceId | <code>string</code> | The source node for the connection. |
| sourceOutput | <code>string</code> | The output in the source node for the connection. |
| targetId | <code>string</code> | The id of the target node to connect to. |

<a name="module_axway-flow-graph..FlowGraph+disconnectNode"></a>

#### flowGraph.disconnectNode(sourceId, sourceOutput, targetId)
Disconnects a target node from a parent node's source and output.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| sourceId | <code>string</code> | The source node for the connection. |
| sourceOutput | <code>string</code> | The output in the source node for the connection. |
| targetId | <code>string</code> | The id of the target node to connect to. |

<a name="module_axway-flow-graph..FlowGraph+isEmpty"></a>

#### flowGraph.isEmpty() ⇒ <code>boolean</code>
Indicates if the flow is empty, with no nodes.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>boolean</code> - `true` if the flow is empty.  
<a name="module_axway-flow-graph..FlowGraph+getName"></a>

#### flowGraph.getName() ⇒ <code>string</code>
Gets the name of the flow from flow info meta-data.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - The flow name.  
<a name="module_axway-flow-graph..FlowGraph+setName"></a>

#### flowGraph.setName(name)
Sets the name of the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| name | <code>string</code> | The flow name. |

<a name="module_axway-flow-graph..FlowGraph+getDescription"></a>

#### flowGraph.getDescription() ⇒ <code>string</code>
Gets the description of the flow from flow info meta-data.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - The flow description.  
<a name="module_axway-flow-graph..FlowGraph+setDescription"></a>

#### flowGraph.setDescription(description)
Sets the description of the flow.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| description | <code>string</code> | The flow description. |

<a name="module_axway-flow-graph..FlowGraph+getSymbol"></a>

#### flowGraph.getSymbol() ⇒ <code>symbol</code>
Get the unique symbol of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>symbol</code> - the flow symbol  
<a name="module_axway-flow-graph..FlowGraph+getDefinition"></a>

#### flowGraph.getDefinition() ⇒ <code>object</code>
Gets the definition of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the flow definition  
<a name="module_axway-flow-graph..FlowGraph+getGraph"></a>

#### flowGraph.getGraph() ⇒ <code>object</code>
Gets the graph representation of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the flow graph representation  
<a name="module_axway-flow-graph..FlowGraph+getId"></a>

#### flowGraph.getId() ⇒ <code>string</code>
Gets the Id of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>string</code> - the flow id  
<a name="module_axway-flow-graph..FlowGraph+getEdges"></a>

#### flowGraph.getEdges() ⇒ <code>Array.&lt;object&gt;</code>
Gets the edges of the flow graph

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;object&gt;</code> - the edges of the graph  
<a name="module_axway-flow-graph..FlowGraph+getEdge"></a>

#### flowGraph.getEdge(output, fromId, toId) ⇒ <code>object</code> \| <code>null</code>
Get the edge between two nodes.

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> \| <code>null</code> - the edge between two nodes. Null if no edge exists.  

| Param | Type | Description |
| --- | --- | --- |
| output | <code>string</code> | the node output the edges belong to. |
| fromId | <code>string</code> | the ID of the vertex where the edge starts |
| toId | <code>string</code> | this ID of the vertex where the edge ends |

<a name="module_axway-flow-graph..FlowGraph+getVertices"></a>

#### flowGraph.getVertices([idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the vertices of the graph

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the vertices of the graph  

| Param | Type | Description |
| --- | --- | --- |
| [idsOnly] | <code>bool</code> | if the vertex ids should be returned rather than the vertices |

<a name="module_axway-flow-graph..FlowGraph+getNodes"></a>

#### flowGraph.getNodes([idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the nodes of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the nodes of the flow  

| Param | Type | Description |
| --- | --- | --- |
| [idsOnly] | <code>bool</code> | if the node ids should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getChildren"></a>

#### flowGraph.getChildren(nodeId, output, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the children of a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the child nodes of a node in the flow  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the Id of the node to get children for. |
| output | <code>string</code> | the node output to get the children for.                          If omitted then all children are returned. |
| [idsOnly] | <code>bool</code> | if the node idsOnly should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getParents"></a>

#### flowGraph.getParents(nodeId, [idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the parents of a node in the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the parent nodes of a node in the flow  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the Id of the node to get parents for. |
| [idsOnly] | <code>bool</code> | if the node ids should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getTerminalNodes"></a>

#### flowGraph.getTerminalNodes([idsOnly]) ⇒ <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code>
Gets the terminal nodes of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>Array.&lt;object&gt;</code> - the terminal nodes of the flow  

| Param | Type | Description |
| --- | --- | --- |
| [idsOnly] | <code>bool</code> | if the node ids should be returned rather than the nodes |

<a name="module_axway-flow-graph..FlowGraph+getVertex"></a>

#### flowGraph.getVertex(vertexId) ⇒ <code>object</code>
Get the vertex which matches the ID specified

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - a vertex in the graph  

| Param | Type | Description |
| --- | --- | --- |
| vertexId | <code>string</code> | the ID of the vertex to return |

<a name="module_axway-flow-graph..FlowGraph+getNode"></a>

#### flowGraph.getNode(nodeId) ⇒ <code>object</code> \| <code>null</code>
Get the node which matches the ID specified

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> \| <code>null</code> - a node in the flow, or null  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the ID of the node to return |

<a name="module_axway-flow-graph..FlowGraph+getNodeUnsafe"></a>

#### flowGraph.getNodeUnsafe(nodeId) ⇒ <code>object</code>
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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - a node in the flow  

| Param | Type | Description |
| --- | --- | --- |
| nodeId | <code>string</code> | the ID of the node to return |

<a name="module_axway-flow-graph..FlowGraph+getValidation"></a>

#### flowGraph.getValidation() ⇒ <code>object</code>
Get the validation state of the flow

**Kind**: instance method of [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the validation state of the flow  
<a name="module_axway-flow-graph..FlowGraph+registerValidator"></a>

#### 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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  

| Param | Type | Description |
| --- | --- | --- |
| validator | <code>FlowValidator</code> | A class which is a FlowValidator |

<a name="module_axway-flow-graph..FlowGraph+validate"></a>

#### flowGraph.validate() ⇒ <code>object</code>
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 [<code>FlowGraph</code>](#module_axway-flow-graph..FlowGraph)  
**Returns**: <code>object</code> - the validation state  
<a name="module_axway-flow-graph..objectToArray"></a>

### axway-flow-graph~objectToArray(object, map) ⇒ <code>Array.&lt;string&gt;</code> \| <code>array</code>
Converts an object into an array of keys or values

**Kind**: inner method of [<code>axway-flow-graph</code>](#module_axway-flow-graph)  
**Returns**: <code>Array.&lt;string&gt;</code> \| <code>array</code> - an array of values based on the map.  

| Param | Type | Description |
| --- | --- | --- |
| object | <code>object</code> | the object to convert into an array |
| map | <code>function</code> \| <code>bool</code> | if 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. |

<a name="module_axway-flow-graph..validateJsonPathSelector"></a>

### axway-flow-graph~validateJsonPathSelector(path) ⇒ <code>object</code>
Validates a JSONPath selector

**Kind**: inner method of [<code>axway-flow-graph</code>](#module_axway-flow-graph)  
**Returns**: <code>object</code> - - Validation error only if the selector is not valid  

| Param | Type | Description |
| --- | --- | --- |
| path | <code>string</code> | JSONPath selector to validate |


## Building

```bash
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](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.
