Loading...
Loading...
Compare original and translation side by side
版本对齐:本 skill 内容对齐 LiteFlow v2.16.X(约 v2.16.0)。不同小版本细节可能差异;作答时如涉及具体版本会标注。
Version Alignment: The content of this skill aligns with LiteFlow v2.16.X (approximately v2.16.0). Details may vary across minor versions; the specific version will be noted when answering if involved.
BaseTestliteflow-react-agentBaseTestliteflow-react-agent这是最重要的章节。绝不杜撰、绝不用网络内容充当 LiteFlow 行为依据。
Readreferences/<文件>.mdLITEFLOW_REPO~/openSource/liteFlow./liteFlowscripts/source-lookup.sh pathscripts/source-lookup.sh grep <关键词>*.javagrepallfind <名字>show <相对路径> [a-b]path:line"这部分内容不在我的内置知识里。我可以 git clone LiteFlow 官方仓库(gitee.com/dromara/liteFlow,默认tag,与内置内容对齐)到临时目录,从源码里确认后再回答。是否允许?"v2.16.0
scripts/source-lookup.sh clone~/.cache/liteflow-skillgrep/find/showpath:lineThis is the most important section. Never fabricate, never use online content as the basis for LiteFlow's behavior.
Readreferences/<file>.mdLITEFLOW_REPO~/openSource/liteFlow./liteFlowscripts/source-lookup.sh pathscripts/source-lookup.sh grep <keyword>*.javagrepallfind <name>show <relative path> [a-b]path:line"This content is not in my built-in knowledge. I can git clone the official LiteFlow repository (gitee.com/dromara/liteFlow, defaulttag, aligned with built-in content) to a temporary directory, confirm from the source code and then answer. Is this allowed?"v2.16.0
scripts/source-lookup.sh clone~/.cache/liteflow-skillgrep/find/showpath:linegit clonesource-lookup.sh clonegit clonesource-lookup.sh clone以下均经官方文档 + 源码核对。下方若仍不够,去对应 reference 查细节。
All the following content has been verified against official documentation + source code. If the following is still insufficient, check the corresponding reference for details.
references/el-rules.mdreferences/el-rules.md| 算子 | 语义 | 最小示例 |
|---|---|---|
| 串行 | |
| 并行(异步) | |
| 条件(x 为布尔组件/表达式;可 | |
| 选择(x 返回目标 nodeId) | |
| 次数循环(x 返回次数) | |
| 条件循环 | |
| 迭代循环(x 返回 Iterator) | |
| 循环中断(配合循环) | |
| 捕获 a 的异常交 b 处理 | |
| 重试 | |
| 超时控制 | |
| 前置 / 后置(始终执行) | |
| 布尔与/或/非(用于 IF 条件) | |
| 子变量(复用片段) | 见 el-rules.md |
| 节点修饰 | | |
| 链路继承 | | 见 el-rules.md |
ignoreErroranymust(a,b)percentage(n)flow.xmlflow.jsonflow.el<chain name="..."> ... </chain>| Operator | Semantics | Minimal Example |
|---|---|---|
| Serial | |
| Parallel (asynchronous) | |
| Condition (x is a boolean component/expression; supports | |
| Selection (x returns target nodeId) | |
| Count loop (x returns the number of times) | |
| Condition loop | |
| Iterator loop (x returns Iterator) | |
| Loop interruption (used with loops) | |
| Catch exceptions of a and pass to b for processing | |
| Retry | |
| Timeout control | |
| Pre / Post (always executed) | |
| Boolean AND/OR/NOT (used for IF conditions) | |
| Sub-variable (reuse fragments) | See el-rules.md |
| Node modifiers | | |
| Link inheritance | | See el-rules.md |
ignoreErroranymust(a,b)percentage(n)flow.xmlflow.jsonflow.el<chain name="..."> ... </chain>references/components.mdreferences/components.md| 想要的行为 | 用哪种组件 | 关键方法/注解 |
|---|---|---|
| 普通处理 | | |
| 多路选择(返回 nodeId) | | |
| 布尔判断(IF/WHILE 条件) | | |
| 次数循环 | | |
| 迭代循环 | | |
| 声明式(不继承基类) | | 方法加 |
@LiteflowComponent("nodeId")name@LiteflowMethodisAccess()beforeProcess()afterProcess()onSuccess()onError()isContinueOnError()isEnd()rollback()this.getContextBean(XxxContext.class)this.getFirstContextBean()this.getRequestData()| Desired Behavior | Component Type | Key Method/Annotation |
|---|---|---|
| Normal processing | | |
| Multi-way selection (returns nodeId) | | |
| Boolean judgment (IF/WHILE condition) | | |
| Count loop | | |
| Iterator loop | | |
| Declarative (no base class inheritance) | Register Bean with | Add |
@LiteflowComponent("nodeId")name@LiteflowMethodisAccess()beforeProcess()afterProcess()onSuccess()onError()isContinueOnError()isEnd()rollback()this.getContextBean(XxxContext.class)this.getFirstContextBean()this.getRequestData()references/executor.mdreferences/executor.md@Resource private FlowExecutor flowExecutor;
// 同步执行:chainId + 入参 + 多个上下文 Class(框架实例化)
LiteflowResponse resp = flowExecutor.execute2Resp("chain1", param, OrderContext.class, UserContext.class);
// 直接执行一段 EL(v2.15.0+,无需规则文件)
LiteflowResponse resp2 = flowExecutor.execute2RespWithEL("THEN(a, b, c)", param, OrderContext.class);
// 异步 / 路由
Future<LiteflowResponse> f = flowExecutor.execute2Future("chain1", param, OrderContext.class);
List<LiteflowResponse> rs = flowExecutor.executeRouteChain(param, OrderContext.class);LiteflowResponse| 需求 | 方法 |
|---|---|
| 是否成功 | |
| 失败异常 | |
| 异常 code/message | |
| 上下文 | |
| 步骤字符串(带耗时) | |
| 结构化步骤 | |
| 请求/会话/链路 ID | |
| 超时节点(v2.12.3+) | |
| 回滚步骤 | |
@Resource private FlowExecutor flowExecutor;
// Synchronous execution: chainId + input parameter + multiple context Classes (instantiated by framework)
LiteflowResponse resp = flowExecutor.execute2Resp("chain1", param, OrderContext.class, UserContext.class);
// Directly execute a segment of EL (v2.15.0+, no rule file required)
LiteflowResponse resp2 = flowExecutor.execute2RespWithEL("THEN(a, b, c)", param, OrderContext.class);
// Asynchronous / Routing
Future<LiteflowResponse> f = flowExecutor.execute2Future("chain1", param, OrderContext.class);
List<LiteflowResponse> rs = flowExecutor.executeRouteChain(param, OrderContext.class);LiteflowResponse| Requirement | Method |
|---|---|
| Whether successful | |
| Failure exception | |
| Exception code/message | |
| Context | |
| Step string (with time consumption) | |
| Structured steps | |
| Request/session/link ID | |
| Timeout nodes (v2.12.3+) | |
| Rollback steps | |
references/config.mdliteflow.*references/config.mdliteflow.*| key | 默认 | 说明 |
|---|---|---|
| — | 规则文件路径,用规则文件时必填;改为代码动态构造时自动失效 |
| | 另有 |
| | 上下文槽位数,自动扩容 |
| | WHEN 并行整体超时 |
| | 全局异步节点并发上限 |
| | 多种规则来源混装时设 true |
| | 本地规则文件变更自动重载 |
| | 快速解析模式 |
| | 仅 JDK21+ 生效 |
| | 执行过程日志 |
| | 简易监控统计 |
⚠️ v2.16.X 不存在这些配置名,勿臆造:(并发由whenMaxWorkers控制)、global-thread-pool-size(应为printExecutionResult)、print-execution-log。chainCache*
| key | Default | Description |
|---|---|---|
| — | Rule file path, required when using rule files; automatically invalid when changed to code dynamic construction |
| | Also available |
| | Context slot count, automatically expands |
| | Overall timeout for WHEN parallel execution |
| | Global asynchronous node concurrency limit |
| | Set to true when mixing multiple rule sources |
| | Auto-reload when local rule files change |
| | Fast parsing mode |
| | Only takes effect for JDK21+ |
| | Execution process log |
| | Simple monitoring statistics |
⚠️ These configuration names do not exist in v2.16.X, do not fabricate:(concurrency is controlled bywhenMaxWorkers),global-thread-pool-size(should beprintExecutionResult),print-execution-log.chainCache*
Readreferences/| 问题类型 / 关键词 | 加载文件 |
|---|---|
| 框架定位、执行模型、模块地图、版本/JDK 支持、性能 | |
| 安装运行、Hello World(SpringBoot/Spring/Solon/其他) | |
| 全部配置项、各场景差异、LiteflowConfig | |
| 组件(继承式 5 种 / 声明式 / 生命周期钩子) | |
| EL 全语法、组件参数语法、重试/超时/继承/验证 | |
| 数据上下文、别名、参数注入、表达式取参 | |
| FlowExecutor 方法、入参、LiteflowResponse | |
| 测试用例与示例(测试范式、BaseTest 清理、功能→测试模块速查、DEMO) | |
| 脚本组件、各语言坐标、绑定变量、动态刷新/验证/卸载 | |
| 规则配置源(本地/SQL/ZK/Nacos/Etcd/Apollo/Redis/自定义) | |
| 元数据操作器、平滑热刷新、启动不检查 | |
| 异步线程池(FlowExecutor 层/组件异步层/虚拟线程) | |
| 动态构造 Node/EL/Chain | |
| 决策路由(概念/用法/executeRouteChain) | |
| 框架级生命周期(启动时/执行时钩子接口) | |
| 高级特性(降级/回滚/切面/隐式子流程/步骤/监控…18 项) | |
AI Agent 编排(ReAct Agent 组件、模型/凭据、自定义工具、流式输出、会话记忆、 | |
| 源码细节(FlowExecutor/FlowBus/DataBus/Condition 树/算子→类映射) | |
| 常见坑与 FAQ | |
Readreferences/| Question Type / Keywords | Load File |
|---|---|
| Framework positioning, execution model, module map, version/JDK support, performance | |
| Installation and operation, Hello World (SpringBoot/Spring/Solon/others) | |
| All configuration items, scenario differences, LiteflowConfig | |
| Components (5 inherited types / declarative / lifecycle hooks) | |
| Full EL syntax, component parameter syntax, retry/timeout/inheritance/validation | |
| Data context, aliases, parameter injection, expression parameter retrieval | |
| FlowExecutor methods, input parameters, LiteflowResponse | |
| Test cases and examples (testing paradigm, BaseTest cleanup, feature→test module quick reference, DEMO) | |
| Script components, coordinates for various languages, bound variables, dynamic refresh/validation/uninstallation | |
| Rule configuration sources (local/SQL/ZK/Nacos/Etcd/Apollo/Redis/custom) | |
| Metadata operator, smooth hot refresh, no startup check | |
| Asynchronous thread pools (FlowExecutor layer/component asynchronous layer/virtual threads) | |
| Dynamic construction of Node/EL/Chain | |
| Decision routing (concept/usage/executeRouteChain) | |
| Framework-level lifecycle (startup/execution hook interfaces) | |
| Advanced features (downgrade/rollback/aspect/implicit sub-process/steps/monitoring...18 items) | |
AI Agent orchestration (ReAct Agent components, model/credentials, custom tools, streaming output, session memory, | |
| Source code details (FlowExecutor/FlowBus/DataBus/Condition tree/operator→class mapping) | |
| Common pitfalls and FAQ | |
references/el-rules.mdpath:linereferences/code-internals.mdreferences/el-rules.mdpath:linereferences/code-internals.mdscripts/source-lookup.shscripts/source-lookup.sh| 子命令 | 作用 |
|---|---|
| 打印解析到的本地仓库路径(找不到退出码 2,不克隆) |
| 显式克隆 gitee 仓库到缓存(默认 |
| 在仓库 |
| 在仓库所有文件中检索 |
| 按文件名查找 |
| 显示某文件(带行号,可选区间) |
LITEFLOW_REPOLITEFLOW_TAGv2.16.0LITEFLOW_TAG=LITEFLOW_CACHE~/.cache/liteflow-skill| Subcommand | Function |
|---|---|
| Print the path of the detected local repository (exit code 2 if not found, no cloning) |
| Explicitly clone the gitee repository to cache (default |
| Search in |
| Search in all files of the repository |
| Search by file name |
| Display a file (with line numbers, optional range) |
LITEFLOW_REPOLITEFLOW_TAGv2.16.0LITEFLOW_TAG=LITEFLOW_CACHE~/.cache/liteflow-skill