Detailed Description
FlowData is created by a specific pipeline It collects evidence set by the user It passes evidence to flowElements in the pipeline These elements can return ElementData or populate an errors object.
Public Member Functions | |
| constructor (pipeline) | |
| constructor for flowData created by a pipeline. | |
| getEvidenceDataKey () | |
| Get back an object that lists all evidence that will be used by any flowElements in the flowData's parent pipeline. | |
| stop () | |
| Stop a flowData from processing any further flowElements. | |
| setError (error, flowElement) | |
| Set an error on the flowData (usually triggered by something going wrong in a flowElement's process function). | |
| process () | |
| Processes the flowData (running the process methods on all connected). | |
| setElementData (data) | |
| Add to the flowData object with a class derived from ElementData. | |
| get (flowElementDataKey) | |
| Get ElementData by a flowElement's data key. | |
| getFromElement (flowElement) | |
| get ElementData by a FlowElement object | |
| getWhere (metaKey, metaValueorFuncton) | |
| get an object ({key:value} store) of elementData based on a metadata key and value, alternatively pass in a filtering function to manually filter available propeties | |
Member Function Documentation
◆ constructor()
|
inline |
constructor for flowData created by a pipeline.
Called by a pipeline's createFlowData() method
- Parameters
-
{Pipeline} pipeline the pipeline to add the FlowData to
◆ get()
|
inline |
Get ElementData by a flowElement's data key.
- Parameters
-
{string} flowElementDataKey the datakey of a FlowElement
- Returns
- {ElementData} data from the FlowElement
◆ getEvidenceDataKey()
|
inline |
Get back an object that lists all evidence that will be used by any flowElements in the flowData's parent pipeline.
- Returns
- {object} Evidence that is requested by flowElements
◆ getFromElement()
|
inline |
get ElementData by a FlowElement object
- Parameters
-
{FlowElement} flowElement The FlowElement to fetch data for
- Returns
- {ElementData} data from the FlowElement
◆ getWhere()
|
inline |
get an object ({key:value} store) of elementData based on a metadata key and value, alternatively pass in a filtering function to manually filter available propeties
- Parameters
-
{string} metaKey a metakey such as "category" {string|Function} metaValueorFuncton value or a filter function which receives the value of the metaKey and returns a boolean
- Returns
- {object} key value pair of matching properties and values
◆ process()
|
inline |
Processes the flowData (running the process methods on all connected).
- Returns
- {Promise} result of processing
◆ setElementData()
|
inline |
Add to the flowData object with a class derived from ElementData.
- Parameters
-
{ElementData} data instance of ElementData to set for the FlowElement's datakey
◆ setError()
|
inline |
Set an error on the flowData (usually triggered by something going wrong in a flowElement's process function).
- Parameters
-
{*} error the error to throw {FlowElement} flowElement the FlowElement the error is thrown on
