diff --git a/blade-biz-common/pom.xml b/blade-biz-common/pom.xml
index 7d073a046..464e92354 100644
--- a/blade-biz-common/pom.xml
+++ b/blade-biz-common/pom.xml
@@ -5,7 +5,7 @@
BladeX-Biz
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example-api/blade-dubbo-provider-api/pom.xml b/blade-example-api/blade-dubbo-provider-api/pom.xml
index 8825a111f..b5195ca7d 100644
--- a/blade-example-api/blade-dubbo-provider-api/pom.xml
+++ b/blade-example-api/blade-dubbo-provider-api/pom.xml
@@ -5,7 +5,7 @@
blade-example-api
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example-api/blade-stream-api/pom.xml b/blade-example-api/blade-stream-api/pom.xml
index b8a4dc2cc..861d6ce6c 100644
--- a/blade-example-api/blade-stream-api/pom.xml
+++ b/blade-example-api/blade-stream-api/pom.xml
@@ -5,7 +5,7 @@
blade-example-api
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example-api/pom.xml b/blade-example-api/pom.xml
index 6b06577a9..6dee62954 100644
--- a/blade-example-api/pom.xml
+++ b/blade-example-api/pom.xml
@@ -5,13 +5,13 @@
BladeX-Biz
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
blade-example-api
${project.artifactId}
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
pom
BladeX 微服务范例API集合
diff --git a/blade-example/blade-dubbo-consumer/pom.xml b/blade-example/blade-dubbo-consumer/pom.xml
index 71d1a9ec9..39fcab08d 100644
--- a/blade-example/blade-dubbo-consumer/pom.xml
+++ b/blade-example/blade-dubbo-consumer/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-dubbo-provider/pom.xml b/blade-example/blade-dubbo-provider/pom.xml
index 6dc6582b5..eecbc64bd 100644
--- a/blade-example/blade-dubbo-provider/pom.xml
+++ b/blade-example/blade-dubbo-provider/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-easypoi/pom.xml b/blade-example/blade-easypoi/pom.xml
index b319101b4..ea4c113a7 100644
--- a/blade-example/blade-easypoi/pom.xml
+++ b/blade-example/blade-easypoi/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-mq-kafka/pom.xml b/blade-example/blade-mq-kafka/pom.xml
index 853540933..f32e7a04c 100644
--- a/blade-example/blade-mq-kafka/pom.xml
+++ b/blade-example/blade-mq-kafka/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-mq-rabbit/pom.xml b/blade-example/blade-mq-rabbit/pom.xml
index 48264cbd6..1624ec480 100644
--- a/blade-example/blade-mq-rabbit/pom.xml
+++ b/blade-example/blade-mq-rabbit/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-seata-order/pom.xml b/blade-example/blade-seata-order/pom.xml
index 2c199382e..5db5b2d00 100644
--- a/blade-example/blade-seata-order/pom.xml
+++ b/blade-example/blade-seata-order/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-seata-storage/pom.xml b/blade-example/blade-seata-storage/pom.xml
index ad61afb49..cb07e0917 100644
--- a/blade-example/blade-seata-storage/pom.xml
+++ b/blade-example/blade-seata-storage/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-sharding-jdbc/pom.xml b/blade-example/blade-sharding-jdbc/pom.xml
index 2b9a15a52..17dee8d9a 100644
--- a/blade-example/blade-sharding-jdbc/pom.xml
+++ b/blade-example/blade-sharding-jdbc/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-stream-consumer/pom.xml b/blade-example/blade-stream-consumer/pom.xml
index a718cfcda..96e9f1b3b 100644
--- a/blade-example/blade-stream-consumer/pom.xml
+++ b/blade-example/blade-stream-consumer/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-stream-provider/pom.xml b/blade-example/blade-stream-provider/pom.xml
index 1cc6d4106..911c6caec 100644
--- a/blade-example/blade-stream-provider/pom.xml
+++ b/blade-example/blade-stream-provider/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/blade-websocket/pom.xml b/blade-example/blade-websocket/pom.xml
index e7d6f7a03..68f651eb7 100644
--- a/blade-example/blade-websocket/pom.xml
+++ b/blade-example/blade-websocket/pom.xml
@@ -5,7 +5,7 @@
blade-example
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-example/pom.xml b/blade-example/pom.xml
index 572be62ec..c3d72a92d 100644
--- a/blade-example/pom.xml
+++ b/blade-example/pom.xml
@@ -5,13 +5,13 @@
BladeX-Biz
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
blade-example
${project.artifactId}
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
pom
BladeX 微服务范例集合
diff --git a/blade-gateway/pom.xml b/blade-gateway/pom.xml
index 284bc2a47..9974dbbdf 100644
--- a/blade-gateway/pom.xml
+++ b/blade-gateway/pom.xml
@@ -5,7 +5,7 @@
BladeX-Biz
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-ops/blade-xxljob-admin/pom.xml b/blade-ops/blade-xxljob-admin/pom.xml
index 0c5e7f970..a62ff2226 100644
--- a/blade-ops/blade-xxljob-admin/pom.xml
+++ b/blade-ops/blade-xxljob-admin/pom.xml
@@ -3,7 +3,7 @@
blade-ops
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-ops/blade-xxljob/pom.xml b/blade-ops/blade-xxljob/pom.xml
index 27d7ee863..284fbf882 100644
--- a/blade-ops/blade-xxljob/pom.xml
+++ b/blade-ops/blade-xxljob/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
blade-xxljob
diff --git a/blade-ops/pom.xml b/blade-ops/pom.xml
index 26d9e8c26..113c7cc4e 100644
--- a/blade-ops/pom.xml
+++ b/blade-ops/pom.xml
@@ -5,13 +5,13 @@
BladeX-Biz
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
blade-ops
${project.artifactId}
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
pom
diff --git a/blade-service-api/blade-demo-api/pom.xml b/blade-service-api/blade-demo-api/pom.xml
index e28639011..6162ca6c0 100644
--- a/blade-service-api/blade-demo-api/pom.xml
+++ b/blade-service-api/blade-demo-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
diff --git a/blade-service-api/pom.xml b/blade-service-api/pom.xml
index 0ceb4be78..5213e1f3c 100644
--- a/blade-service-api/pom.xml
+++ b/blade-service-api/pom.xml
@@ -5,14 +5,14 @@
BladeX-Biz
org.springblade
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
blade-service-api
${project.artifactId}
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
pom
BladeX 微服务API集合
diff --git a/blade-service/blade-demo/pom.xml b/blade-service/blade-demo/pom.xml
index ffb36ce1a..9e2e74880 100644
--- a/blade-service/blade-demo/pom.xml
+++ b/blade-service/blade-demo/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-service
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
4.0.0
@@ -42,6 +42,10 @@
com.baomidou
dynamic-datasource-spring-boot-starter
+
+ org.springblade
+ blade-starter-liteflow
+
org.springblade
blade-core-test
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java
index 0ee61e740..1d5f0aa87 100644
--- a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java
@@ -40,7 +40,7 @@ public class DemoController {
/**
* 需要导入blade-demo-dev.yaml文件至nacos
*/
- @Value("${demo.name}")
+ @Value("${demo.name:1}")
private String name;
private final DemoProperties properties;
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/rule/AbizRule.java b/blade-service/blade-demo/src/main/java/com/example/demo/rule/AbizRule.java
new file mode 100644
index 000000000..1184d215f
--- /dev/null
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/rule/AbizRule.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.example.demo.rule;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import lombok.extern.slf4j.Slf4j;
+
+
+/**
+ * A业务
+ *
+ * @author Chill
+ */
+@Slf4j
+@LiteflowComponent(id = "abizRule", name = "A业务")
+public class AbizRule extends NodeComponent {
+ @Override
+ public void process() throws Exception {
+
+ log.info("A业务执行完毕");
+
+ }
+
+}
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/rule/BbizRule.java b/blade-service/blade-demo/src/main/java/com/example/demo/rule/BbizRule.java
new file mode 100644
index 000000000..497940afa
--- /dev/null
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/rule/BbizRule.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.example.demo.rule;
+
+import com.example.demo.rule.context.BizContext;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeSwitchComponent;
+import lombok.extern.slf4j.Slf4j;
+
+
+/**
+ * A业务
+ *
+ * @author Chill
+ */
+@Slf4j
+@LiteflowComponent(id = "bbizRule", name = "B业务")
+public class BbizRule extends NodeSwitchComponent {
+
+ @Override
+ public String processSwitch() throws Exception {
+ // 获取上下文
+ BizContext contextBean = this.getContextBean(BizContext.class);
+ // 获取条件
+ Boolean isPublish = contextBean.getIsPublish();
+ log.info("B业务执行判断");
+ // 进行节点判断
+ if (isPublish) {
+ return "cbizRule";
+ } else {
+ return "dbizRule";
+ }
+ }
+}
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/rule/CbizRule.java b/blade-service/blade-demo/src/main/java/com/example/demo/rule/CbizRule.java
new file mode 100644
index 000000000..0a4df053d
--- /dev/null
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/rule/CbizRule.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.example.demo.rule;
+
+import com.example.demo.rule.context.BizContext;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import lombok.extern.slf4j.Slf4j;
+
+
+/**
+ * A业务
+ *
+ * @author Chill
+ */
+@Slf4j
+@LiteflowComponent(id = "cbizRule", name = "C业务")
+public class CbizRule extends NodeComponent {
+ @Override
+ public void process() throws Exception {
+ // 获取上下文
+ BizContext contextBean = this.getContextBean(BizContext.class);
+ // 修改上下文
+ contextBean.setName(contextBean.getName() + "-> C");
+
+ log.info("C业务执行完毕");
+
+ }
+
+}
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/rule/DbizRule.java b/blade-service/blade-demo/src/main/java/com/example/demo/rule/DbizRule.java
new file mode 100644
index 000000000..4b73f5636
--- /dev/null
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/rule/DbizRule.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.example.demo.rule;
+
+import com.example.demo.rule.context.BizContext;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import lombok.extern.slf4j.Slf4j;
+
+
+/**
+ * A业务
+ *
+ * @author Chill
+ */
+@Slf4j
+@LiteflowComponent(id = "dbizRule", name = "D业务")
+public class DbizRule extends NodeComponent {
+ @Override
+ public void process() throws Exception {
+ // 获取上下文
+ BizContext contextBean = this.getContextBean(BizContext.class);
+ // 修改上下文
+ contextBean.setName(contextBean.getName() + "-> D");
+
+ log.info("D业务执行完毕");
+
+
+ }
+
+}
diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/rule/context/BizContext.java b/blade-service/blade-demo/src/main/java/com/example/demo/rule/context/BizContext.java
new file mode 100644
index 000000000..ad490d49c
--- /dev/null
+++ b/blade-service/blade-demo/src/main/java/com/example/demo/rule/context/BizContext.java
@@ -0,0 +1,21 @@
+package com.example.demo.rule.context;
+
+import lombok.Data;
+
+/**
+ * 上下文类
+ *
+ * @author Chill
+ */
+@Data
+public class BizContext {
+
+ private Long id;
+
+ private String name;
+
+ private Integer category;
+
+ private Boolean isPublish;
+
+}
diff --git a/blade-service/blade-demo/src/main/resources/liteflow/demo.el.xml b/blade-service/blade-demo/src/main/resources/liteflow/demo.el.xml
new file mode 100644
index 000000000..2330ec6d3
--- /dev/null
+++ b/blade-service/blade-demo/src/main/resources/liteflow/demo.el.xml
@@ -0,0 +1,9 @@
+
+
+
+ THEN(
+ abizRule,
+ SWITCH(bbizRule).TO(cbizRule, dbizRule)
+ );
+
+
diff --git a/blade-service/blade-demo/src/test/java/LiteFlowTest.java b/blade-service/blade-demo/src/test/java/LiteFlowTest.java
new file mode 100644
index 000000000..3b54f5c2e
--- /dev/null
+++ b/blade-service/blade-demo/src/test/java/LiteFlowTest.java
@@ -0,0 +1,44 @@
+import com.example.demo.DemoApplication;
+import com.example.demo.rule.context.BizContext;
+import com.yomahub.liteflow.core.FlowExecutor;
+import com.yomahub.liteflow.flow.LiteflowResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.springblade.core.test.BladeBootTest;
+import org.springblade.core.test.BladeSpringExtension;
+import org.springblade.core.tool.jackson.JsonUtil;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import javax.annotation.Resource;
+
+/**
+ * LiteFlow单元测试
+ *
+ * @author Chill
+ */
+@Slf4j
+@ExtendWith(BladeSpringExtension.class)
+@SpringBootTest(classes = DemoApplication.class)
+@BladeBootTest(appName = "blade-demo", profile = "test", enableLoader = true)
+public class LiteFlowTest {
+ @Resource
+ private FlowExecutor flowExecutor;
+
+ @Test
+ public void contextLoads() {
+ // 构建上下文
+ BizContext bizContext = new BizContext();
+ bizContext.setId(1L);
+ bizContext.setName("测试名称");
+ bizContext.setCategory(1);
+ bizContext.setIsPublish(Boolean.TRUE);
+ // 启动 demoChain 的规则引擎
+ LiteflowResponse resp = flowExecutor.execute2Resp("demoChain", null, bizContext);
+ if (resp.isSuccess()) {
+ BizContext contextBean = resp.getContextBean(BizContext.class);
+ log.info(JsonUtil.toJson(contextBean));
+ }
+ }
+
+}
diff --git a/blade-service/pom.xml b/blade-service/pom.xml
index 721020f85..e41129bd7 100644
--- a/blade-service/pom.xml
+++ b/blade-service/pom.xml
@@ -7,12 +7,12 @@
org.springblade
BladeX-Biz
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
blade-service
${project.artifactId}
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
pom
BladeX 微服务集合
diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml
index 4d0e77d01..31534c7fd 100644
--- a/doc/nacos/blade.yaml
+++ b/doc/nacos/blade.yaml
@@ -68,7 +68,7 @@ knife4j:
swagger:
title: BladeX 接口文档系统
description: BladeX 接口文档系统
- version: 3.1.1.RELEASE
+ version: 3.2.0.RELEASE
license: Powered By BladeX
license-url: https://bladex.vip
terms-of-service-url: https://bladex.vip
diff --git a/pom.xml b/pom.xml
index 531ded99d..dc673974d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,11 +5,11 @@
org.springblade
BladeX-Biz
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
pom
- 3.1.1.RELEASE
+ 3.2.0.RELEASE
1.8
3.8.1
diff --git a/script/docker/app/.env b/script/docker/app/.env
index 7826478f8..c01a767fb 100644
--- a/script/docker/app/.env
+++ b/script/docker/app/.env
@@ -1,2 +1,2 @@
REGISTER=192.168.0.188/blade
-TAG=3.1.1.RELEASE
+TAG=3.2.0.RELEASE