Skip to content

Commit 7469f62

Browse files
authored
Merge pull request #144 from manick02/main
Last bugfix GetNumOfEndStates util method to take care of SwitchState #127
2 parents f95ceb6 + 820c442 commit 7469f62

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)