From d614e035b7b1c67981e65198d110ee0f0d42d82d Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:29:13 +0200 Subject: [PATCH] Update jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/WorkflowProcessInstanceImpl.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gonzalo Muñoz --- .../workflow/instance/impl/WorkflowProcessInstanceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/WorkflowProcessInstanceImpl.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/WorkflowProcessInstanceImpl.java index 7e972ac5267..d5b9c5e3483 100755 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/WorkflowProcessInstanceImpl.java +++ b/jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/WorkflowProcessInstanceImpl.java @@ -1163,7 +1163,8 @@ public void setErrorState(NodeInstance nodeInstanceInError, Exception e) { this.nodeIdInError = nodeInstanceInError.getNodeDefinitionId(); this.nodeInstanceIdInError = nodeInstanceInError.getId(); this.errorCause = Optional.of(e); - this.errorMessage = getRootException(e).getMessage(); + Throwable rootException = getRootException(e); + this.errorMessage = rootException.getMessage() == null ? rootException.getClass().getCanonicalName() : rootException.getMessage(); setState(STATE_ERROR); logger.error("Unexpected error while executing node {} in process instance {}", nodeInstanceInError.getNode().getName(), this.getStringId(), e); ((InternalProcessRuntime) getKnowledgeRuntime().getProcessRuntime()).getProcessEventSupport().fireOnError(this, nodeInstanceInError, getKnowledgeRuntime(), e);