flowable/flowable-engine · error · FlowableIllegalArgumentException

formInfo is null

Error message

formInfo is null

What it means

PlanItemInstanceTransitionBuilderImpl.formVariables(Map, FormInfo, String) throws FlowableIllegalArgumentException when the formInfo argument is null. Form metadata is required to bind the submitted variables and outcome to a form definition, so the API refuses null.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/PlanItemInstanceTransitionBuilderImpl.java:78

        variables.put(variableName, variableValue);
        return this;
    }

    @Override
    public PlanItemInstanceTransitionBuilder variables(Map<String, Object> variables) {
        if (this.variables == null) {
            this.variables = new HashMap<>();
        }
        if (variables != null) {
            this.variables.putAll(variables);
        }
        return this;
    }

    @Override
    public PlanItemInstanceTransitionBuilder formVariables(Map<String, Object> variables, FormInfo formInfo, String outcome) {
        if (formInfo == null) {
            throw new FlowableIllegalArgumentException("formInfo is null");
        }

        if (this.formVariables == null) {
            this.formVariables = new HashMap<>();
        }

        if (variables != null) {
            this.formVariables.putAll(variables);
        }

        this.formOutcome = outcome;
        this.formInfo = formInfo;
        return this;
    }

    @Override
    public PlanItemInstanceTransitionBuilder localVariable(String variableName, Object variableValue) {
        if (localVariables == null) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Fetch a valid FormInfo via FormService.getFormModelWithAllVariables() (or FormRepositoryService) before calling formVariables.
  2. If there is no form, call formVariables(variables, null, null) is invalid — instead use the plain variables API (variables(map)) on the transition builder.
  3. Check that the form definition is deployed and the lookup key is correct so formInfo is not null.

Example fix

// before
builder.formVariables(vars, null, outcome); // formInfo null
// after
FormInfo formInfo = formService.createFormInfo().formKey("startForm").tenantId(tenant).getFormInfo();
builder.formVariables(vars, formInfo, outcome);
Defensive patterns

Strategy: validation

Validate before calling

if (formInfo == null) { usePlainVariablesInstead = true; }

Try / catch

try { builder.formVariables(vars, formInfo, outcome); } catch (FlowableIllegalArgumentException e) { builder.variables(vars); }

Prevention

When it happens

Trigger: Calling transitionBuilder.formVariables(variables, null, outcome), typically when form metadata retrieval (FormRepositoryService/FormService) returned null or was skipped.

Common situations: Start-form handling in custom REST endpoints where formInfo lookup failed silently; migration from older Flowable versions where forms were optional; conditional form deployment missing in the target environment.

Related errors


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