> Markdown version of [/videos/842-are-you-done-yet-mastering-long-running-processes-in-modern-architectures?t=2953](https://www.wearedevelopers.com/videos/842-are-you-done-yet-mastering-long-running-processes-in-modern-architectures?t=2953). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Are you done yet? Mastering long-running processes in modern architectures Building homegrown database state-machines for long-running processes is a maintenance nightmare. Discover how process orchestration with Camunda and BPMN creates resilient, scalable workflows in Spring Boot. - **Speakers:** [Bernd Ruecker](https://www.wearedevelopers.com/@bernd-ruecker) - **Event:** WeAreDevelopers LIVE - **Published:** January 19, 2024 - **Duration:** 57:38 - **URL:** https://www.wearedevelopers.com/videos/842-are-you-done-yet-mastering-long-running-processes-in-modern-architectures ## Summary Handling long-running processes—those requiring waiting for business tasks like human approvals or technical resolutions like system outages—poses a significant challenge in modern architectures. Using relatable metaphors like ordering coffee at Starbucks, the discussion contrasts synchronous blocking communication with asynchronous approaches, illustrating why holding a thread open or building homegrown database state-machines quickly becomes a maintenance nightmare for scalability, versioning, and monitoring. To solve this, process orchestration and workflow engines are introduced, specifically demonstrating Camunda and the BPMN standard within a Java Spring Boot architecture. By linking graphical process models directly to code, development teams gain living documentation that bridges the gap between technical execution and business requirements. The practical demonstration highlights how visual timers, automatic retries, and incident monitoring can replace accidental complexity with resilient, scalable workflows. A critical takeaway is that embracing long-running capabilities leads to cleaner microservice boundaries. Instead of building monolithic "smart" services to handle edge cases like expired credit cards, individual domain services can encapsulate their own retries and asynchronous callbacks. Coupled with the crucial practice of designing idempotent APIs to prevent duplicate actions, this orchestration approach allows modern architectures to handle network failures gracefully, ensuring system resilience and providing a vastly superior customer experience. **Keywords:** long-running processes, synchronous blocking communication, process orchestration engines, workflow engines, camunda, BPMN standard, microservice boundaries, idempotent API design, asynchronous callbacks, stateful retry handling, distributed system resilience, accidental complexity, living documentation, java spring boot integration, network failure handling ## Chapters 1. **Comparing synchronous and asynchronous communication patterns** (00:00) — Temporal coupling in synchronous processes degrades system availability and delays user feedback loops. 1. **Handling long-running tasks with asynchronous results** (04:08) — Blocking systems for completion degrades user experience while asynchronous queues successfully decouple ordering from fulfillment. 1. **Identifying business reasons for long-running process requirements** (07:44) — Common business scenarios like manual approvals, document collection, and intentional delays necessitate long-running process architectures. 1. **Challenges of building custom state handling in Java** (10:55) — Relying on simple database columns for state tracking fails when facing escalations, versioning, and monitoring needs. 1. **Demonstrating workflow engines for customer onboarding processes** (14:39) — A practical workflow implementation leverages a Spring Boot application and executable graphical models to orchestrate automated tasks. 1. **Improving system resilience with technical long-running capabilities** (24:17) — Handling network failures and service unavailability through localized retry mechanisms prevents isolated errors from breaking entire systems. 1. **Implementing idempotency for reliable retry mechanisms in APIs** (33:55) — Generating artificial transaction identifiers early in workflows ensures that retry actions safely avoid duplicating critical service logic. 1. **Designing clean microservice boundaries using process orchestration** (39:39) — Encapsulating long-running domain logic within responsible microservices prevents anemic data components and bloated centralized orchestrators. 1. **Utilizing executable graphical models for stakeholder alignment** (44:35) — Executable visual models bridge the gap between technical execution and business requirements by providing reliable living documentation. 1. **Exploring orchestration scalability and database architecture tradeoffs** (49:13) — Moving away from relational databases toward event sourcing enables massive geo-redundant processing scale for orchestration engines. ## Related Moments - [Introduction to the speakers and process automation transformation journey](https://www.wearedevelopers.com/videos/1433-transforming-task-management-integrating-camunda-with-scalable-frontend-solutions) (from "Transforming Task Management: Integrating Camunda with Scalable Frontend Solutions") - [Demonstrating state management in a practical application](https://www.wearedevelopers.com/videos/82-hello-generics-goodbye-boilerplate) (from "Hello generics, goodbye boilerplate!") - [Refactoring application architectures for complex technical tasks](https://www.wearedevelopers.com/videos/1130-chatbots-are-going-to-destroy-infrastructures-and-your-cloud-bills) (from "Chatbots are going to destroy infrastructures and your cloud bills") - [Answering architecture questions on downtime and custom messaging](https://www.wearedevelopers.com/videos/535-practical-change-data-streaming-use-cases-with-debezium-and-quarkus) (from "Practical Change Data Streaming Use Cases With Debezium And Quarkus") - [Shift away from traditional threads and the asynchronous era](https://www.wearedevelopers.com/videos/1973-beyond-loom-practical-patterns-for-virtual-threads-structured-concurrency-and-reactive-interop) (from "Beyond Loom: Practical Patterns for Virtual Threads, Structured Concurrency and Reactive Interop") - [Building a complete command query responsibility segregation system](https://www.wearedevelopers.com/videos/91-from-event-streaming-to-event-sourcing-101) (from "From event streaming to event sourcing 101") ## Related Articles - [Why Event-Driven Architecture Isn’t About Speed (and When You Actually Need It)](https://www.wearedevelopers.com/magazine/745-why-event-driven-architecture-isn-t-about-speed-and-when-you-actually-need-it) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) - [Now is the time for industrialized software development](https://www.wearedevelopers.com/magazine/601-now-is-the-time-for-industrialized-software-development) - [The Concept of Concurrency & Multithreading: What Are They And How They Function](https://www.wearedevelopers.com/magazine/89-the-concept-of-concurrency-multithreading-what-are-they-and-how-they-function) ## Related Jobs - [Software Engineer](https://www.wearedevelopers.com/jobs/ext/2596233-software-engineer) at **Twilio** - [Manager, Engineering, Secure Build and SCS Services](https://www.wearedevelopers.com/jobs/48447-manager-engineering-secure-build-and-scs-services) at **Docker, Inc.** - [Distributed Systems Engineer (L5) - Commerce Insights and Data Products Engineering](https://www.wearedevelopers.com/jobs/ext/2171431-distributed-systems-engineer-l5-commerce-insights-and-data-products-engineering) at **Twilio** - [Sr. Solution Architect](https://www.wearedevelopers.com/jobs/48433-sr-solution-architect) at **Dynatrace** - [Software Engineer-Platform Engineering (L3)](https://www.wearedevelopers.com/jobs/ext/2599346-software-engineer-platform-engineering-l3) at **Twilio** - [Mid/Senior Full-Stack Engineer (Web-first)](https://www.wearedevelopers.com/jobs/ext/1210833-mid-senior-full-stack-engineer-web-first) at **SMG Swiss Marketplace Group**