From 52fd36b9f202904c4ca3c42b84460337cba529ce Mon Sep 17 00:00:00 2001 From: Nicolas Adment <39568358+nadment@users.noreply.github.com> Date: Wed, 6 Mar 2024 21:56:10 +0100 Subject: [PATCH] Add a red border around the action on failure #3701 --- .../java/org/apache/hop/workflow/WorkflowPainter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engine/src/main/java/org/apache/hop/workflow/WorkflowPainter.java b/engine/src/main/java/org/apache/hop/workflow/WorkflowPainter.java index a50caa28fe2..21282374ef0 100644 --- a/engine/src/main/java/org/apache/hop/workflow/WorkflowPainter.java +++ b/engine/src/main/java/org/apache/hop/workflow/WorkflowPainter.java @@ -254,7 +254,13 @@ protected void drawAction(ActionMeta actionMeta) throws HopException { areaOwners.add( new AreaOwner(AreaType.ACTION_ICON, x, y, iconSize, iconSize, offset, subject, actionMeta)); - if (actionMeta.isMissing()) { + boolean actionError = false; + ActionResult actionResult = findActionResult(actionMeta); + if ( actionResult!=null && !actionResult.isCheckpoint() ) { + actionError = !actionResult.getResult().getResult(); + } + + if (actionError || actionMeta.isMissing()) { gc.setForeground(EColor.RED); } else if (actionMeta.isDeprecated()) { gc.setForeground(EColor.DEPRECATED); @@ -350,7 +356,6 @@ protected void drawAction(ActionMeta actionMeta) throws HopException { actionMeta)); } - ActionResult actionResult = findActionResult(actionMeta); if (actionResult != null) { Result result = actionResult.getResult(); int iconX = (x + iconSize) - (miniIconSize / 2) + 1;