Skip to content

Commit 0864cc5

Browse files
committed
update 3.3.57
1 parent 87321f1 commit 0864cc5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/pojo/FlowResult.java

+3
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ public List<FlowRecord> matchRecordByOperator(IFlowOperator operator){
3434
return records.stream().filter(record -> record.isOperator(operator)).toList();
3535
}
3636

37+
public boolean isOver() {
38+
return records.stream().allMatch(FlowRecord::isOverNode);
39+
}
3740
}

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/record/FlowRecord.java

+4
Original file line numberDiff line numberDiff line change
@@ -432,4 +432,8 @@ public boolean isPostponed() {
432432
public boolean isStartRecord() {
433433
return this.preId == 0;
434434
}
435+
436+
public boolean isOverNode() {
437+
return this.nodeCode.equals(FlowNode.CODE_OVER);
438+
}
435439
}

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/impl/FlowSubmitService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private void pushEvent(FlowRecord flowRecord, int eventState) {
230230
*/
231231
public FlowResult submitFlow() {
232232
FlowResult flowResult = this.submitCurrentFlow();
233-
if (this.isSkipIfSameApprover()) {
233+
if (this.isSkipIfSameApprover() && !flowResult.isOver()) {
234234
List<FlowRecord> flowRecords = flowResult.matchRecordByOperator(currentOperator);
235235
FlowResult result = flowResult;
236236
if (!flowRecords.isEmpty()) {

0 commit comments

Comments
 (0)