-ifndef(BPE_HRL). -define(BPE_HRL, true). -include_lib("kvs/include/cursors.hrl"). -record(task, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), roles=[] :: [] | binary(), etc=[] :: list({term(),term()}) }). -record(userTask, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), roles=[] :: [] | binary(), etc=[] :: list({term(),term()}) }). -record(serviceTask, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), roles=[] :: [] | binary(), etc=[] :: list({term(),term()}) }). -record(receiveTask, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), reader=[] :: #reader{}, roles=[] :: [] | binary(), etc=[] :: list({term(),term()}) }). -record(sendTask, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), writer=[] :: #writer{}, roles=[] :: [] | binary(), etc=[] :: list({term(),term()}) }). -record(messageEvent, { name=[] :: [] | atom() | string() | binary(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), etc=[] :: list({term(),term()}), payload=[] :: [] | binary(), timeout=[] :: [] | {integer(),{integer(),integer(),integer() }}}). -record(boundaryEvent,{ name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), etc=[] :: list({term(),term()}), payload=[] :: [] | binary(), timeout=[] :: {integer(),{integer(),integer(),integer()}}, timeDate=[] :: [] | binary(), timeDuration=[] :: [] | binary(), timeCycle=[] :: [] | binary() }). -record(timeoutEvent, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), etc=[] :: list({term(),term()}), payload=[] :: [] | binary(), timeout=[] :: [] | {integer(),{integer(),integer(),integer()}}, timeDate=[] :: [] | binary(), timeDuration=[] :: [] | binary(), timeCycle=[] :: [] | binary() }). -record(beginEvent , { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), etc=[] :: list({term(),term()}) }). -record(endEvent, { name=[] :: [] | atom(), module=[] :: [] | atom(), prompt=[] :: list(tuple()), etc=[] :: list({term(),term()}) }). -record(sequenceFlow, { name=[] :: term(), condition=[] :: term(), source=[] :: [] | atom(), target=[] :: [] | atom() | list(atom()) }). -type histId() :: [] | integer() | {term(),term()}. -type tasks() :: #task{} | #serviceTask{} | #userTask{} | #receiveTask{} | #beginEvent{} | #endEvent{}. -type events() :: #messageEvent{} | #boundaryEvent{} | #timeoutEvent{}. -type procId() :: [] | integer() | {atom(),any()}. -type gate() :: none | exclusive | parallel | inclusive | complex | event. -record(hist, { id = [] :: histId(), container=feed :: [] | atom(), feed_id=[] :: any(), prev=[] :: [] | integer(), next=[] :: [] | integer(), parent=[] :: histId(), name=[] :: [] | binary(), task=[] :: [] | atom() | {atom()|string(),any()}, docs=[] :: list(tuple()), time=[] :: term() }). -record(process, { id = [] :: procId(), container=feed :: [] | atom(), feed_id=[] :: [] | atom() | term(), prev=[] :: [] | integer(), next=[] :: [] | integer(), name=[] :: [] | binary() | string() | atom(), 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 = [] :: [] | calendar:datetime(), beginEvent = [] :: [] | atom(), endEvent = [] :: [] | atom()}). -record(gateway, { name=[] :: [] | atom(), type= none :: gate(), module=[] :: [] | atom(), inputs=[] :: atom() | list(atom()), outputs=[] :: atom() | list(atom()) }). -record(subProcess, { name=[] :: [] | atom(), diagram= #process{} :: #process{} }). -record('Comp', { id=[] :: [] | integer() }). -record('Proc', { id=[] :: [] | integer() }). -record('Load', { id=[] :: [] | integer() }). -record('Hist', { id=[] :: [] | integer() }). -record('Make', { proc=[] :: [] | #process{} | binary(), docs=[] :: [] | list(tuple()) }). -record('Amen', { id=[] :: [] | integer(), docs=[] :: [] | list(tuple()) }). -endif.