diff --git a/library/Businessprocess/BpNode.php b/library/Businessprocess/BpNode.php index 79d4015..456acaf 100644 --- a/library/Businessprocess/BpNode.php +++ b/library/Businessprocess/BpNode.php @@ -68,11 +68,16 @@ class BpNode extends Node foreach ($counters as $k => $v) { $this->counters[$k] += $v; } + } elseif ($child->isMissing()) { + $this->counters['MISSING']++; } else { $state = $child->getStateName(); $this->counters[$state]++; } } + if (! $this->hasChildren()) { + $this->counters['MISSING']++; + } } return $this->counters; }