flowable/flowable-engine · error · ActivitiException

No process validator defined

Error message

No process validator defined

What it means

Thrown by ValidateBpmnModelCmd.execute() as ActivitiException when the engine configuration has no ProcessValidator configured (processEngineConfiguration.getProcessValidator() returns null) but validation is requested. Validation is an optional feature; without a validator there is nothing to run the BPMN model against.

Solutions

  1. Configure a validator: processEngineConfiguration.setProcessValidatorFactory(new DefaultProcessValidatorFactory()) (or setProcessValidator(...)) before starting the engine.
  2. If using Spring, ensure the processValidatorFactory bean is defined so the engine config picks it up.
  3. Alternatively validate without the engine: instantiate DefaultProcessValidatorFactory().createProcessValidator().validate(bpmnModel) directly.
  4. Guard the call: check config.getProcessValidator() != null before executing ValidateBpmnModelCmd.

Example fix

// before
List<ValidationError> errors = managementService.executeCommand(new ValidateBpmnModelCmd(bpmnModel)); // no validator configured
// after
ProcessEngineConfiguration cfg = processEngine.getProcessEngineConfiguration();
if (cfg.getProcessValidator() == null) {
    cfg.setProcessValidator(new DefaultProcessValidatorFactory().createProcessValidator());
}
List<ValidationError> errors = managementService.executeCommand(new ValidateBpmnModelCmd(bpmnModel));
Defensive patterns

Strategy: validation

Validate before calling

if (processEngine.getProcessEngineConfiguration().getProcessValidator() == null) {
    throw new IllegalStateException("Configure a ProcessValidator before validating BPMN models");
}

Try / catch

try {
    return managementService.executeCommand(new ValidateBpmnModelCmd(bpmnModel));
} catch (ActivitiException e) {
    if ("No process validator defined".equals(e.getMessage())) {
        ProcessValidator v = new DefaultProcessValidatorFactory().createProcessValidator();
        return v.validate(bpmnModel); // validate outside the engine instead
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling ManagementService.executeCommand(new ValidateBpmnModelCmd(bpmnModel)) or repository-service deployment-time validation paths when processValidator was never set on the ProcessEngineConfiguration.

Common situations: Custom validation tooling invoking the command without configuring a ProcessValidatorFactory/validator bean; copying engine config from a minimal setup that omits the default validator; accidental removal of the processValidator property during configuration refactoring.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/ValidateBpmnModelCmd.java:39

import org.flowable.validation.ProcessValidator;
import org.flowable.validation.ValidationError;

/**
 * @author Joram Barrez
 */
public class ValidateBpmnModelCmd implements Command<List<ValidationError>> {

    protected BpmnModel bpmnModel;

    public ValidateBpmnModelCmd(BpmnModel bpmnModel) {
        this.bpmnModel = bpmnModel;
    }

    @Override
    public List<ValidationError> execute(CommandContext commandContext) {
        ProcessValidator processValidator = commandContext.getProcessEngineConfiguration().getProcessValidator();
        if (processValidator == null) {
            throw new ActivitiException("No process validator defined");
        }

        return processValidator.validate(bpmnModel);
    }

}

View on GitHub (pinned to d6d39ce1c6)