BPM engine in Erlang