BPE

Приклад сесії оператора

> bpe:start(bpe_account:def(),[]). Process "1562195753535380000" spawned as <0.139.0>. {ok,"1562195753535380000"} > bpe:complete("1562195753535380000"). Process: "1562195753535380000" Task: 'Created' Targets: ['Init'] Target: 'Init' Status: reply Reason: unknown_task {unknown_task,'Init'} > bpe:hist("1562195753535380000"). [ {hist,{1,"1562195753535380000"}, feed,[],[],[],[],'IBAN Account', {task,'Init'}, [], {{2019,7,4},{2,13,43}}}, {hist,{0,"1562195753535380000"}, feed,[],[],[],[],'IBAN Account', {task,'Created'}, [], {{2019,7,4},{2,13,7}}}] > bpe:head("1562195753535380000"). {hist,{1,"1562195753535380000"}, feed,[],[],[],[],'IBAN Account', {task,'Init'}, [], {{2019,7,4},{2,13,43}}} > supervisor:which_children(bpe_otp). [{"1562195753535380000",<0.139.0>,worker,[bpe_proc]}]
Як дані зберігаються в KVS
> kvs:all(writer). [{writer,"/bpe/proc",1,[],[],[]}, {writer,"/bpe/hist/1562195753535380000",2,[],[],[]}] > kvs:get("/bpe/hist/1562195753535380000",{1,"1562195753535380000"}). {ok,{hist,{1,"1562195753535380000"}, feed,[],[],[],[],'IBAN Account', {task,'Init'}, [], {{2019,7,4},{2,16,7}}}}

Специфікація BPMN

Ця схема охоплює 80% всіх робочих процесів та забезпечує лише 20% стандартного покриття. Ми називаємо це Легким BPMN, або BPE.

Легкий BPMN
-type bst() :: binary() | string() | atom(). -type procId() :: [] | integer() | {atom(),any()}. -type histId() :: [] | integer() | {atom()|string(),any()}. -record(hist, { id = [] :: histId(), container = feed :: [] | atom(), feed_id = [] :: any(), prev = [] :: [] | integer(), next = [] :: [] | integer(), feeds = [] :: list(), name = [] :: [] | binary(), task = [] :: [] | {atom()|string(),any()}, docs = [] :: list(tuple()), time = [] :: term() }). -type tasks() :: #task{} | #serviceTask{} | #userTask{} | #receiveTask{} | #beginEvent{} | #endEvent{}. -type events() :: #messageEvent{} | #boundaryEvent{} | #timeoutEvent{}. -record(process, { id = [] :: procId(), container = feed :: [] | atom(), feed_id = [] :: [] | term(), prev = [] :: [] | integer(), next = [] :: [] | integer(), name = [] :: [] | bst(), feeds = [] :: list(), roles = [] :: list(), tasks = [] :: list(tasks()), events = [] :: list(events()), hist = [] :: [] | term(), flows = [] :: list(#sequenceFlow{}), rules = [] :: [] | term(), docs = [] :: list(tuple()), options = [] :: term(), task = 'Created' :: [] | atom(), timer = [] :: [] | reference(), notifications = [] :: [] | term(), result = [] :: [] | binary(), started = [] :: [] | calendat:datetime(), beginEvent = [] :: [] | atom(), endEvent = [] :: [] | atom()}).

Приклади процесів

Приклад визначення процесу
-module(bpe_account). -compile(export_all). def() -> #process { name = 'IBAN Account', flows = [ #sequenceFlow { source='Created', target='Init'}, #sequenceFlow { source='Init', target='Upload'}, #sequenceFlow { source='Upload', target='Payment'}, #sequenceFlow { source='Payment', target=['Signatory','Process']}, #sequenceFlow { source='Process', target=['Process','Final']}, #sequenceFlow { source='Signatory', target=['Process','Final']} ], tasks = [ #userTask { name='Init', module = bpe_account }, #userTask { name='Upload', module = bpe_account }, #userTask { name='Signatory', module = bpe_account }, #serviceTask { name='Payment', module = bpe_account }, #serviceTask { name='Process', module = bpe_account }, #endEvent { name='Final', module = bpe_account } ], beginEvent = 'Init', endEvent = 'Final', events = [ #messageEvent{name='PaymentReceived'} ] }.

Впровадження

Компанії, які використовують BPE:



Дописувачі

  • 5HT — Намдак Тонпа