How Lalamove Replaced Scattered if/else Logic with a Visual Rule Engine
Most teams manage business rules through a combination of hard-coded conditionals and unstructured config-center entries, which makes frequent policy changes risky and slow. Lalamove’s approach shows how to retrofit governance—approval, dual-run comparison, grayscale rollout, snapshot rollback—onto a local rule-execution SDK so that business operators can change rules without a code release and without blowing up production.
Frequent business rule changes—whether an address edit is allowed, which risk strategy fires, or how an invoice switch behaves—often degenerate into tangled if/else blocks or brittle JSON blobs in a config center. Lalamove’s rule visualization platform replaces that with a management console where operators compose rules from typed fields, reusable judgment components, and EL-orchestrated chains. The console enforces test-case validation before any rule ships.
Under the hood, the platform separates the management plane from the runtime plane. Rules are published as Chain JSON to Apollo, pulled and cached by a configuration SDK inside each business service, and executed locally by a rule SDK built on LiteFlow. That local execution keeps latency low and avoids a hard dependency on a remote rule service. Every release generates a snapshot, and risky changes can first run in a shadow compare mode or roll out through percentage-based grayscale switching.
Since going live, the platform has cut the cost of policy changes that previously required code releases, made rule changes auditable and instantly rollbackable, and begun accumulating a cross-domain library of reusable fields and components. The core insight is that a rule engine’s value comes less from the visual editor and more from the governance wrap around it: verify before publish, approve with change diffs, dual-run to observe impact, and roll back with a single click.
Lalamove deliberately chose not to build a remote rule-execution service; local SDK execution keeps latency predictable and avoids a new single point of failure.
The platform’s real differentiator is not the visual editor but the governance pipeline—test, approve, dual-run, grayscale, snapshot-rollback—that wraps every rule change.
Using LiteFlow as the execution kernel is a pragmatic choice: it lets the team focus on rule-asset management and release governance instead of reinventing a process engine.
Registering a shadow compare chain automatically for every chain key means dual-run capability is a platform primitive, not an afterthought bolted onto specific rules.
The fallback from a grayscale release version to a default version in the config server prevents a silent empty-config bug when a targeted rollout key is missing.