Overview of bpmn-server scripting environment
AppDelegate (general entry point), AppServices (responds to Service Tasks), and AppUtils (general purpose utility class).website·Indexed 30 days ago
https://bpmnserver.github.io/bpmn-server/API documentation for bpmn-server, featuring core classes and interfaces for process execution and management. Key components include the BPMNServer main class, Engine for process orchestration, Execution for managing process instances, and various interfaces such as IBPMNServer, IEngine, and ICacheManager.
AppDelegate (general entry point), AppServices (responds to Service Tasks), and AppUtils (general purpose utility class).bpmn-server provides a Workflow component based on Business Process Model and Notation (BPMN) for Node.js applications. It features out-of-the-box state persistence and variables, supporting concurrency across Node.js clusters and process instances for long-running business processes or scheduled tasks. The ecosystem consists of two primary packages:
bpmn-web: A full web application containing modeling and administration tools.bpmn-client: A lightweight library for remote connections to the server via API.engine API.ThrowEvent class represents a throwing event in a BPMN process. It inherits from the Event class and provides mechanisms to trigger events, manage behaviors, and handle process execution tokens.TerminateBehaviour class is used to perform termination actions within a BPMN process. It extends the base Behaviour class and is designed to scan definitions and insert itself to execute specific actions as required by the process flow.// Example instantiation
const termination = new TerminateBehaviour(node, definition);BehaviourLoader class provides a mechanism to register behavior-loading functions and apply them to BPMN nodes. It maintains a static list of behaviors, where each behavior consists of a name and a function that processes a node and its definition.const loader = new BehaviourLoader();Boundary Events in bpmn-server follow these lifecycle rules:
describe() method overrides Node.describe() to provide a detailed representation or metadata about the ServiceTask instance, returning an array of any types.describe(): any[]InstanceLocker class provides mechanisms to lock, release, and manage locks for process instances within the bpmn-server datastore. It ensures that specific instances are not processed concurrently by multiple workers.const locker = new InstanceLocker(dataStore);TimerBehaviour class extends Behaviour and is used to perform timer-related actions within a BPMN process. It scans definitions and inserts itself to manage time-based events using durations, cycles, or specific dates.// Hierarchy: Behaviour ↳ TimerBehaviourDefaultAppDelegate class is used to respond to various events and services within the bpmn-server. It implements the IAppDelegate interface and is responsible for: receiving all workflow events, handling service calls, processing message and signal calls, and executing scripts.const delegate = new DefaultAppDelegate(server);The Event class is a specialized Node. It serves as the base class for the following specific BPMN event types:
StartEventEndEventCatchEventThrowEventBoundaryEvent