diff --git a/library/Businessprocess/BpConfig.php b/library/Businessprocess/BpConfig.php index 7295508..cfa5268 100644 --- a/library/Businessprocess/BpConfig.php +++ b/library/Businessprocess/BpConfig.php @@ -3,7 +3,6 @@ namespace Icinga\Module\Businessprocess; use Exception; -use LogicException; use Icinga\Application\Config; use Icinga\Exception\IcingaException; use Icinga\Exception\NotFoundError; @@ -89,6 +88,13 @@ class BpConfig */ protected $root_nodes = array(); + /** + * Whether this configuration has been imported + * + * @var bool + */ + protected $imported = false; + /** * Imported nodes * @@ -552,6 +558,17 @@ class BpConfig return $missing; } + public function setImported($state = true) + { + $this->imported = (bool) $state; + return $this; + } + + public function isImported() + { + return $this->imported; + } + public function createImportedNode($config, $name = null) { $params = (object) array('configName' => $config); @@ -569,6 +586,7 @@ class BpConfig { if (! isset($this->importedConfigs[$name])) { $import = $this->storage()->loadProcess($name); + $import->setImported(); if ($this->usesSoftStates()) { $import->useSoftStates();