{"record":{"id":"c6de5742006389e9","repo":"flowable/flowable-engine","slug":"no-process-validator-defined","errorCode":null,"errorMessage":"No process validator defined","messagePattern":"No process validator defined","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/ValidateBpmnModelCmd.java","lineNumber":40,"sourceCode":"import org.flowable.validation.ProcessValidator;\nimport org.flowable.validation.ValidationError;\n\n/**\n * @author Joram Barrez\n */\npublic class ValidateBpmnModelCmd implements Command<List<ValidationError>> {\n\n    protected BpmnModel bpmnModel;\n\n    public ValidateBpmnModelCmd(BpmnModel bpmnModel) {\n        this.bpmnModel = bpmnModel;\n    }\n\n    @Override\n    public List<ValidationError> execute(CommandContext commandContext) {\n        ProcessValidator processValidator = CommandContextUtil.getProcessEngineConfiguration(commandContext).getProcessValidator();\n        if (processValidator == null) {\n            throw new FlowableException(\"No process validator defined\");\n        }\n\n        return processValidator.validate(bpmnModel);\n    }\n\n}\n","sourceCodeStart":22,"sourceCodeEnd":47,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/ValidateBpmnModelCmd.java#L22-L47","documentation":"Thrown when ValidateBpmnModelCmd executes but the ProcessEngineConfiguration has no ProcessValidator configured. The command's sole purpose is to delegate BPMN model validation to the configured validator, so without one there is nothing to run and the command fails with a generic FlowableException.","triggerScenarios":"Invoking the repository deployment validation command (e.g. RepositoryService/management API path that triggers ValidateBpmnModelCmd) on an engine built without setting processValidator in the configuration.","commonSituations":"Programmatic engine configuration that omitted the ProcessValidator; a custom ProcessEngineConfigurator replaced the config and dropped the validator; tests building a minimal engine configuration without validation.","solutions":["Set a ProcessValidator on the configuration: processEngineConfiguration.setProcessValidator(new ProcessValidatorImpl()) or Spring XML equivalent.","If you build configuration programmatically, add validatorFactoryBean / ProcessValidator before engine build, matching the flowable-spring-boot default.","If validation is not wanted, avoid invoking the validate command rather than calling it with a null validator."],"exampleFix":"// before\nProcessEngineConfiguration cfg = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration(); // no validator\n// after\ncfg.setProcessValidator(new org.flowable.validation.validator.impl.ProcessValidatorImpl());","handlingStrategy":"validation","validationCode":"if (processEngineConfiguration.getProcessValidator() == null) { processEngineConfiguration.setProcessValidator(new ProcessValidatorImpl()); }","typeGuard":null,"tryCatchPattern":"try { validateCmd.execute(ctx); } catch (FlowableException e) { LOG.error(\"validator missing or failed\", e); }","preventionTips":["Mirror the flowable-spring-boot defaults when building configuration programmatically","Add a startup smoke test that deploys a trivial process to catch config gaps","Keep ProcessValidator set in a shared configuration module"],"tags":["configuration","validation","bpmn"],"backgroundTag":"missing-required-config","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}