◆ constructor()
FlowElement::constructor | ( | { processInternal, dataKey, properties={}, evidenceKeyFilter } = {}
| ) |
Constructor for flowElement class.
- Parameters
-
- {object} - options options for the FlowElement
- {string} - options.dataKey the dataKey the flowElement's elementData will be stored under
- {Function} - options.processInternal callback to act on flowData
- {object} - options.properties list of properties including metadata
- {EvidenceKeyFilter} - options.evidenceKeyFilter an instance of an EvidenceKeyFilter to filter evidence added to the Pipeline
◆ getProperties()
FlowElement::getProperties ( ) inlineGet a flowElement's properties.
By default returns a promise wrapped version of the object's properties list Can return standard value or promise
- Returns
- {object} dictionary of properties
◆ onRegistration()
FlowElement::onRegistration ( pipeline, flowElement ) inlineInternal function to be called when a FlowElement is added to pipeline, runs through any registrationCallbacks on the FlowElement.
- Parameters
-
- {Pipeline} - pipeline the Pipeline the FlowElement is registered with
- {FlowElement} - flowElement The FlowElement the registration callback is called on
◆ process()
FlowElement::process ( flowData ) inlineTo allow actions to take place before and after a FlowElement's processInternal function runs, a process wrapper is run first.
- Parameters
-
- {FlowData} - flowData FlowData being processed
- Returns
- {Promise} FlowData after processing
◆ processInternal()
FlowElement::processInternal ( flowData ) inlineInternal process function for a particular flowElement called (via the flowElement.process() method) when flowData generated by a pipleline is processsed.
Overriden by instances of this base class
- Parameters
-
- {FlowData} - flowData FlowData being processed
- Returns
- {Mixed} result of processing
◆ ready()
FlowElement::ready ( ) inlineFunction called to check if a FlowElement is ready Used when there are asynchronous initialisation steps.
- Returns
- {Promise}
◆ updateProperties()
FlowElement::updateProperties ( ) inlineCall this function to update the properties meta database in all the pipelines this flowElement has been added to.
- Returns
- {Promise} notification of complete updates