BPE

INTRO

The bpe module contains a subset of BPMN 2.0 API for controlling processes with parallel gateways, hierarchical 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(), #procMonitor{}) -> {ok,pid()} | {error,any()}.

Starts the process in the context of process monitor — a supervised process group. This function is matching against current user tasks and roles.

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

Starts the process in the runtime with no process group. This function is matching against current user tasks and roles.

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 scheduler tick.

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

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

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

Invokes BPMN 1.0 process scheduler tick.

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

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

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

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

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

Invokes BPMN 2.0 process scheduler 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