Backend Development 8 min read

Design and Implementation of the Andon (Press‑Light) System for Quality Management at Zhuanzhuan

This article describes the background, system design, implementation details, and application scenarios of the Andon (press‑light) mechanism introduced at Zhuanzhuan, covering its modular architecture, workflow choices between state machine and chain‑of‑responsibility, core Java abstractions, and how it supports merchant service rating.

Zhuanzhuan Tech
Zhuanzhuan Tech
Zhuanzhuan Tech
Design and Implementation of the Andon (Press‑Light) System for Quality Management at Zhuanzhuan

The Andon (press‑light) mechanism originates from the Toyota Production System, emphasizing immediate stoppage of a production line when an abnormality is detected. Amazon adopted this concept in 2012 for its customer service system, and in 2022 Zhuanzhuan introduced a user‑driven Andon system to surface customer complaints and enforce quality improvements.

System design includes a dedicated Andon service that centralizes actions such as initiating an Andon, processing tickets, synchronizing appeal information, issuing execution commands, and tracking results. The service interacts with four modules—Business, Andon, Appeal, and Execution—each with distinct responsibilities to avoid resource waste, coupling, and inconsistent data formats.

For workflow implementation, Zhuanzhuan evaluated two patterns: a state‑machine approach and a responsibility‑chain approach. The state machine offers easy extensibility but high configuration complexity, while the responsibility chain provides clear code‑based configuration at the cost of potential performance degradation for long chains. Given the moderate chain length of Andon processes, the responsibility‑chain pattern was selected.

The core of the responsibility‑chain implementation is an abstract Java class defining the executor interface:

public abstract class AbstractAndonTicketProcessService {
    protected AbstractAndonTicketProcessService next;
    protected abstract void next();
    protected AndonProcessResult doNext(String logStr, AndonProcessContext context) {
        if (Objects.isNull(this.next)) {
            return AndonProcessResult.buildSuccess("执行成功");
        }
        return this.next.execute(logStr, context);
    }
    public abstract AndonProcessResult execute(String logStr, AndonProcessContext context);
}

Four trigger scenarios are defined: creating an Andon ticket, returning appeal results, returning penalty execution results, and returning recovery execution results. By separating executors by function, the system maximizes code reuse and flexibility.

The Andon strategy configures, for each source scenario, a set of commands (e.g., fines, learning tasks, merchant capability restrictions) and the timing for issuing them (immediate, after failed appeal, or upon deadline). Each source has a single strategy, and updates generate new templates that take effect on subsequent tickets.

In practice, the Andon system is applied to Zhuanzhuan's merchant service rating workflow, where issues such as product quality defects, delayed shipments, or unsatisfactory after‑sale service trigger Andon tickets that enforce corrective actions, thereby creating a positive feedback loop that improves overall shopping experience.

In summary, the Andon system provides Zhuanzhuan with a user‑driven quality management mechanism that integrates modular backend services, a lightweight responsibility‑chain workflow, and configurable strategies to ensure continuous improvement of merchant performance.

design patternsJavaworkflowbackend developmentquality managementAndon
Zhuanzhuan Tech
Written by

Zhuanzhuan Tech

A platform for Zhuanzhuan R&D and industry peers to learn and exchange technology, regularly sharing frontline experience and cutting‑edge topics. We welcome practical discussions and sharing; contact waterystone with any questions.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.