BPE

INTRO

The bpe module contains a subset of BPMN 2.0 API for controlling processes with parallel gateways, hierarhical traces and scheduler. Also BPE supports XML BPMN format out of the box. Can be used with Camunda BPMN modeler.

SERVICE

load(string()) -> #process{}

Loads the process from the database. This function should be protected against admin authorization.

start(#process{},list()) -> {ok,pid()} | {error,any()}.

Start the process in the runtime. This function should be hardcoded agains proper role cheching against user and current task.

CONTEXT

proc(pid()) -> #process{}.

Retrieves current process state (if running) from the runtime. This function should be protected against admin authorization.

next(pid()) -> {complete,any()}.

Invokes BPMN 2.0 process shcheduler tick.

next(any(),pid()) -> {complete,any()}.

Invokes BPMN 2.0 process shcheduler tick on particular flow (if allowed).

complete(pid()) -> {complete,any()}.

Invokes BPMN 1.0 process shcheduler tick.

complete(any(),pid()) -> {complete,any()}.

Invokes BPMN 1.0 process shcheduler tick on particular flow (if allowed).

amend(pid(),any()) -> {complete,any()}.

Invokes BPMN 2.0 process shcheduler tick with additional document in the state as an argument.

discard(pid(),any()) -> {complete,any()}.

Invokes BPMN 2.0 process shcheduler tick with additional document removal from the the state.

append(pid(),any()) -> {complete,any()}.

Modifies current state of the process with additional document.

remove(pid(),any()) -> {complete,any()}.

Modifies current state of the process with document removal.

event(pid(),any()) -> {complete,any()}.

Sends the sync event to the runtime process.

hist(pid()) -> list(#hist{}).

Retrieves the process history.

ENV

task(Name::list(),#process{}) -> [tuple()] | tuple().

Retrieves the task from process definition.

doc(Record::tuple(),#process{}) -> [tuple()] | tuple().

Searches for the documents in the process environment.

tasks(#process{}) -> list().

Retrieves the tasks from process definition.

flows(#process{}) -> list().

Retrieves the flows from process definition.

docs(#process{}) -> list().

Retrieves the documents from process definition.

events(#process{}) -> list().

Retrieves the events from process definition.

This module may refer to: TASK