Strategy Center Design and System Architecture Using LiteFlow
This article outlines the background, objectives, and system design of a strategy center for a recycling business, detailing how the LiteFlow rule engine enables modular, hot‑plugable workflow configuration, visual canvas support, node editing, and future plans for data dictionaries, security, and visual configuration back‑ends.
1 Background
The recycling business has grown rapidly, and under the three fulfillment modes of mail, door‑to‑door, and store, the business logic has become increasingly complex. Although the business is the same, many concepts are shared across fulfillment methods. To avoid duplicated effort and to align standards across the three fronts, a business middle‑platform was established, including a strategy center that aims to unify strategy management while supporting personalized configurations.
2 Strategy Center
The recycling business has long used price‑guarantee subsidy strategies, which improve order conversion rates and NPS. Consequently, various fulfillment lines have integrated price‑guarantee capabilities. Determining whether an order meets the subsidy policy requires a series of validations, typically implemented as independent functional nodes.
Simple flow of price‑guarantee subsidy validation
Our goal is to leverage the strategy center to offload subsidy logic, make it reusable across multiple business lines, hot‑pluggable, and reduce development costs. Starting from subsidy strategy consolidation, we aim to build a platform that provides standard capabilities that are both generic and adaptable to business‑specific needs.
Strategy Center Architecture
3 System Design
To facilitate management of strategy processes, we chose the LiteFlow framework.
3.1 LiteFlow
LiteFlow is a rule engine with orchestration characteristics; we can define each module as an independent component, allowing arbitrary workflow composition while keeping components decoupled.
Component : A component corresponds to a Node in our workflow. After version v2.12.0, there are three component types: ordinary, choice, and boolean.
Process : The workflow assembled by EL rules applied to component nodes.
LiteFlow Architecture
Other advantages of LiteFlow:
Comprehensive official documentation : The documentation is concise and well‑structured.
Hot‑plug : EL expressions can be changed at any time, enabling dynamic workflow adjustments and supporting smooth hot refresh.
Flexible data source configuration : Supports most common data sources such as Apollo and MySQL.
Active community : The author answers developers' questions daily in the community group.
3.2 Strategy Execution Process
With LiteFlow, we can create different subsidy strategies for various business scenarios. For example, when collaborating with external partners for recycling, we may want to skip the verification of a user's historical subsidy count to increase subsidy rates; we can configure a separate flow without that check for that specific line.
Strategy Execution Process
3.3 Canvas
To more conveniently manage our strategy processes, we want to operate and modify them via a backend, but LiteFlow does not support visual orchestration, so we independently developed a canvas feature to meet this need.
Backend Canvas
3.4 Node
Different strategy processes may require different node configurations. For instance, the default subsidy validity is seven days, but some processes need a longer period; therefore we implemented node editing capabilities to allow special configuration per node.
Editing Node Properties
When configuration changes are needed, locate the corresponding strategy chain and click the relevant node to modify its strategy settings.
Changing Process Node Configuration
4 Future Plans
Data Dictionary : We will design a data dictionary to simplify the definition of strategy input and output parameters.
Security : Because core strategies are critical, we will strengthen management through monitoring, version chains, and approval workflows.
Visual Configuration Backend : Currently the company supports two visual configuration backends (easyui and candy); we need to explore a suitable way to integrate existing architecture capabilities into them for zero‑code node configuration.
About the Author
Dos, R&D Engineer, ZuanZuan C2B Business
ZuanZuan R&D Center and industry peers' technical learning exchange platform regularly shares frontline practical experience and cutting‑edge technology topics. Follow the public accounts "ZuanZuan Technology" (comprehensive), "Big ZuanZuan FE" (frontend focus), and "ZuanZuan QA" (QA focus) for more practical content and open discussion.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
