File tree Expand file tree Collapse file tree
flow-engine-framework/src/main/java/com/codingapi/flow/service/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import com .codingapi .flow .manager .NodeStrategyManager ;
1111import com .codingapi .flow .manager .OperatorManager ;
1212import com .codingapi .flow .node .IFlowNode ;
13- import com .codingapi .flow .node .NodeType ;
1413import com .codingapi .flow .node .nodes .StartNode ;
1514import com .codingapi .flow .operator .IFlowOperator ;
1615import com .codingapi .flow .pojo .request .FlowProcessNodeRequest ;
@@ -82,22 +81,21 @@ private void loadWorkflow() {
8281 public List <ProcessNode > processNodes () {
8382 long backupId = 0 ;
8483 if (this .flowRecord != null ) {
84+ backupId = this .flowRecord .getWorkBackupId ();
8585 // 如果当前记录已结束,则不查询后续流程
8686 if (this .flowRecord .isDone ()){
87-
8887 List <FlowRecord > historyRecords = flowRecordRepository .findProcessRecords (this .flowRecord .getProcessId ());
8988 for (FlowRecord historyRecord : historyRecords ) {
9089 ProcessNode processNode = new ProcessNode (historyRecord , this .workflow );
9190 nodeList .add (processNode );
9291 }
93-
9492 if (this .flowRecord .isFinish ()){
9593 nodeList .add (ProcessNode .createEndNode (this .workflow ));
94+ }else {
95+ this .loadNextNode (backupId );
9696 }
97-
9897 return this .nodeList ;
9998 }else {
100- backupId = this .flowRecord .getWorkBackupId ();
10199 // 查询历史记录
102100 List <FlowRecord > historyRecords = flowRecordRepository .findBeforeRecords (flowRecord .getProcessId (), flowRecord .getId ());
103101 for (FlowRecord historyRecord : historyRecords ) {
You can’t perform that action at this time.
0 commit comments