flowable/flowable-engine · critical · FlowableException

Process model for ${executionEntity} could not be found

Error message

Process model for ${executionEntity} could not be found

What it means

Flowable throws this when the BPMN process model for the execution's process definition cannot be resolved while activating a compensation boundary event. BoundaryCompensateEventActivityBehavior.execute() calls ProcessDefinitionUtil.getProcess(processDefinitionId) and fails hard if it returns null, because it cannot locate the boundary event's associations without the model. This normally indicates a corrupt or inconsistent deployment/definition cache rather than user input.

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/BoundaryCompensateEventActivityBehavior.java:56

public class BoundaryCompensateEventActivityBehavior extends BoundaryEventActivityBehavior {

    private static final long serialVersionUID = 1L;

    protected CompensateEventDefinition compensateEventDefinition;

    public BoundaryCompensateEventActivityBehavior(CompensateEventDefinition compensateEventDefinition, boolean interrupting) {
        super(interrupting);
        this.compensateEventDefinition = compensateEventDefinition;
    }

    @Override
    public void execute(DelegateExecution execution) {
        ExecutionEntity executionEntity = (ExecutionEntity) execution;
        BoundaryEvent boundaryEvent = (BoundaryEvent) execution.getCurrentFlowElement();

        Process process = ProcessDefinitionUtil.getProcess(execution.getProcessDefinitionId());
        if (process == null) {
            throw new FlowableException("Process model for " + executionEntity + " could not be found");
        }

        Activity sourceActivity = null;
        Activity compensationActivity = null;
        List<Association> associations = process.findAssociationsWithSourceRefRecursive(boundaryEvent.getId());
        for (Association association : associations) {
            sourceActivity = boundaryEvent.getAttachedToRef();
            FlowElement targetElement = process.getFlowElement(association.getTargetRef(), true);
            if (targetElement instanceof Activity activity) {
                if (activity.isForCompensation()) {
                    compensationActivity = activity;
                    break;
                }
            }
        }
        
        if (sourceActivity == null) {
            throw new FlowableException("Parent activity for boundary compensation event could not be found for " + executionEntity);

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Verify the process definition still exists: query ACT_RE_PROCDEF for the processDefinitionId shown in the message; redeploy the BPMN model if it was deleted.
  2. Restart the engine node (or clear/rebuild the process definition cache) so ProcessDefinitionUtil can reload the model from the database.
  3. Check that processDefinitionId on the execution is not being altered by custom code (ExecutionListeners, custom CommandContext handling).
  4. If in a cluster, ensure all nodes deploy from the same database and cache invalidation propagates.
Defensive patterns

Strategy: validation

Validate before calling

boolean isDefinitionDeployable(String processDefinitionId) {
    ProcessDefinition def = repositoryService.createProcessDefinitionQuery()
        .processDefinitionId(processDefinitionId).singleResult();
    return def != null && !def.isSuspended();
}

Try / catch

try {
    runtimeService.signal(executionId);
} catch (FlowableException e) {
    if (e.getMessage().startsWith("Process model for")) {
        // definition missing: redeploy model or restart instance
    }
}

Prevention

When it happens

Trigger: Executing a process containing a boundary compensate event whose process definition cannot be loaded via ProcessDefinitionUtil.getProcess() — e.g. the definition was deleted from ACT_RE_PROCDEF, the definition cache was cleared/invalidated mid-execution, or a dynamic/injected processDefinitionId does not match any deployed model.

Common situations: Deleting process definitions while process instances are still running; custom code that manipulates the deployment cache; cluster environments with inconsistent in-memory definition caches; migrating process definitions across engines without redeploying the model.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/2da7a4f6eb825a2d. Report an issue: GitHub.