Transform your Domain into a process-centric domain
It enables you to send actions to your domain, put rules over these action's transitions,
and separate process rules classes from your aggregate class and invariants.
🎯Two main purposes (2 points of vue):
- make your domain flowable
- develop your domain as a process
💻Available in
- reactive functional programming (spring reactor) mode
- normal mode (imperative programming)
Prerequisite: JAVA 17 or higher
🤖 If you are using an AI agent (ex: Claude Code) This repo ships an fdd skill that scaffolds a
complete, runnable FDD Spring Boot app from a plain-English process description.
Jump to 🤖 Generate an FDD app with AI.
📚 Table of Contents generated with DocToc
🔍 Introduction
Beyond basic business logic, domains often incorporate state-based rules.
When these state-dependent rules come into the picture, the domain's overall structure
becomes more complex over time, making both evolutionary changes and maintenance more difficult
Managing the state complexity often leads us to use state machines or business process management (BPM) tools.
While valuable, these tools operates as distinct units from the domain, leading to
- potential inconsistencies
- integration challenges
- increased overhead
- scattered business logic
When using flow-driven-domain, your domain becomes more process-centric:
- Flow rules becomes first-call citizen in your your domain
- Flow history is kept inside your domain model
Please read the hello world as tutorial.
Then try a complete POC application here
🤖 Generate an FDD app with AI (Claude Code)
You don't have to wire up an FDD app by hand. This repo is also a Claude Code
plugin marketplace that exposes an fdd skill: describe your business process in plain English
and it designs the states / actions / transitions, writes the workflow JSON, and generates the full,
runnable project — build files (Gradle or Maven), the Flowable/BaseFlow domain, action
delegates, FlowEngine wiring, Flyway migrations, application.yaml, a REST controller,
docker-compose, and a README.
Install
From inside Claude Code:
/plugin marketplace add progmodEK/flow-driven-domain
/plugin install fdd@flow-driven-domain-marketplace
Use
Either invoke it explicitly with /fdd or just describe the process — the skill triggers on requests
like "make an FDD app", "scaffold a flow-driven-domain service", or plain descriptions of a
workflow:
/fdd Build me a leave-approval app. An employee requests time off, then their
manager reviews it and either approves or rejects it. If the manager hasn't
decided within 48 hours, escalate the request to HR.