BPE

INTRO

BPE is a business process managament application that brings Erlang for enterprises. It provides infrastructure for workflow definitions, process orchestration, rule based production systems and distributed storage.

$ mad get bpe && cd bpe $ mad dep com pla rep

PROTOCOL

-record(complete, { id=[] :: [] | integer() }). -record(proc, { id=[] :: [] | integer() }). -record(histo, { id=[] :: [] | integer() }). -record(create, { proc=[] :: [] | #process{}, docs=[] :: [] | list(tuple()) }). -record(amend, { id=[] :: [] | integer(), docs=[] :: [] | list(tuple()) }).

BPMN

The workflow definition uses following persistent workflow model which is stored in KVS:

-record(task, { name, id, roles, module }). -record(userTask, { name, id, roles, module }). -record(serviceTask, { name, id, roles, module }). -record(messageEvent, { name, id, payload }). -record(beginEvent , { name, id }). -record(endEvent, { name, id }). -record(sequenceFlow, { name, id, source, target }). -record(history, { ?ITERATOR(feed,true), name, task }). -record(process, { ?ITERATOR(feed,true), name, roles=[], tasks=[], events=[], history=[], flows=[], rules, docs=[], task, beginEvent, endEvent }).

Full set of BPMN 2.0 fields could be obtained at OMG definition document, page 3-7.

SCHEMA

Workflows are complimentary to business rules and could be specified separately. BPE definitions provides front API to the end-user application. Workflow Engine -- is an Erlang/OTP application which handles process definitions, process instances, and provides very clean API for Workplaces.

Before using Process Engine you need to define the set of business process workflows of your enterprise. This could be done via Erlang terms or some DSL that lately converted to Erlang terms. Internally BPE uses Erlang terms workflow definition:

bpe:start(#process{name="Order1", flows=[#sequenceFlow{source='Start',target='Mid'}, #sequenceFlow{source='Mid',target='Finish'}], tasks=[#userTask{name='Start'}, #userTask{name='Mid'}, #userTask{name='Finish'}], beginEvent='Start',endEvent='Finish'},[]).
deposit_app() -> #process { name = 'Create Deposit Account', flows = [ #sequenceFlow{source='Init', target='Payment'}, #sequenceFlow{source='Payment', target='Signatory'}, #sequenceFlow{source='Payment', target='Process'}, #sequenceFlow{source='Process', target='Final'}, #sequenceFlow{source='Signatory', target='Process'}, #sequenceFlow{source='Signatory', target='Finish'} ], tasks = [ #userTask { name='Init', module = deposit }, #userTask { name='Signatory', module = deposit}, #serviceTask { name='Payment', module = deposit}, #serviceTask { name='Process', module = deposit}, #endEvent { name='Finish'} ], beginEvent = 'Init', endEvent = 'Final', events = [ #messageEvent{name="PaymentReceived"} ] }.

CONTRIBUTORS