Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BPMN vs Flow Based Programming

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

like image 836
JackDev Avatar asked Dec 27 '18 02:12

JackDev


1 Answers

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.

like image 122
tmdoit Avatar answered Sep 30 '22 00:09

tmdoit