0.4.5 • Published 5 years ago

flow-start-component v0.4.5

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

Flow Start component

The component is designed to work with the Flow SDK and runs at the start of each graph.

To use the component, install the package in your NodeJS project

npm i flow-start-component --save

Use the component as below

// require the component
const Component = require('flow-start-component');

// create instance of the component
const component = new Component();

Listen in for the Start port emit event

component.getPort('Start').onEmit(function(){
  // component ran successfully
});

Execute the component

// add the component to a graph before executing it
const Graph = require('flow-platform-sdk').Graph;
new Graph("graph-1").addComponent(component);

component.execute();

Conclusion

That's the Flow Start component.