flowable/flowable-engine · error · FlowableException
DMN repository service is not available
Error message
DMN repository service is not available
What it means
FlowableException thrown when CommandContextUtil.getDmnRepositoryService() returns null inside GetDecisionsForProcessDefinitionCmd.execute. It means the process engine has no DMN engine/repository service wired in, so decision information cannot be fetched even though the BPMN model exists. This is an engine configuration problem, not a data problem.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDecisionsForProcessDefinitionCmd.java:65
this.processDefinitionId = processDefinitionId;
}
@Override
public List<DmnDecision> execute(CommandContext commandContext) {
ProcessDefinition processDefinition = ProcessDefinitionUtil.getProcessDefinition(processDefinitionId);
if (processDefinition == null) {
throw new FlowableObjectNotFoundException("Cannot find process definition for id: " + processDefinitionId, ProcessDefinition.class);
}
BpmnModel bpmnModel = ProcessDefinitionUtil.getBpmnModel(processDefinitionId);
if (bpmnModel == null) {
throw new FlowableObjectNotFoundException("Cannot find bpmn model for process definition id: " + processDefinitionId, BpmnModel.class);
}
if (CommandContextUtil.getDmnRepositoryService() == null) {
throw new FlowableException("DMN repository service is not available");
}
dmnRepositoryService = CommandContextUtil.getDmnRepositoryService();
List<DmnDecision> decisions = getDecisionsFromModel(bpmnModel, processDefinition);
return decisions;
}
protected List<DmnDecision> getDecisionsFromModel(BpmnModel bpmnModel, ProcessDefinition processDefinition) {
Set<String> decisionKeys = new HashSet<>();
List<DmnDecision> decisions = new ArrayList<>();
List<ServiceTask> serviceTasks = bpmnModel.getMainProcess().findFlowElementsOfType(ServiceTask.class, true);
for (ServiceTask serviceTask : serviceTasks) {
if ("dmn".equals(serviceTask.getType())) {
if (serviceTask.getFieldExtensions() != null && serviceTask.getFieldExtensions().size() > 0) {
for (FieldExtension fieldExtension : serviceTask.getFieldExtensions()) {
if ("decisionTableReferenceKey".equals(fieldExtension.getFieldName())) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add the flowable-dmn-engine (or flowable-dmn-spring-configurer / spring-boot-starter) dependency and ensure the DMN engine is initialized with the process engine.
- Check your ProcessEngineConfiguration / processEngineConfiguration.xml so the DMN repository service is registered and accessible via CommandContextUtil.
- If DMN is not needed, do not call getDecisionsForProcessDefinition; guard the call on whether DMN support is configured.
- Catch FlowableException and degrade gracefully (return empty decision list) when DMN is optional in your environment.
Example fix
// before
EngineConfiguration cfg = new StandaloneProcessEngineConfiguration(); // no DMN wiring
// after
EngineConfiguration cfg = new StandaloneProcessEngineConfiguration()
.setEnableDatabaseEventLogging(false);
DmnEngine dmnEngine = DmnEngineConfiguration
.createStandaloneDmnEngineConfiguration().buildDmnEngine();
cfg.setDmnEngineRepositoryService(dmnEngine.getDmnRepositoryService()); Defensive patterns
Strategy: validation
Validate before calling
// fail fast at startup if DMN support is required
DmnRepositoryService drs = engineConfig.getDmnEngineRepositoryService();
if (drs == null) throw new IllegalStateException("DMN engine not configured"); Type guard
boolean isDmnAvailable(ProcessEngine engine) {
try {
return engine.getRuntimeService() != null
&& engine.getConfig().getDmnEngineRepositoryService() != null; // adjust to your accessor
} catch (Exception e) {
return false;
}
} Try / catch
try {
return repositoryService.getDecisionsForProcessDefinition(id);
} catch (FlowableException e) {
if (e.getMessage().contains("DMN repository service is not available")) {
log.error("DMN support not configured");
return Collections.emptyList();
}
throw e;
} Prevention
- Add the flowable-dmn-engine dependency whenever decision tables are referenced from BPMN.
- Assert DMN engine availability in a startup health check.
- Keep process engine and DMN engine configuration in one place so they are initialized together.
- Feature-flag decision queries and test with DMN disabled to catch config drift.
When it happens
Trigger: Calling getDecisionsForProcessDefinition(...) on an engine configured without a DMN repository service (no DMN engine dependency, DMN engine not started, or a custom ProcessEngineConfiguration that never sets dmnRepositoryService).
Common situations: Application includes flowable-engine but not the DMN engine dependency on the classpath; embedded engine built programmatically without starting the DMN engine; Spring Boot app with dmn support excluded; upgrade where the DMN engine config was dropped.
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
- DMN repository service is not available
- Could not execute decision instance: no dmn service found. F
- Dmn engine is not configured
- HitPolicy behavior: %s not configured
- To use the case service task a CaseInstanceService implement
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/aff40263977c530e.
Report an issue: GitHub.