noflo | Flow-based programming for JavaScript | BPM library
kandi X-RAY | noflo Summary
kandi X-RAY | noflo Summary
NoFlo is an implementation of [flow-based programming] for JavaScript running on both Node.js and the browser. From WikiPedia:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the source loader for a loader .
- Run a network
- Computes a function from the arguments
- Send output to a sequence of outputs
- Register a component loader
- Debounce a function .
- Compile a source
- Create a new Network
- connect to a ports socket
- Handle the default options
noflo Key Features
noflo Examples and Code Snippets
Community Discussions
Trending Discussions on noflo
QUESTION
I have a noflo graph.json.
My basic use case is
- Generate graph.json using noflo-ui
- Convert graph.json into a javascript(or node module) file using any means possible.
- run the file in my own node express application.
I want to see the final compiled code in javascript. I have been searching the documentation and source code. I just couldn't locate it.
...ANSWER
Answered 2018-Jul-19 at 20:14NoFlo doesn't compile graphs to JavaScript, but instead has a runtime that wires the graph's components up on demand.
If you want to expose the graph as a JavaScript function, you can use noflo.asCallback.
QUESTION
I want to dynamically use some master data in noflo components. For example In my graph I will use same component in different ids. based on that I will also change the data. How to access the metada in graph into my component?
...ANSWER
Answered 2019-Jul-11 at 12:17You cannot access the graph, or the metadata from a component. Input data must be passed in via the inports.
If the data of interest is configuration and is normally set once, you can use a non-triggering port.
QUESTION
I'm pretty new to noflo, so this is probably due to me doing something dumb.
I'm getting an issue when trying to start a noflo graph from the noflo-ui. Basically I get a EADDRINUSE error (the port is in use) from the first xpress/Server node in my graph, I believe. I'm running the ui locally if that matters (I don't think it should).
Usually, if I was running a normal Express service, I would just kill the 'runaway' process which is hogging the port, but I'm having problems finding it. I've tried things like "netstat -p tcp | grep " and "ps -ef | grep " to no avail.
I've also tried a couple of 'noflo' things, which may or may not be a good idea. 1) First I tried deleting the browser database completely (I'm still not 100% sure how this relates to the runtime environment and have tried variations of passing parameters to the noflo-nodejs command and using the json config created using the noflo-nodejs-init). 2) Second, I created a new graph which uses a different port. By stopping/restarting the new graph in the ui and testing the expected endpoints through postman, I have realised that actually the process of starting seems to start an xpressServer for both the new and the old port, so I can do a GET on both http://localhost:8000/hello and http://localhost:8001/hello and get 'hello' back.
Could anyone tell me what I've done wrong and the best approach for resolving it if possible.
NOTE: I did try restarting my Mac which did not seem to help initially either, so I can only assume chrome is caching something I have missed perhaps ... (a guess). Having done a hard reboot this morning and making sure all my apps are closed, this does seem to have resolved itself but I would still like to understand what is going on, so I don't end up in this situation again.
Thanks
...ANSWER
Answered 2018-Jan-18 at 11:45The noflo-xpress Server component frees up its port(s) at the component teardown stage.
This means that to free up the port you have to either:
- Stop the network execution (causing teardowns to be called) using
network.stop()
(or via the "pause button" in Flowhub) - Stop the NoFlo runtime process where you run noflo-xpress
QUESTION
I am trying to integrate noflo in my browser application. To understand the send and receive of the IIP, I have created a 'forwarder component' which will just output whatever is input to it. I am creating a graph with just one component and trying to send IIP to it to extract a response.
My fbp code for testGraph is following:
...ANSWER
Answered 2017-Nov-14 at 12:44The graph has to be as below:
QUESTION
I am trying to run noflo in browser, with a twist that it will be an Angular App. Noflo documentation mentions following:
NoFlo projects can also run in web browsers. You can use the webpack tool create a browser-runnable build of a NoFlo project.
In nutshell, making a browser build of a NoFlo project involves the following steps:
Find all installed browser-compatible components using the fbp-manifest tool
Generate a custom NoFlo component loader that requires all the component files and registers them for NoFlo to load
Configure and run webpack with the application entry point, replacing NoFlo’s standard component loader with the generated custom one
To automate these steps we have grunt-noflo-browser, a plugin for the Grunt task runner that we use for build automation.
I have doubts regarding shortest and least painful path to take for this task:
Option 1:
I am using Angular CLI. Webpack comes integrated with angular cli which can be moved to webpack based configuration by using "ng eject" command, and then I can use Grunt task runner to set it up. I have never before used Grunt. I have no idea how will it work out. Another headache that thereafter I will have to manage webpack configurations going further into development.
Option 2:
Same as above but do everything manually. Removes the headache of going Grunt path. Creates new questions and complexities about how to use fbp-manifest tool and how to generate custom NoFlo Component loader. Also maintaining webpack configurations is an added task going further into development.
Option 3:
If any other path exists specific to Angular CLI
I will be integrating Noflo and customizing it heavily for my application. My nodes will be new as well as there will be no server running and I will have my own system of pushing IP. The idea is to integrate Noflo and Noflo UI, reuse as much as possible and develop the rest.
I will appreciate any advice regarding this.
Thanks
...ANSWER
Answered 2017-Oct-27 at 17:30The issue is primarily that we need to generate a statically configured NoFlo component loader for browsers, since they can't discover available components from the file system.
This functionality used to be strongly coupled with the grunt-noflo-browser module.
However, as of today, it should be possible to build NoFlo as part of any existing WebPack setup using the noflo-component-loader WebPack plugin. Add something like the following to your WebPack module.rules
:
QUESTION
I am trying to integrate noflo ui 'the-graph' with a React based front end. I am trying to wrap demo-simple.html example into a react component as simple-demo.js and thereafter build on top of it.
On building and running I get the following errors:
Uncaught ReferenceError: React is not defined at Object.module.exports.register (bundle.js:42029).......
On looking into bundle.js, I find that the cause is:
TheGraph.SVGImage = React.createFactory( React.createClass({......
my simple-demo.js has just the following code and basic boiler-plate:
...ANSWER
Answered 2017-Oct-20 at 10:51flowhub/the-graph expects a global React variable and It worked out by adding react and hammer in the index.html in the following manner:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install noflo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page