flowable/flowable-engine · error · ActivitiIllegalArgumentException

Parent id is null

Error message

Parent id is null

What it means

ExecutionQueryImpl.parentId throws ActivitiIllegalArgumentException when the parentId argument is null. The parent criterion identifies parent executions for child-execution queries and must be a concrete non-null string.

Solutions

  1. Ensure the parent execution id is resolved (e.g. via an earlier query) before calling parentId
  2. Do not call parentId when there is no parent filter to apply
  3. Validate the id at the boundary of your service layer with a descriptive error

Example fix

// before
query.parentId(parentId);
// after
if (parentId != null) {
    query.parentId(parentId);
}
Defensive patterns

Strategy: validation

Validate before calling

if (parentId != null) { query.parentId(parentId); }

Type guard

boolean hasParent = parentId != null && !parentId.isEmpty();

Try / catch

try { q.parentId(pid); } catch (ActivitiIllegalArgumentException e) { log.warn("parentId null"); }

Prevention

When it happens

Trigger: Calling query.parentId(parentExecutionId) with a null parent id, e.g. when the parent execution lookup failed or the caller assumed a default value.

Common situations: Fetching child executions of a scope where the parent reference was never established; parallel-branch handling code that derives the parent id from a nullable context field.

Related errors


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

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ExecutionQueryImpl.java:203

        }
        this.executionId = executionId;
        return this;
    }

    @Override
    public ExecutionQueryImpl activityId(String activityId) {
        this.activityId = activityId;

        if (activityId != null) {
            isActive = true;
        }
        return this;
    }

    @Override
    public ExecutionQueryImpl parentId(String parentId) {
        if (parentId == null) {
            throw new ActivitiIllegalArgumentException("Parent id is null");
        }
        this.parentId = parentId;
        return this;
    }

    @Override
    public ExecutionQueryImpl executionTenantId(String tenantId) {
        if (tenantId == null) {
            throw new ActivitiIllegalArgumentException("execution tenant id is null");
        }
        this.tenantId = tenantId;
        return this;
    }

    @Override
    public ExecutionQueryImpl executionTenantIdLike(String tenantIdLike) {
        if (tenantIdLike == null) {
            throw new ActivitiIllegalArgumentException("execution tenant id is null");

View on GitHub (pinned to d6d39ce1c6)