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.