5 lessons that software developers can learn from Business Process Model and Notation (BPMN)

Introduction

What is BPMN

BPMN is focused on the implementation of a reproducible, user-oriented pipeline for people and software to work together. The notation defines several node types, connection rules and execution semantics. The overall picture describes a business process from start to finish and quickly shows how employees interact with each other.

1. BPMN best practices

My favorite rule here — is to model success path only, avoid loops, and get exceptional business situations handled in a separate flow. By describing your process this way, you automatically structure your code into separate, simple modules that are easy to maintain.

2. Agile Coding cycle

The traditional software stack has ways to generate diagrams and flowcharts from code. But it will just be a class diagram of our MVC code or a database domain diagram. But it won’t reveal the implemented business process.

The thing that we need is the flow of controllers components. How they are intertwined with each other and must be executed by the users. This could be accomplished quickly with special comments and generate a graph from them, but you’ll see below how to do it better.

3. Top-level software structure

What if software developers were creatinga horse? They would break it up into layers. Here in the picture you can clearly see the horse frontend implementation details on the right side and the horse backend on the left.

Unlike traditional software design, low-code applications allow you to work on a solution by starting with a skeleton and gradually adding more details. Defining BPMN gives you the bones of software design. And allows you to gradually add new features.

Technically, we cannot avoid separating the frontend and the backend. But we could use the flow definition as a way to structure our code layout, and API naming conversions. Such a structure would help in the future to understand what we need to modify when we change the workflow in a large codebase.

4. CRUD and Workflow separation

Workflow is the thing that requires new separate layer in our code. In addition to usual Model-View-Controller separation, the controller code itself could be spitted over CRUD and Workflow parts.

5. Advanced primitives

  • Split/Join
  • Timers and deadlines
  • Completed tasks compensation activities, if a flow was cancelled.
  • Complex gateways, like continue after one of outgoing tasks was completed and cancels other ways.

Having a clean API that implements the necessary BPMN concepts helps to simplify the code and be open to quickly make new changes.

BPMN Poster

Conclusion

Often software developers is burden into technical details, that prevents us to invent good and productive API to construct working products. Studying interaction patterns and emphasizing low-code software concepts, can help invent new and modern software architecture, close to the perception of programming users, reduce the cost and time of software development.

Reusable workflow library #django #python http://viewflow.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store