From 98cc43f01ba97da6afac3a2c5af833ffff01fde4 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Thu, 1 Jun 2017 16:51:22 +0200 Subject: [PATCH] BpNode: Count missing nodes in getStateSummary Children that are missing should increment the counter, as well as if no children are present. So it's easy to find missing nodes following the counters. --- library/Businessprocess/BpNode.php | 5 +++++ 1 file changed, 5 insertions(+) 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; }