Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fa79e3af
authored
Sep 21, 2023
by
tiger
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
节点执行结果
1 parent
56f214da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
17 deletions
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/SopNodeExecutor.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/EndExecutor.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/JavaExecutor.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/SqlExecutor.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/SopNodeExecutor.java
View file @
fa79e3a
...
@@ -39,7 +39,7 @@ public interface SopNodeExecutor {
...
@@ -39,7 +39,7 @@ public interface SopNodeExecutor {
*/
*/
default
SnapshotStruct
prepare
(
SopStruct
sop
,
SopInstNode
node
)
{
default
SnapshotStruct
prepare
(
SopStruct
sop
,
SopInstNode
node
)
{
SnapshotStruct
es
=
new
SnapshotStruct
();
SnapshotStruct
es
=
new
SnapshotStruct
();
if
(
StrUtil
.
length
(
sop
.
getInst
().
getInstSnapshot
())
>
3
)
{
if
(
StrUtil
.
length
(
sop
.
getInst
().
getInstSnapshot
())
>
4
)
{
// 继承参数
// 继承参数
es
=
JacksonUtils
.
fromJson
(
sop
.
getInst
().
getInstSnapshot
(),
SnapshotStruct
.
class
);
es
=
JacksonUtils
.
fromJson
(
sop
.
getInst
().
getInstSnapshot
(),
SnapshotStruct
.
class
);
}
else
{
}
else
{
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/EndExecutor.java
View file @
fa79e3a
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
.
execute
.
executor
;
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
.
execute
.
executor
;
import
java.util.Map
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
cn.com.glsx.process.common.constant.Constants
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.modules.sop.execute.SnapshotStruct
;
import
cn.com.glsx.process.modules.sop.execute.SnapshotStruct
;
...
@@ -18,9 +15,6 @@ public class EndExecutor implements SopNodeExecutor {
...
@@ -18,9 +15,6 @@ public class EndExecutor implements SopNodeExecutor {
@Override
@Override
public
Object
execute
(
SopStruct
sop
,
SopInstNode
node
,
SnapshotStruct
executeStruct
)
throws
Exception
{
public
Object
execute
(
SopStruct
sop
,
SopInstNode
node
,
SnapshotStruct
executeStruct
)
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
executeStruct
.
getResultMap
();
resultMap
.
put
(
Constants
.
RES_KEY
,
Constants
.
RES_SUCCESS
);
return
null
;
return
null
;
}
}
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/JavaExecutor.java
View file @
fa79e3a
...
@@ -7,7 +7,6 @@ import org.springframework.stereotype.Service;
...
@@ -7,7 +7,6 @@ import org.springframework.stereotype.Service;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
cn.com.glsx.process.common.constant.Constants
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.modules.model.SopStruct
;
...
@@ -52,12 +51,8 @@ public class JavaExecutor implements SopNodeExecutor {
...
@@ -52,12 +51,8 @@ public class JavaExecutor implements SopNodeExecutor {
Object
instance
=
de
.
execute
(
"Controller"
,
javacode
,
"execute"
,
new
Class
[]
{
JSON
.
class
},
new
Object
[]
{
jsonObject
});
Object
instance
=
de
.
execute
(
"Controller"
,
javacode
,
"execute"
,
new
Class
[]
{
JSON
.
class
},
new
Object
[]
{
jsonObject
});
// 处理返回结果
// 处理返回结果
resultMap
.
put
(
Constants
.
RES_DATE_KEY
,
instance
);
return
instance
;
resultMap
.
put
(
Constants
.
RES_KEY
,
Constants
.
RES_SUCCESS
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
String
message
=
e
.
getMessage
();
resultMap
.
put
(
Constants
.
RES_FAIL_MESSAGE
,
message
);
resultMap
.
put
(
Constants
.
RES_KEY
,
Constants
.
RES_FAIL
);
}
}
return
null
;
return
null
;
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/SqlExecutor.java
View file @
fa79e3a
...
@@ -45,11 +45,8 @@ public class SqlExecutor implements SopNodeExecutor {
...
@@ -45,11 +45,8 @@ public class SqlExecutor implements SopNodeExecutor {
String
sql
=
FreemarkerUtil
.
processContent
(
sqlTemplate
,
executeStruct
.
toMap
());
String
sql
=
FreemarkerUtil
.
processContent
(
sqlTemplate
,
executeStruct
.
toMap
());
int
i
=
mcgBizAdapter
.
executeUpdate
(
sql
);
mcgBizAdapter
.
executeUpdate
(
sql
);
// 处理执行结果
resultMap
.
put
(
Constants
.
RES_DATE_KEY
,
i
);
resultMap
.
put
(
Constants
.
RES_KEY
,
Constants
.
RES_SUCCESS
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
String
message
=
e
.
getMessage
();
String
message
=
e
.
getMessage
();
resultMap
.
put
(
Constants
.
RES_FAIL_MESSAGE
,
message
);
resultMap
.
put
(
Constants
.
RES_FAIL_MESSAGE
,
message
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment