mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
更新readme
This commit is contained in:
29
README.md
29
README.md
@@ -1,9 +1,10 @@
|
||||
### 概述
|
||||
liteFlow是一个轻量级的组件式流程框架,帮助解耦业务代码,让每一个业务片段都是一个组件
|
||||
|
||||
* 提供本地xml的流程配置。
|
||||
* 提供本地xml的流程配置(后续全面支持spring式流程配置)
|
||||
* 提供基于spring的扫描方式注入component
|
||||
* 提供串行和并行2种模式。
|
||||
* 引入classfinder机制,组件自动注册。
|
||||
* 提供条件节点的模式。
|
||||
* 消除组件之间参数传递,引入数据总线概念。
|
||||
* 自带简单的监控,能够知道每个组件的运行平均时间。消耗内存。(每隔10分钟会自动打印)
|
||||
|
||||
@@ -13,6 +14,7 @@ liteFlow是一个轻量级的组件式流程框架,帮助解耦业务代码,
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow>
|
||||
<!-- 如果和spring集成,以下<nodes>配置可以不要 -->
|
||||
<nodes>
|
||||
<node id="a" class="com.thebeastshop.liteflow.test.component.AComponent"/>
|
||||
<node id="b" class="com.thebeastshop.liteflow.test.component.BComponent"/>
|
||||
@@ -28,8 +30,13 @@ liteFlow是一个轻量级的组件式流程框架,帮助解耦业务代码,
|
||||
<when value="b,d"/> <!-- when代表并行 -->
|
||||
<then value="e,f,g"/>
|
||||
</chain>
|
||||
|
||||
|
||||
<chain name="chain2">
|
||||
<then value="a,cond(b|d)"/> <!-- cond节点是条件节点,根据cond节点路由到b节点或者d节点 -->
|
||||
<then value="e,f,g"/>
|
||||
</chain>
|
||||
|
||||
<chain name="chain3">
|
||||
<then value="a,c,g"/>
|
||||
<when value="b,e"/>
|
||||
<then value="d,f"/>
|
||||
@@ -39,12 +46,16 @@ liteFlow是一个轻量级的组件式流程框架,帮助解耦业务代码,
|
||||
3.spring里声明执行器
|
||||
```xml
|
||||
<bean id="flowExecutor" class="com.thebeastshop.liteflow.core.FlowExecutor" init-method="init">
|
||||
<property name="rulePath">
|
||||
<list>
|
||||
<value>flow.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<property name="rulePath">
|
||||
<list>
|
||||
<value>flow.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 自动扫描注入到spring的component组件 -->
|
||||
<bean class="com.thebeastshop.liteflow.spring.ComponentScaner"/>
|
||||
|
||||
```
|
||||
4.开始一个流程
|
||||
```java
|
||||
|
||||
Reference in New Issue
Block a user