diff --git a/application/forms/DeleteNodeForm.php b/application/forms/DeleteNodeForm.php
index dada9d3..67635bb 100644
--- a/application/forms/DeleteNodeForm.php
+++ b/application/forms/DeleteNodeForm.php
@@ -31,15 +31,16 @@ class DeleteNodeForm extends QuickForm
public function setup()
{
$node = $this->node;
+ $nodeName = $node->getAlias() ?? $node->getName();
$view = $this->getView();
$this->addHtml(
'
' . $view->escape(
- sprintf($this->translate('Delete "%s"'), $node->getAlias())
+ sprintf($this->translate('Delete "%s"'), $nodeName)
) . '
'
);
$biLink = $view->qlink(
- $node->getAlias(),
+ $nodeName,
'businessprocess/node/impact',
array('name' => $node->getName()),
array('data-base-target' => '_next')
@@ -61,7 +62,7 @@ class DeleteNodeForm extends QuickForm
} else {
$yesMsg = sprintf(
$this->translate('Delete root node "%s"'),
- $this->node->getAlias()
+ $nodeName
);
}
@@ -74,7 +75,7 @@ class DeleteNodeForm extends QuickForm
'multiOptions' => $this->optionalEnum(array(
'no' => $this->translate('No'),
'yes' => $yesMsg,
- 'all' => sprintf($this->translate('Delete all occurrences of %s'), $node->getAlias()),
+ 'all' => sprintf($this->translate('Delete all occurrences of %s'), $nodeName),
))
));
}
diff --git a/application/forms/EditNodeForm.php b/application/forms/EditNodeForm.php
index f26dd04..b22117e 100644
--- a/application/forms/EditNodeForm.php
+++ b/application/forms/EditNodeForm.php
@@ -48,9 +48,10 @@ class EditNodeForm extends QuickForm
}
$view = $this->getView();
+ $nodeName = $this->getNode()->getAlias() ?? $this->getNode()->getName();
$this->addHtml(
'' . $view->escape(
- sprintf($this->translate('Modify "%s"'), $this->getNode()->getAlias())
+ sprintf($this->translate('Modify "%s"'), $nodeName)
) . '
'
);
diff --git a/application/forms/SimulationForm.php b/application/forms/SimulationForm.php
index 263976b..47c9f52 100644
--- a/application/forms/SimulationForm.php
+++ b/application/forms/SimulationForm.php
@@ -44,7 +44,7 @@ class SimulationForm extends QuickForm
}
$this->addHtml(
''
- . $view->escape(sprintf($title, $node->getAlias()))
+ . $view->escape(sprintf($title, $node->getAlias() ?? $node->getName()))
. '
'
);
diff --git a/library/Businessprocess/MonitoredNode.php b/library/Businessprocess/MonitoredNode.php
index 3c4167d..7047e5d 100644
--- a/library/Businessprocess/MonitoredNode.php
+++ b/library/Businessprocess/MonitoredNode.php
@@ -11,9 +11,9 @@ abstract class MonitoredNode extends Node
public function getLink()
{
if ($this->isMissing()) {
- return Html::tag('a', ['href' => '#'], $this->getAlias());
+ return Html::tag('a', ['href' => '#'], $this->getAlias() ?? $this->getName());
} else {
- return Html::tag('a', ['href' => $this->getUrl()], $this->getAlias());
+ return Html::tag('a', ['href' => $this->getUrl()], $this->getAlias() ?? $this->getName());
}
}
}
diff --git a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php
index 67bb4a6..a9d67b7 100644
--- a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php
+++ b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php
@@ -180,7 +180,11 @@ class NodeTile extends BaseHtmlElement
$node = $this->node;
$url = $this->getMainNodeUrl($node);
if ($node instanceof MonitoredNode) {
- $link = Html::tag('a', ['href' => $url, 'data-base-target' => '_next'], $node->getAlias());
+ $link = Html::tag(
+ 'a',
+ ['href' => $url, 'data-base-target' => '_next'],
+ $node->getAlias() ?? $node->getName()
+ );
} else {
$link = Html::tag('a', ['href' => $url], $node->getAlias());
}
diff --git a/library/Businessprocess/ServiceNode.php b/library/Businessprocess/ServiceNode.php
index 6160bce..53cef21 100644
--- a/library/Businessprocess/ServiceNode.php
+++ b/library/Businessprocess/ServiceNode.php
@@ -65,6 +65,10 @@ class ServiceNode extends MonitoredNode
public function getAlias()
{
+ if ($this->getHostAlias() === null || $this->alias === null) {
+ return null;
+ }
+
return $this->getHostAlias() . ': ' . $this->alias;
}