flowable/flowable-engine · error · FlowableException
Error while propagating error-event for " + execution
Error message
Error while propagating error-event for " + execution
What it means
This FlowableException wraps any exception thrown by ErrorPropagation.propagateError(errorCode, execution). It means the error event was resolved to an execution, but the actual propagation — finding a matching error boundary/catch handler in the BPMN model — failed while walking/acting on the model, e.g. due to a model inconsistency or an exception in handler lookup.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorThrowingEventListener.java:64
compatibilityHandler.throwErrorEvent(event);
return;
}
ExecutionEntity execution = null;
if (engineEvent.getExecutionId() != null) {
// Get the execution based on the event's execution ID instead
execution = CommandContextUtil.getExecutionEntityManager().findById(engineEvent.getExecutionId());
}
if (execution == null) {
throw new FlowableException("No execution context active and event (" + event + ") is not related to an execution. No compensation event can be thrown.");
}
try {
ErrorPropagation.propagateError(errorCode, execution);
} catch (Exception e) {
throw new FlowableException("Error while propagating error-event for " + execution, e);
}
}
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
@Override
public boolean isFailOnException() {
return true;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Inspect the wrapped cause (e.getCause()) — the real failure is inside ErrorPropagation, not the listener.
- Validate the BPMN model: ensure every errorEventDefinition's errorRef matches a declared <error> element and boundary/subprocess error handlers are correctly attached.
- Confirm the errorCode set on the listener matches an existing error boundary event / error start event subscription.
- Simplify: throw the BPMN error from a service task's delegateExecution or via runtimeService instead of a global listener, which gives clearer propagation semantics.
- If it persists with a valid model, check the Flowable version for known error-propagation bugs and upgrade.
Example fix
// before
throw new FlowableException("Error while propagating error-event for " + execution, e); // cause ignored at call site
// after
catch (Exception e) {
logger.error("error propagation failed for execution {}", execution.getId(), e.getCause());
throw new FlowableException("Error while propagating error-event for " + execution, e);
} Defensive patterns
Strategy: try-catch
Try / catch
try {
errorThrowingEventListener.onEvent(engineEvent);
} catch (FlowableException e) {
logger.error("error propagation failed", e.getCause() != null ? e.getCause() : e);
// fall back: mark execution/compensation as pending for manual handling
} Prevention
- Always log the root cause (getCause()) when wrapping exceptions.
- Validate the BPMN model (errorRefs, boundary events) at deploy time.
- Keep errorCode values consistent between throwers and catchers.
When it happens
Trigger: ErrorThrowingEventListener.onEvent calls ErrorPropagation.propagateError and that method throws (e.g. BpmnModel inconsistency, no error handler found where the propagation logic assumes one, or a downstream FlowableException during catch-event handling).
Common situations: BPMN XML with an error event definition whose referenced error is missing/malformed; boundary events on subprocesses with mismatched error refs; custom ErrorThrowingEventListener wired via flowable:event-listener without a matching catch; bugs after engine version upgrades in error-handling code paths.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- No execution context active and event (" + event + ") is not
- BPMN XSD could not be found
- The bpmn 2.0 xml is not properly encoded
- e.getMessage()
- The ${task} cannot be deleted because is part of a running p
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/bc1d742c3578d306.
Report an issue: GitHub.