diff --git a/example/example-app/example-app-cmd-domain/pom.xml b/example/example-app/example-app-cmd-domain/pom.xml
index b2ed6e26..c0698a4c 100644
--- a/example/example-app/example-app-cmd-domain/pom.xml
+++ b/example/example-app/example-app-cmd-domain/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-app/example-app-cmd-meta/pom.xml b/example/example-app/example-app-cmd-meta/pom.xml
index 891ead1b..66f5138c 100644
--- a/example/example-app/example-app-cmd-meta/pom.xml
+++ b/example/example-app/example-app-cmd-meta/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-app/example-app-query/pom.xml b/example/example-app/example-app-query/pom.xml
index b76513f0..ac105c9b 100644
--- a/example/example-app/example-app-query/pom.xml
+++ b/example/example-app/example-app-query/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-app/pom.xml b/example/example-app/pom.xml
index bb03aa71..f0841b3e 100644
--- a/example/example-app/pom.xml
+++ b/example/example-app/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.43
+ 3.4.44
../pom.xml
pom
diff --git a/example/example-domain/example-domain-leave/pom.xml b/example/example-domain/example-domain-leave/pom.xml
index 9a7eb891..feca9e30 100644
--- a/example/example-domain/example-domain-leave/pom.xml
+++ b/example/example-domain/example-domain-leave/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-domain
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-domain/example-domain-user/pom.xml b/example/example-domain/example-domain-user/pom.xml
index 47ec402a..c03892c6 100644
--- a/example/example-domain/example-domain-user/pom.xml
+++ b/example/example-domain/example-domain-user/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-domain
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-domain/pom.xml b/example/example-domain/pom.xml
index 7c688f3f..64b78ab4 100644
--- a/example/example-domain/pom.xml
+++ b/example/example-domain/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
springboot-example
- 3.4.43
+ 3.4.44
../pom.xml
4.0.0
diff --git a/example/example-infra/example-infra-flow/pom.xml b/example/example-infra/example-infra-flow/pom.xml
index 884ef1bc..7c6f1875 100644
--- a/example/example-infra/example-infra-flow/pom.xml
+++ b/example/example-infra/example-infra-flow/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
example-infra
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-infra/example-infra-jpa/pom.xml b/example/example-infra/example-infra-jpa/pom.xml
index 067db0c4..2d561e57 100644
--- a/example/example-infra/example-infra-jpa/pom.xml
+++ b/example/example-infra/example-infra-jpa/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
example-infra
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-infra/example-infra-security/pom.xml b/example/example-infra/example-infra-security/pom.xml
index bfdad5a6..f1a1c3c2 100644
--- a/example/example-infra/example-infra-security/pom.xml
+++ b/example/example-infra/example-infra-security/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-infra
- 3.4.43
+ 3.4.44
../pom.xml
diff --git a/example/example-infra/pom.xml b/example/example-infra/pom.xml
index 36678a2c..36605591 100644
--- a/example/example-infra/pom.xml
+++ b/example/example-infra/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.43
+ 3.4.44
../pom.xml
pom
diff --git a/example/example-interface/pom.xml b/example/example-interface/pom.xml
index 2d1acfe1..5f23d1e0 100644
--- a/example/example-interface/pom.xml
+++ b/example/example-interface/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.43
+ 3.4.44
example-interface
diff --git a/example/example-server/pom.xml b/example/example-server/pom.xml
index 1bbbd6c1..e6a43cd7 100644
--- a/example/example-server/pom.xml
+++ b/example/example-server/pom.xml
@@ -5,7 +5,7 @@
springboot-example
com.codingapi.springboot
- 3.4.43
+ 3.4.44
4.0.0
diff --git a/example/pom.xml b/example/pom.xml
index 34595dcf..f73e7ee6 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -19,7 +19,7 @@
springboot-example
- 3.4.43
+ 3.4.44
springboot-example
springboot-example project for Spring Boot
diff --git a/pom.xml b/pom.xml
index 89da7a7a..2fc26ce5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.43
+ 3.4.44
https://github.com/codingapi/springboot-framewrok
springboot-parent
diff --git a/springboot-starter-data-authorization/pom.xml b/springboot-starter-data-authorization/pom.xml
index 863ba9bc..d89f6d06 100644
--- a/springboot-starter-data-authorization/pom.xml
+++ b/springboot-starter-data-authorization/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.43
+ 3.4.44
springboot-starter-data-authorization
diff --git a/springboot-starter-data-fast/pom.xml b/springboot-starter-data-fast/pom.xml
index 9d526806..9f44ba99 100644
--- a/springboot-starter-data-fast/pom.xml
+++ b/springboot-starter-data-fast/pom.xml
@@ -5,7 +5,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.43
+ 3.4.44
4.0.0
diff --git a/springboot-starter-flow/pom.xml b/springboot-starter-flow/pom.xml
index 0b0c96b3..ef49d453 100644
--- a/springboot-starter-flow/pom.xml
+++ b/springboot-starter-flow/pom.xml
@@ -6,7 +6,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.43
+ 3.4.44
springboot-starter-flow
diff --git a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/domain/FlowButton.java b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/domain/FlowButton.java
index 7dd5d8e5..533c55a4 100644
--- a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/domain/FlowButton.java
+++ b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/domain/FlowButton.java
@@ -76,8 +76,7 @@ public MessageResult run(FlowRecord flowRecord,
if (groovy != null) {
//执行脚本
FlowSession session = new FlowSession(flowRecord, flowWork, flowNode, createOperator, currentOperator, bindData, opinion, historyRecords);
- GroovyShellContext.ShellScript script = GroovyShellContext.getInstance().parse(groovy);
- return (MessageResult) script.invokeMethod("run", session);
+ return GroovyShellContext.getInstance().run(groovy,MessageResult.class,session);
}
return null;
}
diff --git a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/error/ErrTrigger.java b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/error/ErrTrigger.java
index fbdd6751..e59b9709 100644
--- a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/error/ErrTrigger.java
+++ b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/error/ErrTrigger.java
@@ -13,15 +13,11 @@ public class ErrTrigger {
@Getter
private final String script;
- private final GroovyShellContext.ShellScript runtime;
-
-
public ErrTrigger(String script) {
if (!StringUtils.hasLength(script)) {
throw new IllegalArgumentException("script is empty");
}
this.script = script;
- this.runtime = GroovyShellContext.getInstance().parse(script);
}
/**
@@ -30,7 +26,7 @@ public ErrTrigger(String script) {
* @param flowSession 流程内容
*/
public ErrorResult trigger(FlowSession flowSession) {
- return (ErrorResult) runtime.invokeMethod("run", flowSession);
+ return GroovyShellContext.getInstance().run(script, ErrorResult.class, flowSession);
}
}
diff --git a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/generator/TitleGenerator.java b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/generator/TitleGenerator.java
index 2fa5f840..fd667f01 100644
--- a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/generator/TitleGenerator.java
+++ b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/generator/TitleGenerator.java
@@ -13,14 +13,12 @@ public class TitleGenerator {
@Getter
private final String script;
- private final GroovyShellContext.ShellScript runtime;
public TitleGenerator(String script) {
if (!StringUtils.hasLength(script)) {
throw new IllegalArgumentException("script is empty");
}
this.script = script;
- this.runtime = GroovyShellContext.getInstance().parse(script);
}
@@ -41,7 +39,7 @@ public static TitleGenerator defaultTitleGenerator() {
* @return 标题
*/
public String generate(FlowSession flowSession) {
- return (String) this.runtime.invokeMethod("run", flowSession);
+ return GroovyShellContext.getInstance().run(script,String.class,flowSession);
}
}
diff --git a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/matcher/OperatorMatcher.java b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/matcher/OperatorMatcher.java
index 522f5c8f..b8ecf59e 100644
--- a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/matcher/OperatorMatcher.java
+++ b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/matcher/OperatorMatcher.java
@@ -20,8 +20,6 @@ public class OperatorMatcher {
private final int state;
- private final GroovyShellContext.ShellScript runtime;
-
// 指定用户
public static final int STATE_SPECIFY = 1;
// 创建者
@@ -63,7 +61,6 @@ public OperatorMatcher(String script, int state) {
}
this.script = script;
this.state = state;
- this.runtime = GroovyShellContext.getInstance().parse(script);
}
/**
@@ -114,7 +111,7 @@ public static OperatorMatcher creatorOperatorMatcher() {
* @return 是否匹配
*/
public List matcher(FlowSession flowSession) {
- List