mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
文档更新,增加示例的说明和链接
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# 一、快速开始
|
||||
# 一.快速开始
|
||||
|
||||
liteflow需要你的项目使用maven
|
||||
## 1.1依赖
|
||||
@@ -72,7 +72,7 @@ Slot slot = executor.execute("demoChain", "arg");
|
||||
|
||||
如果你的项目使用spring,推荐参考[和Spring进行集成](https://bryan31.gitee.io/liteflow/#/?id=%e4%ba%8c%e3%80%81%e5%92%8cspring%e8%bf%9b%e8%a1%8c%e9%9b%86%e6%88%90)
|
||||
|
||||
# 二、和spring进行集成
|
||||
# 二.和spring进行集成
|
||||
|
||||
针对于使用了spring但没有使用springboot的项目
|
||||
|
||||
@@ -108,7 +108,7 @@ public class AComponent extends NodeComponent
|
||||
```
|
||||
然后你的项目中通过spring拿到执行器进行调用流程。
|
||||
|
||||
# 三、和Spring Boot集成
|
||||
# 三.和Spring Boot集成
|
||||
|
||||
## 3.1 依赖
|
||||
|
||||
@@ -134,7 +134,7 @@ liteflow.ruleSource=config/flow.xml
|
||||
|
||||
工程中的liteflow-test演示了如何在springboot下进行快速配置
|
||||
|
||||
# 四、和zookeeper进行集成
|
||||
# 四.和zookeeper进行集成
|
||||
|
||||
## 4.1spring配置
|
||||
|
||||
@@ -157,7 +157,7 @@ liteFlow支持把配置放在zk集群中,并支持实时修改流程
|
||||
如果你不加zkNode这个标签,就用默认的节点路径进行读取配置。
|
||||
使用这种方式加载配置,在zk上进行更改配置。liteFlow会实时刷新配置。
|
||||
|
||||
# 五、使用自定义的配置源
|
||||
# 五.使用自定义的配置源
|
||||
|
||||
## 5.1创建自定义配置源的类
|
||||
|
||||
@@ -189,7 +189,7 @@ spring中需要改的地方还是执行器的配置,只需要在配置的路
|
||||
</bean>
|
||||
```
|
||||
|
||||
# 六、架构设计
|
||||
# 六.架构设计
|
||||
|
||||
## 6.1组件编排式流程引擎架构设计
|
||||
|
||||
@@ -199,7 +199,7 @@ EPU:这里的epu对应的就是我们的执行器,用来统筹并处理handl
|
||||
Event Bus:事件总线,用来指定下一个命令是什么,该如何去执行处理单元。这里的时间总线由我们的配置构成
|
||||
Data Bus:数据总线,用来存储整个调用链里数据。每一个请求生成一个数据槽。一个数据里最多有1024个数据槽
|
||||
|
||||
# 七、接入详细指南
|
||||
# 七.接入详细指南
|
||||
|
||||
## 7.1执行器
|
||||
|
||||
@@ -315,9 +315,31 @@ a==>c==>m==>q==>p==>p1==>g
|
||||
liteFlow提供了简单的监控,目前只统计一个指标:每个组件的平均耗时
|
||||
每5分钟会打印一次,并且是根据耗时时长倒序排的。
|
||||
|
||||
# 八、未来版本计划
|
||||
# 八.示例工程
|
||||
|
||||
## 8.1测试工程
|
||||
|
||||
在项目内有2个简单的测试工程示例:
|
||||
|
||||
* liteflow-test-spring
|
||||
* liteflow-test-springboot
|
||||
|
||||
分别对应了spring和springboot环境下的示例工程,可以运行`Runner`进行启动(会连带启动测试用例)
|
||||
|
||||
## 8.2一个完整的案例
|
||||
|
||||
如果你想看一个实际的案例,加深对liteflow的理解。可以查看:
|
||||
|
||||
> [完整的带简单业务的案例](https://gitee.com/bryan31/liteflow-example)
|
||||
|
||||
这个案例为一个价格计算引擎,其目的是模拟了电商中对订单价格的计算,并且提供了一个简单的界面,建议大家去pull下来,仔细阅读下,这个业务用到了liteflow的大部分特性
|
||||
|
||||

|
||||
|
||||
# 九.未来版本计划
|
||||
|
||||
## 2.5版本
|
||||
|
||||
* 支持更多的表达式,重写表达式解析器
|
||||
* 重新设计数据总线,解决数据槽热点问题
|
||||
* 增加一种驱动模式:消息驱动的模式
|
||||
@@ -334,8 +356,10 @@ liteFlow提供了简单的监控,目前只统计一个指标:每个组件的
|
||||
## 3.0版本
|
||||
主要是规则引擎的进化,制定规则文件。完善表达式引擎。
|
||||
|
||||
# 八、更新记录
|
||||
# 十.更新记录
|
||||
|
||||
## 1.3.1更新日志
|
||||
|
||||
优化大量潜在的问题,此版本为稳定版本,主要更新点如下:
|
||||
* 增加条件节点功能
|
||||
* 优化异常捕获的日志打印
|
||||
@@ -373,9 +397,10 @@ liteFlow提供了简单的监控,目前只统计一个指标:每个组件的
|
||||
* 重构核心部分代码
|
||||
* 增加子流程显式调用
|
||||
|
||||
# 九、联系作者
|
||||
# 十一.联系作者
|
||||
|
||||
微信公众号<br>
|
||||

|
||||
<br><br>
|
||||
加微信群参与讨论<br>
|
||||

|
||||

|
||||
BIN
docs/media/example-web.png
Normal file
BIN
docs/media/example-web.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 450 KiB |
@@ -4,11 +4,11 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class FlowtestApplication {
|
||||
public class Runner {
|
||||
|
||||
public static void main(String[] args) {
|
||||
try{
|
||||
SpringApplication.run(FlowtestApplication.class, args);
|
||||
SpringApplication.run(Runner.class, args);
|
||||
|
||||
System.exit(0);
|
||||
}catch (Throwable t){
|
||||
Reference in New Issue
Block a user