Workshop: a hotel booking, step by step
In this workshop you build one business process from scratch and grow it, module by module, the way a real one grows: a hotel booking with several rooms. A guest asks for three rooms; the hotel’s system needs one booking per room; one of them may be sold out — and then the guest decides —, the hotel’s API may be slow, a manager may have to approve, and the guest has a special request a language model should understand.
Every module is short, runs on your laptop, and ends with something you can see in the console and check in a test. The screenshots on these pages were taken from the workshop’s own project, running exactly as described.
What you need
Section titled “What you need”- Java 21 and Maven 3.9+
- Git
- A browser
- About 2–3 hours for everything; each module stands on its own if you want to stop.
Nothing else: no Docker, no database, no broker, no API key. The project brings an in-memory database, a fake hotel API and a fake language model, so nothing leaves your machine.
The project
Section titled “The project”The finished project is in the repository, in examples/workshop-hotel-booking. Each module explains the piece it adds; the project holds all of them side by side, one definition per module, so you can run any module at any time.
workshop-hotel-booking/├── pom.xml # the engine, the forms engine, the console, the built-in workers, the test kit├── src/main/java/com/example/hotel/│ ├── HotelBookingApplication.java # the app: engine + console in one Spring Boot app│ ├── workers/HotelTaskHandlers.java # the hotel's business logic (the ACTION steps)│ └── fakes/ # a fake hotel API and a fake OpenAI-compatible model├── src/main/resources/│ ├── application.properties│ └── workflows/ # one definition per module: 01-….ec.yaml to 06-….ec.yaml├── src/test/java/… # the test-kit tests of Part 9├── src/test/flows/ # test-only definitions├── forms/booking-approval.ecform # the manager's approval form (module 6)├── scripts/start.sh # starts a process over the REST API├── scripts/approve.sh # decides an approval as a manager, through the forms API└── ci/github-actions-workflows.yml # the CI pipeline of Part 9The modules
Section titled “The modules”| # | Module | You learn |
|---|---|---|
| 0 | Setup | Build, run, open the console |
| 1 | A first flow | Definitions, steps, workers, starting a process, the graph |
| 2 | One booking per room | forEach, an inline body, labels, lanes in the console |
| 3 | When things fail | Retries, timeouts; a sold-out room: the guest decides, and compensation undoes the booking only if they cancel |
| 4 | Calling the hotel | HTTP_CALL, connections, idempotency keys |
| 5 | Calling an AI | LLM_CALL, structured output, the AGENT step |
| 6 | A person in the loop | USER_TASK, escalation, CHOICE, completing a step |
| 7 | Operating | Search, retry from a step, batch operations, MCP |
| 8 | Debugging a workflow | Errors, the step history, Copy state, logs, reproducing in a test |
| 9 | Testing, automated | The test kit, time travel, simulated integrations, CI that runs it all on every change |
| 10 | Changing without redeploying | Git import, versions side by side, migrating safely |
If you only have an hour: modules 0–3, then Part 9. That is the core: a process, its failure handling, and the tests that keep it right.