Skip to content

Commit 10b24d7

Browse files
committed
finish over node
1 parent 8bfad98 commit 10b24d7

File tree

14 files changed

+85
-49
lines changed

14 files changed

+85
-49
lines changed

example/example-application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.12</version>
8+
<version>3.3.13</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-domain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.12</version>
8+
<version>3.3.13</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.12</version>
8+
<version>3.3.13</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.12</version>
8+
<version>3.3.13</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.12</version>
8+
<version>3.3.13</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</parent>
1818

1919
<artifactId>springboot-example</artifactId>
20-
<version>3.3.12</version>
20+
<version>3.3.13</version>
2121

2222
<name>springboot-example</name>
2323
<description>springboot-example project for Spring Boot</description>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<groupId>com.codingapi.springboot</groupId>
1414
<artifactId>springboot-parent</artifactId>
15-
<version>3.3.12</version>
15+
<version>3.3.13</version>
1616

1717
<url>https://github.com/codingapi/springboot-framewrok</url>
1818
<name>springboot-parent</name>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.12</version>
8+
<version>3.3.13</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>3.3.12</version>
9+
<version>3.3.13</version>
1010
</parent>
1111

1212
<name>springboot-starter-flow</name>

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
import com.codingapi.springboot.flow.error.ErrorResult;
1010
import com.codingapi.springboot.flow.error.NodeResult;
1111
import com.codingapi.springboot.flow.error.OperatorResult;
12+
import com.codingapi.springboot.flow.event.FlowApprovalEvent;
1213
import com.codingapi.springboot.flow.record.FlowRecord;
1314
import com.codingapi.springboot.flow.repository.FlowOperatorRepository;
1415
import com.codingapi.springboot.flow.repository.FlowRecordRepository;
1516
import com.codingapi.springboot.flow.user.IFlowOperator;
17+
import com.codingapi.springboot.framework.event.EventPusher;
1618

1719
import java.util.ArrayList;
1820
import java.util.List;
@@ -168,7 +170,37 @@ private FlowNode matcherNextNode(FlowNode flowNode, boolean back) {
168170
* @return 流程记录
169171
*/
170172
public List<FlowRecord> createRecord() {
173+
// 创建下一节点的流程记录
174+
List<FlowRecord> records = this.createNextRecord();
171175

176+
// 检测流程是否为抄送节点
177+
while (this.nextNodeIsCirculate()){
178+
for (FlowRecord record : records) {
179+
record.circulate();
180+
}
181+
flowRecordRepository.save(records);
182+
183+
for (FlowRecord record : records) {
184+
IFlowOperator pushOperator = record.getCurrentOperator();
185+
186+
EventPusher.push(new FlowApprovalEvent(FlowApprovalEvent.STATE_CIRCULATE,
187+
record,
188+
pushOperator,
189+
flowWork,
190+
snapshot.toBindData()),
191+
true);
192+
}
193+
194+
this.skipCirculate();
195+
196+
records = this.createNextRecord();
197+
}
198+
return records;
199+
}
200+
201+
202+
203+
private List<FlowRecord> createNextRecord(){
172204
FlowSession flowSession = new FlowSession(flowWork,
173205
nextNode,
174206
createOperator,

0 commit comments

Comments
 (0)