1616
1717package com .flowci .tree .yml ;
1818
19- import com .flowci .domain .Notification ;
2019import com .flowci .exception .YmlException ;
2120import com .flowci .tree .*;
2221import lombok .Getter ;
@@ -48,9 +47,6 @@ public class FlowYml extends YmlBase<FlowNode> {
4847 @ NonNull
4948 private List <StepYml > steps = new LinkedList <>();
5049
51- @ NonNull
52- private List <StepYml > after = new LinkedList <>();
53-
5450 public FlowYml (FlowNode node ) {
5551 setEnvs (node .getEnvironments ());
5652
@@ -73,7 +69,6 @@ public FlowNode toNode() {
7369
7470 setupNotifications (node );
7571 setupSteps (node );
76- setupAfter (node );
7772 return node ;
7873 }
7974
@@ -92,23 +87,6 @@ private void setupNotifications(FlowNode node) {
9287 }
9388 }
9489
95- private void setupAfter (FlowNode node ) {
96- if (Objects .isNull (after ) || after .isEmpty ()) {
97- return ;
98- }
99-
100- int index = 1 ;
101- Set <String > uniqueName = new HashSet <>(after .size ());
102-
103- for (StepYml child : after ) {
104- StepNode step = child .toNode (index ++, StepNode .Type .After );
105- if (!uniqueName .add (step .getName ())) {
106- throw new YmlException ("Duplicate name {0} in after" , step .getName ());
107- }
108- node .getAfter ().add (step );
109- }
110- }
111-
11290 private void setupSteps (FlowNode node ) {
11391 if (Objects .isNull (steps ) || steps .isEmpty ()) {
11492 throw new YmlException ("The 'steps' must be defined" );
@@ -118,7 +96,7 @@ private void setupSteps(FlowNode node) {
11896 Set <String > uniqueName = new HashSet <>(steps .size ());
11997
12098 for (StepYml child : steps ) {
121- StepNode step = child .toNode (index ++, StepNode . Type . Step );
99+ StepNode step = child .toNode (index ++);
122100 if (!uniqueName .add (step .getName ())) {
123101 throw new YmlException ("Duplicate name {0} in step" , step .getName ());
124102 }
0 commit comments