CharlesIrvine
Mozart - a BPM platform written in Elixir
Mozart (mozart), an Elixir based BPM platform has been published to Hex. You can find it in GitHub at https://github.com/CharlesIrvineKC/mozart. Please have a look at the project readme file for more information.
If you aren’t that familiar with BPM, here are some good articles:
- https://www.ibm.com/topics/business-process-management
- https://appian.com/learn/topics/business-process-management/what-is-business-process-management
Here are some articles on the benefits of BPM:
- https://kissflow.com/workflow/bpm/benefits-of-business-process-management-bpm/
- https://www.cio.com/article/230560/what-is-business-process-management-bpm-the-key-to-enterprise-agility.html
Here are some links to some commercial BPM platforms:
- https://camunda.com/
- https://www.flowable.com/
https://www.ibm.com/docs/en/bpm/8.6.0?topic=manager-business-process-overview - https://appian.com/products/platform/process-automation/business-process-management-bpm
Thanks
Most Liked
CharlesIrvine
Announcing the release of Mozart 1.0.0.
New:
- Process notes can be added to processes.
- Promotion to version 1.0.0
Current State:
- Mozart is now feature complete, at least minimally.
- Development priority will be given to new GitHub reported issues.
- Opera - Mozart POC GUI has been updated with additional sample BPM models.
It’s time for me to start looking for Elixir development work. Please let me know if you know of a position I might be suited for. Either permanent or contract is fine. The location either needs to be the Kansas City metro or remote.
Go Chiefs!!
CharlesIrvine
I am pleased to announce version 0.3.0 of Mozart - an Elixir BPM platform.
The really big new feature is a DSL for defining business process applications. Elixir developers can develop BPM applications just by writing Elixir code. No external tools are required. I don’t believe this is currently possible with any other programming language.
Here is a relevant excerpt from the project readme filed:
===========================================================
Two Features Made Possible by Elixir
A Domain Specific Language (DSL) for BPM Applications
Elixir provides programmers with the ability to seemingly extend Elixir itself by creating domain specific programming idioms.
In the case of Mozart, this means that programmers can create BPM applications by using BPM specific programming constructs mixed with otherwise everyday Elixir code. Here a very simple but complete example:
defmodule MyBpmApplication do
use Mozart.BpmProcess
def sum(data) do
%{sum: data.x + data.y}
end
defprocess "add x and y process" do
service_task("add x and y task", function: &MyBpmApplication.sum/1, inputs: "x,y")
end
end
This module can be used as-is to start and execute a BPM process engine as shown below. (A small quanity of system output was removed to improve clarity.)
iex > ProcessService.load_process_models(MyBpmApplication.get_processes())
iex > {:ok, ppid, uid, _key} = ProcessEntine.start_process("add x and y process", %{x: 1, y: 1})
[info] Start process instance [add x and y process][b82f5da1-6e5d-44df-b4ed-9064b877e484]
iex > ProcessEngine.execute(ppid)
[info] New service task instance [add x and y task][f396a252-fba4-4804-9fdd-360a6c24ed54]
[info] Complete service task [add x and y task[f396a252-fba4-4804-9fdd-360a6c24ed54]
[info] Process complete [add x and y process][b82f5da1-6e5d-44df-b4ed-9064b877e484]
iex > ProcessService.get_completed_process_data(uid)
%{sum: 2, y: 1, x: 1}
Conversely, with Mazart, process models are not graphically constructed using a visual programming environment typical of most of current BPM development. We believe that this kind of development is avoided by a substantial segment of the software development community and in some instances is not condusive to CI/CD developmemnt processes.
However, visual BPM modelling tools are highly regarded by business process analysts and the resulting graphical process depictions are highly readable by developers and process analysts alike. So, it was essential that the DSL developed produce process models that are as readily understood by process analysts as are BPMN2 process models. We hope you will think we have been reasonably successful achieving this goal.
We anticipate that BPMN2 tools will still be used by Mozart development teams, but only for analysis and documentation. Actual BPM process models will be created with the Mozart BPM DSL.
A Process for Each Business Process
Another distinguishing feature is that each business process model is executed in a separate Elixir process (GenServer) instance. This is possible due to Elixir’s (and Erlang’s) unique capacity for highly performant, fault tolerant and massively concurrent multi-processing.
The goal is extremely fast and relable business process model execution. We will be publishing performance metics in the near future to gage Mozart’s performance charateristics. Initial results look very promising.
===========================================================
Any feedback will be appreciated.
CharlesIrvine
Status Update
Currently at version 0.4.3, Mozart is now functionality-complete. I don’t anticipate making any breaking changes in the near future. I will address any bug reports or small enhancements opened GitHub.
Mozart can be used now for service orchestration. If you Google for service orchestration BPM you will find numerous articles on the subject. Here is an interesting one.
You could also use Mozart for business processes with people in the loop, but only if you develop an end-user GUI for doing so. This is actually a common practice with the well known Camunda BPM platform.
For now, I’m going to shift my efforts to implementing an end-user Phoenix LiveView POC for starting processes and completing open user tasks.
CharlesIrvine
Ok. Thanks for providing the background. It sounds like you are very well versed in BPM.
As it stands right now, I really don’t know how Mozart performs relative to Appian, IBM BPM, Camunda, etc. I haven’t done any kind of serious performance testing. Also, I haven’t focused on performance and it’s likely that several things could be much more performant than they are. Performance testing is on my todo list but I’m more interested in adding additional functionality at the moment.
The main reason I created Mozart is that I personally don’t prefer creating process models graphically using BPMN2 modeling tools. These are essentially, in my opinion, visual programming tools - something that I have never liked.
With the input of some on this forum, I started thinking how I might create a DSL for business process model creation using Elixir metaprogramming and decided to dive in.
If you haven’t already, you might glance at the Mozart docs at:
https://hexdocs.pm/mozart/api-reference.html
Also, you might find Opera useful. At this point, its a very, very basic POC for showing how Mozart might be used to create BPM related GUIs. You are welcome to experiment with an instance of it deployed to fly.io at:
CharlesIrvine
Announcing the release of Mozart version 0.2.0.
From the project readme:
What is Business Process Management
See Introduction to BPM in hexdocs to get a basic understanding of Business Process Management (BPM).
Documentation
View documentation for Mozart in hexdocs at https://hexdocs.pm/mozart/api-reference.html
Introduction
Mozart is an open source BPM platform written using Elixir. Process models are defined using a set of Elixir structs providing a modelling language which is somewhat inspired by AWS Step Functions. See AWS Step Functions.
The most distinguishing feature of Mozart is that each business process model is executed in a GenServer instance, made possible by the well known character of Elixir (and Erlang) multi-processing.
Another important feature is that process models are not graphically constructed using BPMN2. Instead, they are textually represented by struct based Elxir data structures. This makes BPM, hopefully, just another tool in the software developers toolkit.
Current Use Cases (and Non Use Cases)
- Elixir development teams wanting to explore and potentially implement exploratory BPM applications.
- Non Elixir development teams having the goal of exploring and experimenting with Elixir.
- Mozart is not ready for major enterprise BPM projects.
- Mozart is not a low code or no code platform suitable for non developers.







