cli/check: return unknown on process failures

This commit is contained in:
Thomas Gelf 2015-11-16 08:38:21 +01:00
parent fe5181052f
commit f9b9d9645a

View file

@ -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());
}