NodeAddChildrenAction: do nothing for missing node

This commit is contained in:
Thomas Gelf 2017-01-03 11:37:39 +01:00
parent 141c043b04
commit 5f26440a00

View file

@ -31,6 +31,11 @@ class NodeAddChildrenAction extends NodeAction
public function applyTo(BusinessProcess $bp)
{
/** @var BpNode $node */
if (! $this->hasNode()) {
// TODO: We end up here when defining "top nodes", but that would probably
// be a different action
return $this;
}
$node = $bp->getNode($this->getNodeName());
$existing = $node->getChildNames();
foreach ($this->children as $name) {