Skip to content

Commit d26f2bf

Browse files
committed
fix trySubmit
1 parent c05a1a0 commit d26f2bf

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

example/example-infra-flow/src/main/java/com/codingapi/example/repository/FlowProcessRepositoryImpl.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ public FlowWork getFlowWorkByProcessId(String processId) {
3131
return null;
3232
}
3333
FlowBackup flowBackup = flowBackupRepository.getFlowBackupById(flowProcess.getBackupId());
34-
if(flowBackup!=null) {
35-
return flowBackup.resume(flowOperatorRepository);
34+
if (flowBackup != null) {
35+
try {
36+
return flowBackup.resume(flowOperatorRepository);
37+
}catch (Exception e){
38+
return null;
39+
}
3640
}
3741
return null;
3842
}

example/example-infra-flow/src/main/java/com/codingapi/example/repository/FlowWorkRepositoryImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public FlowWork getFlowWorkById(long id) {
4949
entity.getCreateTime(),
5050
entity.getUpdateTime(),
5151
entity.getEnable(),
52-
entity.getSkipIfSameApprover(),
52+
entity.getSkipIfSameApprover() != null && entity.getSkipIfSameApprover(),
5353
entity.getPostponedMax(),
5454
flowNodes,
5555
flowRelations,
@@ -82,7 +82,7 @@ public FlowWork getFlowWorkByCode(String code) {
8282
entity.getCreateTime(),
8383
entity.getUpdateTime(),
8484
entity.getEnable(),
85-
entity.getSkipIfSameApprover(),
85+
entity.getSkipIfSameApprover() != null && entity.getSkipIfSameApprover(),
8686
entity.getPostponedMax(),
8787
flowNodes,
8888
flowRelations,

0 commit comments

Comments
 (0)