← Back to Concept Contrast

Concept Contrast Fable

Workflows and workflow engines

Conclusion first:A workflow is the definition of a set of business steps—first approval, then payment, then shipment. A workflow engine is the software that executes this definition—it understands the dependencies between steps, manages state transitions, and handles timeouts and exceptions. You can draw a perfect workflow on a whiteboard, but if there is no engine to run it, the arrows drawn on paper will not move by themselves. Many people treat finishing the workflow diagram as if the system were already live, but in reality there is still a complete engineering implementation between finishing the diagram and getting it running.

A workflow is the definition of a set of business steps—first approval, then payment, then shipment. A workflow engine is the software that executes this definition—it understands the dependencies between steps, manages state transitions, and handles timeouts and exceptions. You can draw a perfect workflow on a whiteboard, but if there is no engine to run it, the arrows drawn on paper will not move by themselves. Many people treat finishing the workflow diagram as if the system were already live, but in reality there is still a complete engineering implementation between finishing the diagram and getting it running.

Fable

Sheet music and a player piano

Old Jin, a composition professor at the conservatory, spent half a year writing a piano suite, with exquisite scores, complex harmonic arrangements, and tempo markings precise down to every measure. The department printed the score as a textbook and distributed it to piano majors at twenty conservatories nationwide, asking each student to play it once and send back a recording.

Three months later, twenty recordings came back. Old Jin watched them all and found that not one was played exactly as written in the score. Some were half a beat slow at tempo changes, some forgot to make dynamic changes in repeated passages, and some pressed the pedal in the wrong places. The same score produced twenty different results from twenty people.

Old Jin complained to Old Wen, a professor at the engineering school: the score is written so clearly, why is the result so different when played. Old Wen said: because your score is a set of instructions, not a machine. Instructions tell a person what to do, but do not guarantee he can do it, does it right, or does it the same way. You need a music box.

Old Wen showed Old Jin around his laboratory: a self-playing piano. Old Jin converted the score into a digital format and input it, and the piano played by itself, exactly the same every time. Tempo changes were precise, dynamics were consistent, and pedal timing was flawless. After listening to the automatic performance of his own work, Old Jin was silent for a long time — it was the first time he heard what it sounded like when his score was executed with perfect accuracy.

Old Jin asked Old Wen: what's the difference between this machine and an ordinary piano. Old Wen said: an ordinary piano only provides sound; how it sounds depends on the person. The player piano adds three things: first, an instruction parser—converting score symbols into execution actions. Second, a state manager—knowing which measure it's playing now and what the next beat is. Third, an exception handler—if a mechanical finger gets stuck, it knows whether to skip or retry. These three things together are called the execution engine.

After returning, Old Jin added a sentence to the preface of the textbook: the score defines what the music should be like, and the performance engine ensures the music actually comes out that way. Learning the score teaches you how to design the process; learning the engine teaches you how to turn the process into a deterministic result. The two courses used to be taught as one; starting with this cohort, they were split into two.

A student asked Old Jin: If I can play the piano myself, do I still need automatic performance? Old Jin said: You play alone, and each time you can play differently—that is manual execution. You want twenty people at the same time, in different locations, executing by the same standard—that is system execution. A score can be photocopied; execution capability cannot.

Old Wen later organized the technical principles of the self-playing piano into a paper titled: "From Precision of Definition to Certainty of Execution." The abstract read: many systems fail because they treat "designed correctly" and "executed correctly" as the same thing. Design correctness depends on talent; execution correctness depends on the engine.

Workflow

An abstract definition of a set of business steps and their order, conditions, and dependencies. It is a description of "what to do and in what order," and is not responsible for execution.

Workflow engine

A software system that parses workflow definitions, manages state transitions, schedules task execution, and handles exceptions and timeouts. It is the execution layer for "how to ensure it runs as defined and how to handle errors."

Story Mapping

  • Old Jin's suite score: workflow—a precise definition of steps and order.
  • The self-playing piano: a workflow engine—a software system that ensures definitions are executed precisely.
  • The same score with twenty different results: without an engine, a workflow definition cannot guarantee consistent execution.
  • Instruction parsing, state management, exception handling: the three core capabilities of a workflow engine.
  • Split into two courses: design and execution are two separate engineering problems and need to be treated separately.

In the project

When drawing a workflow, consider in parallel which engine will execute it. Without an engine choice, the flow you draw is just a piece of paper. When choosing an engine, focus on three things: state persistence—whether context can be reliably saved between steps; exception handling—whether timeouts, retries, compensation, and human intervention are covered; and observability—whether each step's execution status, duration, and failure reason can be traced. Choose the wrong engine, and even the most ingenious workflow design cannot run deterministically.

京ICP备2026014272号