From f9b9d9645a7923b6453fff125e7a8cefdb089878 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 16 Nov 2015 08:38:21 +0100 Subject: [PATCH] cli/check: return unknown on process failures --- application/clicommands/CheckCommand.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/clicommands/CheckCommand.php b/application/clicommands/CheckCommand.php index 897b013..125d4fb 100644 --- a/application/clicommands/CheckCommand.php +++ b/application/clicommands/CheckCommand.php @@ -45,6 +45,14 @@ class CheckCommand extends Command $node = $bp->getNode($this->params->shift()); $bp->retrieveStatesFromBackend(); + if ($bp->hasErrors()) { + printf( + "Checking Business Process %s failed: %s\n", + $node->getAlias(), + implode("\n", $bp->getErrors()) + ); + exit(3); + } printf("Business Process %s: %s\n", $node->getStateName(), $node->getAlias()); exit($node->getState()); }