diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index e13e8af..3996398 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -5,6 +5,8 @@
+
+
diff --git a/adapter/flowable-spring-boot-jpa-starter/pom.xml b/adapter/flowable-spring-boot-jpa-starter/pom.xml
index aeac39c..ed709de 100644
--- a/adapter/flowable-spring-boot-jpa-starter/pom.xml
+++ b/adapter/flowable-spring-boot-jpa-starter/pom.xml
@@ -28,6 +28,11 @@
spring-boot-starter-data-jpa
+
+ com.lanyuanxiaoyao
+ flowable-example
+ test
+
org.springframework.boot
spring-boot-starter-test
diff --git a/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleAutoAction.java b/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SimpleAutoAction.java
similarity index 94%
rename from adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleAutoAction.java
rename to adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SimpleAutoAction.java
index f96e854..501d494 100644
--- a/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleAutoAction.java
+++ b/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SimpleAutoAction.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.flowable.core;
+package com.lanyuanxiaoyao.flowable.jpa;
import com.lanyuanxiaoyao.flowable.core.manager.FlowableManager;
import com.lanyuanxiaoyao.flowable.core.model.FlowableAction;
diff --git a/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SpringFlowableApplication.java b/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SpringFlowableApplication.java
index dc7e4ef..bf4e242 100644
--- a/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SpringFlowableApplication.java
+++ b/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/SpringFlowableApplication.java
@@ -1,6 +1,5 @@
package com.lanyuanxiaoyao.flowable.jpa;
-import com.lanyuanxiaoyao.flowable.core.SimpleAutoAction;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
diff --git a/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/TestSpringFlowableManager.java b/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/TestSpringFlowableManager.java
index 6528e91..5c9e272 100644
--- a/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/TestSpringFlowableManager.java
+++ b/adapter/flowable-spring-boot-jpa-starter/src/test/java/com/lanyuanxiaoyao/flowable/jpa/TestSpringFlowableManager.java
@@ -1,7 +1,7 @@
package com.lanyuanxiaoyao.flowable.jpa;
import com.lanyuanxiaoyao.flowable.core.manager.FlowableManager;
-import com.lanyuanxiaoyao.flowable.core.test.TestFlowableManager;
+import com.lanyuanxiaoyao.flowable.test.TestFlowableManager;
import javax.annotation.Resource;
import org.springframework.boot.test.context.SpringBootTest;
@@ -18,4 +18,9 @@ public class TestSpringFlowableManager extends TestFlowableManager {
protected FlowableManager flowableManager() {
return flowableManager;
}
+
+ @Override
+ protected Class> getAutomaticNodeClass() {
+ return SimpleAutoAction.class;
+ }
}
diff --git a/flowable-core/pom.xml b/flowable-core/pom.xml
index 58e22bd..834f62d 100644
--- a/flowable-core/pom.xml
+++ b/flowable-core/pom.xml
@@ -12,34 +12,9 @@
flowable-core
-
- org.projectlombok
- lombok
- 1.18.34
- compile
-
org.slf4j
slf4j-api
- 2.0.16
-
-
- org.junit.jupiter
- junit-jupiter-api
- 5.11.4
-
-
-
- org.slf4j
- slf4j-simple
- 2.0.16
- test
-
-
- org.junit.jupiter
- junit-jupiter
- 5.11.4
- test
diff --git a/flowable-example/pom.xml b/flowable-example/pom.xml
new file mode 100644
index 0000000..62dea25
--- /dev/null
+++ b/flowable-example/pom.xml
@@ -0,0 +1,36 @@
+
+
+
+ com.lanyuanxiaoyao
+ flowable
+ 1.0.0-SNAPSHOT
+
+
+ 4.0.0
+ flowable-example
+
+
+
+ com.lanyuanxiaoyao
+ flowable-core
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+
+
+
+ org.slf4j
+ slf4j-simple
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter
+ test
+
+
+
+
\ No newline at end of file
diff --git a/flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/test/TestFlowableManager.java b/flowable-example/src/main/java/com/lanyuanxiaoyao/flowable/test/TestFlowableManager.java
similarity index 97%
rename from flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/test/TestFlowableManager.java
rename to flowable-example/src/main/java/com/lanyuanxiaoyao/flowable/test/TestFlowableManager.java
index c14a693..12e9389 100644
--- a/flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/test/TestFlowableManager.java
+++ b/flowable-example/src/main/java/com/lanyuanxiaoyao/flowable/test/TestFlowableManager.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.flowable.core.test;
+package com.lanyuanxiaoyao.flowable.test;
import com.lanyuanxiaoyao.flowable.core.helper.MapHelper;
import com.lanyuanxiaoyao.flowable.core.manager.FlowableManager;
@@ -122,6 +122,8 @@ public abstract class TestFlowableManager {
Assertions.assertThrows(IllegalArgumentException.class, () -> manager.approve(instanceId));
}
+ protected abstract Class> getAutomaticNodeClass();
+
@Test
public void testAutomaticNode() {
FlowableManager manager = flowableManager();
@@ -130,7 +132,7 @@ public abstract class TestFlowableManager {
"自动节点",
"自动节点",
FlowableNode.Type.AUTOMATIC,
- "com.lanyuanxiaoyao.flowable.core.SimpleAutoAction",
+ getAutomaticNodeClass().getName(),
null
);
manager.create(node);
diff --git a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/InMemoryFlowableRepository.java b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/InMemoryFlowableRepository.java
similarity index 98%
rename from flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/InMemoryFlowableRepository.java
rename to flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/InMemoryFlowableRepository.java
index d6ecfb0..c515f9c 100644
--- a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/InMemoryFlowableRepository.java
+++ b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/InMemoryFlowableRepository.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.flowable.core;
+package com.lanyuanxiaoyao.flowable.test;
import com.lanyuanxiaoyao.flowable.core.helper.ListHelper;
import com.lanyuanxiaoyao.flowable.core.helper.StringHelper;
diff --git a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleAutoAction.java b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/SimpleAutoAction.java
similarity index 92%
rename from flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleAutoAction.java
rename to flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/SimpleAutoAction.java
index 900c822..3835584 100644
--- a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleAutoAction.java
+++ b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/SimpleAutoAction.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.flowable.core;
+package com.lanyuanxiaoyao.flowable.test;
import com.lanyuanxiaoyao.flowable.core.model.FlowableAction;
import com.lanyuanxiaoyao.flowable.core.model.FlowableInstance;
diff --git a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleFlowableManager.java b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/SimpleFlowableManager.java
similarity index 92%
rename from flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleFlowableManager.java
rename to flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/SimpleFlowableManager.java
index 741697a..05fb551 100644
--- a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/SimpleFlowableManager.java
+++ b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/SimpleFlowableManager.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.flowable.core;
+package com.lanyuanxiaoyao.flowable.test;
import com.lanyuanxiaoyao.flowable.core.manager.FlowableManager;
import java.util.UUID;
diff --git a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/TestSimpleFlowableManager.java b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/TestSimpleFlowableManager.java
similarity index 67%
rename from flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/TestSimpleFlowableManager.java
rename to flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/TestSimpleFlowableManager.java
index 130319b..cc5adcb 100644
--- a/flowable-core/src/test/java/com/lanyuanxiaoyao/flowable/core/TestSimpleFlowableManager.java
+++ b/flowable-example/src/test/java/com/lanyuanxiaoyao/flowable/test/TestSimpleFlowableManager.java
@@ -1,6 +1,5 @@
-package com.lanyuanxiaoyao.flowable.core;
+package com.lanyuanxiaoyao.flowable.test;
-import com.lanyuanxiaoyao.flowable.core.test.TestFlowableManager;
import com.lanyuanxiaoyao.flowable.core.manager.FlowableManager;
/**
@@ -12,4 +11,9 @@ public class TestSimpleFlowableManager extends TestFlowableManager {
protected FlowableManager flowableManager() {
return new SimpleFlowableManager();
}
+
+ @Override
+ protected Class> getAutomaticNodeClass() {
+ return SimpleAutoAction.class;
+ }
}
diff --git a/pom.xml b/pom.xml
index 5c8624f..835de2d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,6 +11,7 @@
flowable-core
+ flowable-example
adapter/flowable-spring-boot-jpa-starter
@@ -20,14 +21,31 @@
UTF-8
2.6.15
+ 5.8.32
+ 5.8.2
+ 1.7.36
+
+
+ org.projectlombok
+ lombok
+ 1.18.34
+ compile
+
+
+
com.lanyuanxiaoyao
flowable-core
- 1.0.0-SNAPSHOT
+ ${project.version}
+
+
+ com.lanyuanxiaoyao
+ flowable-example
+ ${project.version}
org.springframework.boot
@@ -39,7 +57,27 @@
cn.hutool
hutool-core
- 5.8.32
+ ${hutool.version}
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit.version}
+
+
+ org.junit.jupiter
+ junit-jupiter
+ ${junit.version}
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j.version}
+
+
+ org.slf4j
+ slf4j-simple
+ ${slf4j.version}