BPE (bpe v11.4.16)
Copy MarkdownBusiness Process Engine (BPE).
This module serves as the primary entry point for managing BPMN 2.0 processes. It handles process lifecycle, persistence, state transitions, events, gateways, and history execution trace routing. BPE connects abstract BPMN workflows to actual executable code.
Summary
Functions
Appends an error to the process history and logs a notice.
Appends an entry to the general history track for the process.
Appends a scheduling state representation to the process flow.
Appends a trace event to the process history.
Amends a document form to the process instance.
Assigns the process to an executor, starting it if not yet started.
Casts an asynchronous message event to the process instance.
Retrieves a value from a cache table returning :undefined upon expiry.
Manages cached values dynamically.
Deletes a cache entry if the value is :undefined.
Otherwise, sets a default cached value with dynamic TTL.
Stores a key-value pair in a cache table explicitly until till_val expiration.
Cleans up history, scheduling data, and process record for a given process ID.
Directs the execution to complete the current stage and step.
Directs the execution to complete the process task at a given explicit stage.
Retrieves the current task currently being executed by the process instance.
Marks the process as deleted, removes its active record and unblocks gateways.
Discards a given document form from the process instance.
Extracts an environment document mapping corresponding to the process.
Returns documents initialized for the process.
Fetches all errors recorded for the process instance.
Returns the process events.
Evaluates exclusive path by checking conditional logic of flow sequences.
Finds a specific step/task in the process by name.
Selects the first declared sequence flow path.
Gets the first sequence flow ID of a process instance.
Gets the target task ID of the first begin event.
Locates a sequence_flow structurally by id.
Extracts current flow id scheduled on a given pointer state.
Returns the process flows.
Blocks progression at a particular gateway pending an event.
Unblocks all gateway blocks for a process.
Unblocks a specific gateway target for a process instance.
Retrieves the history head step from the process storage.
Constructs a step key or passes through unmodified PID keys.
Creates a composite binary key out of a prefix and a PID.
Selects the last active sequence flow path.
Loads a BPE process instance by its ID.
Loads a BPE process instance by its ID, returning a default value if not found.
Sends a synchronous message event to the process instance.
Modifies existing process arguments or documents.
Retrieves children monitors.
Links a monitor to a newly started or existing BPE process.
Steps the process state to the next task in the workflow.
Steps explicitly to a given target stage directly.
Persists the modified process layout and states.
Fetches the pid of the given process ID from the registry cache.
Retrieves the current process state state by process ID.
Primary process logic runner traversing the internal scheduler pointer.
Forced specific flow initiation from the process instance.
Randomly selects an outgoing sequence path.
Registers the current process in the global syn registry.
Hot reloads code and purges old application states.
Retrieves the scheduled head step from the flow storage.
Publishes a message to a registered process pool.
Starts a BPE process instance. If the second argument is an empty list, it initializes using the documents in the process record. Otherwise, it starts using the specified options.
Starts an instance under BPE.OTP dynamically, binding to its given task.
Subscribes a process element to a pub-sub topic.
Returns the process tasks.
Calculates gregorian seconds until a ttl duration given a present timestamp.
Default time-to-live for cache properties.
Unregisters the current process from the syn pool.
Unsubscribes a process element from a topic.
Updates the process instance with the new internal state.
Compiles BPMN XML file into executable Erlang records.
Functions
Appends an error to the process history and logs a notice.
Appends an entry to the general history track for the process.
Appends a scheduling state representation to the process flow.
Appends a trace event to the process history.
Amends a document form to the process instance.
Assigns the process to an executor, starting it if not yet started.
Casts an asynchronous message event to the process instance.
Retrieves a value from a cache table returning :undefined upon expiry.
Manages cached values dynamically.
Deletes a cache entry if the value is :undefined.
Otherwise, sets a default cached value with dynamic TTL.
Stores a key-value pair in a cache table explicitly until till_val expiration.
Cleans up history, scheduling data, and process record for a given process ID.
Directs the execution to complete the current stage and step.
Directs the execution to complete the process task at a given explicit stage.
Retrieves the current task currently being executed by the process instance.
Marks the process as deleted, removes its active record and unblocks gateways.
Discards a given document form from the process instance.
Extracts an environment document mapping corresponding to the process.
Returns documents initialized for the process.
Fetches all errors recorded for the process instance.
Returns the process events.
Evaluates exclusive path by checking conditional logic of flow sequences.
Finds a specific step/task in the process by name.
Selects the first declared sequence flow path.
Gets the first sequence flow ID of a process instance.
Gets the target task ID of the first begin event.
Locates a sequence_flow structurally by id.
Extracts current flow id scheduled on a given pointer state.
Returns the process flows.
Blocks progression at a particular gateway pending an event.
Unblocks all gateway blocks for a process.
Unblocks a specific gateway target for a process instance.
Retrieves the history head step from the process storage.
Constructs a step key or passes through unmodified PID keys.
Creates a composite binary key out of a prefix and a PID.
Selects the last active sequence flow path.
Loads a BPE process instance by its ID.
Loads a BPE process instance by its ID, returning a default value if not found.
Sends a synchronous message event to the process instance.
Modifies existing process arguments or documents.
Retrieves children monitors.
Links a monitor to a newly started or existing BPE process.
Steps the process state to the next task in the workflow.
Steps explicitly to a given target stage directly.
Persists the modified process layout and states.
Fetches the pid of the given process ID from the registry cache.
Retrieves the current process state state by process ID.
Primary process logic runner traversing the internal scheduler pointer.
Forced specific flow initiation from the process instance.
Randomly selects an outgoing sequence path.
Registers the current process in the global syn registry.
Hot reloads code and purges old application states.
Retrieves the scheduled head step from the flow storage.
Publishes a message to a registered process pool.
Starts a BPE process instance. If the second argument is an empty list, it initializes using the documents in the process record. Otherwise, it starts using the specified options.
Starts an instance under BPE.OTP dynamically, binding to its given task.
Subscribes a process element to a pub-sub topic.
Returns the process tasks.
Calculates gregorian seconds until a ttl duration given a present timestamp.
Default time-to-live for cache properties.
Unregisters the current process from the syn pool.
Unsubscribes a process element from a topic.
Updates the process instance with the new internal state.
Compiles BPMN XML file into executable Erlang records.