Reputation: 11163
Short Question
Can flow based programming replace what BPMNs do? Or are they different tools for different circumstances. If so examples would be great. thanks.
Longer Story
Lately I've been trying to create a BPMN implementation in Javascript. In the old days, I would use Camunda on Java, now I wanted to experiment with something new. The reason I'm turning to BPMN is because the logic of the code would be so complicated, it'll be easier maintained and edited with a visual representation.
BPMN on javascript: I came across https://www.npmjs.com/package/bpmn which does that I wanted, but upon testing seems to be not asynchronous when running a parallel gate. Also the weekly download count was 26 (very low).
Flow: Further research revealed Flow Based Programming which allows me to draw flow diagrams to build a working application. Such as Node-Red, Slang, NoFlow. And also seems to be asynchronous.
Questions around Flow Based Programming: With FBP it seems to be asynchronous, and has a nice diagram representation of the logic and can be maintained. I looked into it, getting more and more confused as I go since there's so much implementations of FBP and some are provided and tied to 3rd party vendors (ie: https://developer.getflow.com/). And a lot of them are being advertised for use with IoT. Would I be able to use it integrated as part of a larger application with out any runtime 3rd party dependencies? Can I use it the same way I use Camunda BPMN in java?
References: Flow Based Programming https://www.quora.com/Will-visual-flowchart-programming-be-better-than-coding https://en.wikipedia.org/wiki/Flow-based_programming
Upvotes: 8
Views: 3682
Reputation: 89
I did few integrations with Node-RED and before I knew about Camunda and Zeebe I had a problem with complicated flows. They were hard to read and manage because wires goes back and forth - imagine orders import from ecommerce and export it to ERP via REST API: check if order exists, check if it's invoice or receipt, check if customer exists, check if customer address is the same, check if delivery address is the same, check if phone number matches, check if... and then handle every if), even I tried to describe every node as simple as I could.
There are cases where you can use NR alone and there are cases where it will work great with Camunda/Zeebe (both has NR clients).
What is important to underline - when using both you will keep your code clean, readable and easy to debug and understand.
As you said, every works in different abstract level, both complement each other.
Upvotes: 1
Reputation: 11163
After going through NoFlo (https://noflojs.org/) with it's IDE (FlowHub/NoFlo-UI), and also NodeRed (https://nodered.org/). I'm starting to get the sense that Flow Based Programming (FBP) is more like an alternative to programming and is more granular compared to BPMN.
An example of this is say this tutorial of NodeRed (https://www.youtube.com/watch?v=f5o4tIz2Zzc) where the host takes us through how to build an App that reads from Twitter and saves it to the database. With the NodeRed server running at the back all the programming is is just the graph you see and all the configurations embedded, and the nodes of the graph are things like reading from twitter, formats input, print output, save to database etc.
Where as I find BPMN is more high level and abstract, it may combine say 'read, format and print twitter articles' into one activity, and the details to be implemented by the underlying class the activity calls.
Having said that, I find there's still a level of blur, since it's also possible to add function nodes in nodeRed or customise own node in noflo where it can do a bunch of things through programming language.
More feedback appreciated.
Upvotes: 0