Skip to content

Commit 820c442

Browse files
committed
Fixed GetNumOfEndStates util method to take care of SwitchState #127
Signed-off-by: manick02 <[email protected]>
1 parent 680d552 commit 820c442

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,9 @@ public static long getNumOfEndStates(Workflow workflow) {
320320
}
321321
DefaultConditionDefinition defaultCondition = switchState.getDefaultCondition();
322322
if (defaultCondition != null) {
323-
count = defaultCondition.getEnd() != null ? 1 : 0;
323+
count = (defaultCondition.getEnd() != null) ? count + 1 : count;
324324
}
325325
}
326-
327326
return count;
328327
} else {
329328
return DEFAULT_STATE_COUNT;

0 commit comments

Comments
 (0)