$ show flowable/flowable-engine
Flowable is a lightweight, embeddable Business Process Management (BPM) platform written in Java. It provides a suite of engines for BPMN 2.0 process execution, CMMN case management, DMN decision tables, form management, identity management, and event registry. The architecture is modular: core engines, service modules (job, batch, variable, task, identitylink, entitylink), REST APIs, Spring Boot auto-configuration, and integration modules (Camel, CDI, JMX, LDAP, HTTP, secure JavaScript). Key entry points include ProcessEngine, CmmnEngine, DmnEngine, IdmEngine, and EventRegistry. Data flows involve deploying XML definitions, starting process/case instances, executing tasks, handling events, and persisting state to relational databases (MySQL, PostgreSQL, Oracle, DB2, MSSQL, H2, HSQL). The codebase is production-grade with extensive testing, schema migration scripts, and support for GraalVM native images. It is actively maintained with a large community (9.5k stars). However, it carries legacy compatibility modules (flowable5-engine) and some technical debt from the Activiti migration, resulting in moderate technical drift.
The LLM identified 5 files worth highlighting for reuse:
Defines the Command interface and CommandInterceptor chain used across all Flowable engines. This pattern encapsulates transactional execution with logging, retry, and context management. It is self-contained in the common API module and can be extracted as a generic command execution framework for any application requiring robust, interceptable command processing.
Provides a registry of VariableType implementations (string, integer, date, JSON, serializable, etc.) for process variables. The design allows custom types to be added dynamically. This pattern is reusable in any state machine or workflow system that needs a flexible, extensible variable type system with serialization and persistence support.
Implements a secure JavaScript execution context that restricts access to dangerous APIs (e.g., file I/O, network, reflection) using a custom class filter and thread MXBean wrapper. This is a non-obvious solution for safely executing user-provided scripts in a BPM engine. The module is standalone and can be reused in any Java application needing sandboxed scripting.
Fluent builder for creating batch jobs with configurable search key, batch type, and batch parts. The batch service handles chunked async processing with persistence and status tracking. This pattern is reusable for any application that needs to process large volumes of work in manageable chunks with monitoring and restart capabilities.
Generic processor for REST list endpoints that handles pagination, sorting, and filtering parameters. It converts query parameters into a Query object and returns a paginated response. This pattern is reusable in any REST API that needs consistent list query handling with minimal boilerplate.