flowable/flowable-engine · error · FlowableException

Form repository service is not available

Error message

Form repository service is not available

What it means

The command resolves the form repository service from the form engine configuration to query form definitions. When the form engine is not configured (no form engine configuration / repository service on the classpath or not initialized) it throws a plain FlowableException. This is an environment/configuration error, not a data error.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/GetFormDefinitionsForCaseDefinitionCmd.java:67

    @Override
    public List<FormDefinition> execute(CommandContext commandContext) {
        CaseDefinition caseDefinition = CaseDefinitionUtil.getCaseDefinition(caseDefinitionId);
        
        if (caseDefinition == null) {
            throw new FlowableObjectNotFoundException("Cannot find case definition for id: " + caseDefinitionId, CaseDefinition.class);
        }
        
        Case caseModel = CaseDefinitionUtil.getCase(caseDefinitionId);

        if (caseModel == null) {
            throw new FlowableObjectNotFoundException("Cannot find case definition for id: " + caseDefinitionId, Case.class);
        }

        formRepositoryService = CommandContextUtil.getFormEngineConfiguration(commandContext).getFormRepositoryService();

        if (formRepositoryService == null) {
            throw new FlowableException("Form repository service is not available");
        }

        List<FormDefinition> formDefinitions = getFormDefinitionsFromModel(caseModel, caseDefinition);

        return formDefinitions;
    }

    protected List<FormDefinition> getFormDefinitionsFromModel(Case caseModel, CaseDefinition caseDefinition) {
        Set<String> formKeys = new HashSet<>();
        List<FormDefinition> formDefinitions = new ArrayList<>();

        // for all user tasks
        List<HumanTask> humanTasks = caseModel.getPlanModel().findPlanItemDefinitionsOfType(HumanTask.class, true);
        
        for (HumanTask humanTask : humanTasks) {
            if (StringUtils.isNotEmpty(humanTask.getFormKey())) {
                formKeys.add(humanTask.getFormKey());
            }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Add the flowable-form-engine dependency and include FormEngineConfiguration in the engine configuration (e.g. via flowable-spring-boot-starter or process/standalone config with the form resource)
  2. Verify CommandContextUtil.getFormEngineConfiguration is wired in the used context (e.g. app engine with form engine enabled)
  3. If forms are not needed, do not invoke form-definition APIs instead of leaving the engine half-configured

Example fix

// before
// engine config without form engine
CmmnEngineConfiguration cfg = CmmnEngineConfiguration.createStandaloneConfig();
// after
CmmnEngineConfiguration cfg = CmmnEngineConfiguration.createStandaloneConfig();
cfg.setFormEngineConfiguration(new StandaloneFormEngineConfiguration()); // ensure form engine + repository service available
Defensive patterns

Strategy: validation

Validate before calling

try {
    FormRepositoryService frs = ProcessEngineConfigurationProvider.get().getFormEngineConfiguration().getFormRepositoryService();
    boolean available = frs != null;
} catch (Exception e) { boolean available = false; }

Type guard

boolean formEngineAvailable = formEngineConfiguration != null && formEngineConfiguration.getFormRepositoryService() != null;

Try / catch

try { return getFormDefinitionsForCaseDefinition(id); } catch (FlowableException e) { if (e.getMessage().contains("Form repository service")) { log.error("Form engine not configured"); return Collections.emptyList(); } throw e; }

Prevention

When it happens

Trigger: Running the CMMN engine without the form engine configured: flowable-form-engine not on the classpath, form engine not included in the engine configuration, or a custom configuration omitting the form repository service.

Common situations: Standalone CMMN deployment without flowable-form-engine-spring/config dependency; disabling the form engine intentionally then calling form-definition APIs; version mismatch where the form module was not bootstrapped.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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