bppf
v1.0.2
Published
Business Process Programming Framework
Downloads
7
Maintainers
Readme
Why develop one more business process engine?
BPMN was made for management to understand how company processes work. It's not a code that you can run on a server - it's a documentation.
People think that it's cool to run BPMN on a server, but the fact is that you still have to code lots of stuff, connecting system to real world.... so why even use BPMN at all?
1. Visual Programming is Hell
Workflow and BPMN engines use BPMN or XML/JSON-structured statements for building workflow logic, while we already have programming languages to accompish this task. To run a simple task, they force you to create lots of unnecessary and magic stuff and adapt to a new framework. For example: https://github.com/oliverzy/process-engine.js
In BPPF you write things clearly and naturally:
if(a > b) {
await HR.doStuff()
} else {
await HR.doOtherStuff()
}
2. Diagram Logic is limited
While you could implement basic stuff using diagrams and XML/JSON structures - implementing complex loops, recursion and dynamic logic is a nearly impossible task. And it also takes lots of time to build logic using such kind of tools.
In BPPF - you use Javascript to implement logic, what we add is just a few API calls.
3. Finding Staff
To manage Workflow and BPMN engine you need professional staff with relevant experience. Companies have to pay lots of money to find an exprert for a specific engine.
In BPPF - you don't need to be an expert to use it, basic JS experience is enough to start working.
4. Connectors...
When you finally run Workflow and BPMN engine in real world - you don't have needed connectors. Any tool you want to connect your BPM to requires connectors, drivers and other stuff, and for BPMN engines they are custom-built and usually buggy.
In BPPF the whole Javascript package directory is a connector. Everything, from simple DB drivers to Machine Learning frameworks is available to you, tested by community with tons of documentation.
5. SCM and code reuse
When you implement something using Workkflow and BPMN engine - your implementation is used solely in your company. For evething you want - you need to develop stuff yourself. In BPPF - common modules, such as HR and Finance are intended to be shared among users. This allows you to greatly save lots of time & money by using ready-to-use software that is tested in production. For example Universities could develop Student Lifecycle application together - it will be much cheaper and more effective for them. And if one University wants to customize this module - not a problem - consequent updates to the module would be gracefully merged with customizations! Thanks to Git.
The Business Process Programming Framework project is aimed to ease development of workflow applications, by developing them in a natural way.
State of the project
Project is currently in early development stage and API is subject to change.
Progress:
- Workflow Engine - 92%
- Backend REST/RPC API - 5%
- Frontend Client Library - 0%
- Form generation - 0% done
- Database Drivers:
- Memory - 100%
- Postgres - 100%
- Embedded - 0%
- SQLite - 0%
- MySQL - 0%
- Oracle - 0%
- Cassandra - 0%
- Redis - 0%
- MongoDB - 0%
- DynamoDB - 0%
- Source Code Management
- Git - 100%
- Filesystem - 100%
- Inline - 100%
Features
- loaded as simple nodejs module
- guaranteed task execution
- debug any task using Development Tools
- SCM (version control) integration
- extensive testing
Example
Here's simple process that we want to implement
And this is how we write it using BPPF
var me = Process.actor("me")
var users = Process.role('user')
var myProduct = await me.developGoodProduct({name: 'bppf'})
//Evaluate Product
users = users.filter(function(user){ return user.name != "Freddy Krueger" })
var results = users.map(function(user){
return user.evaluateProduct(myProduct)}) //start all tasks in parralel
var results = await Promise.all(Promise.some(results, Math.ceil(results.length*0.7))) //wait for 70% of results
//Calculate Average
var sum = 0;
for(let result of results) {
sum += result.points
}
var averagePoints = sum / results.length
//Gateway
if(averagePoints < 3.5) {
await me.killEveyone(users)
} else {
await me.thankEveryone(users)
}
Installation
npm install bppf
Help
I would really appreciate any help in this project in the following areas:
- Frontend Client Library
- Form generation
- PR and promotion of the project