flowable/flowable-engine · error · FlowableIllegalArgumentException
The decision table id is mandatory, but '<decisionTableId>'
Error message
The decision table id is mandatory, but '<decisionTableId>' has been provided.
What it means
GetDeploymentDmnResourceCmd's constructor requires a non-empty decision table id and throws FlowableIllegalArgumentException with the offending (blank) value otherwise. It is the same fail-fast pattern as the DRD diagram command, applied when fetching the raw DMN resource for a decision table.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/GetDeploymentDmnResourceCmd.java:37
import org.flowable.common.engine.api.FlowableIllegalArgumentException;
import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.dmn.engine.impl.persistence.entity.DecisionEntity;
import org.flowable.dmn.engine.impl.util.CommandContextUtil;
/**
* Gives access to a deployed decision table model, e.g., a DMN XML file, through a stream of bytes.
*
* @author Tijs Rademakers
*/
public class GetDeploymentDmnResourceCmd implements Command<InputStream>, Serializable {
private static final long serialVersionUID = 1L;
protected String decisionTableId;
public GetDeploymentDmnResourceCmd(String decisionTableId) {
if (decisionTableId == null || decisionTableId.length() < 1) {
throw new FlowableIllegalArgumentException("The decision table id is mandatory, but '" + decisionTableId + "' has been provided.");
}
this.decisionTableId = decisionTableId;
}
@Override
public InputStream execute(CommandContext commandContext) {
DecisionEntity decisionTable = CommandContextUtil.getDmnEngineConfiguration().getDeploymentManager().findDeployedDecisionById(decisionTableId);
String deploymentId = decisionTable.getDeploymentId();
String resourceName = decisionTable.getResourceName();
InputStream processModelStream = new GetDeploymentResourceCmd(deploymentId, resourceName).execute(commandContext);
return processModelStream;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Supply the decision table id from a real deployment: DmnDecisionTable.getId() from a repository query
- Validate non-null/non-empty before constructing the command
- If ids are generated client-side, ensure the generation step actually ran (check for empty string rather than just null)
Example fix
// before
new GetDeploymentDmnResourceCmd(tableIdOrEmpty); // may be ""
// after
if (tableId == null || tableId.isEmpty()) {
throw new BadRequestException("decisionTableId is required");
}
new GetDeploymentDmnResourceCmd(tableId); Defensive patterns
Strategy: validation
Validate before calling
if (decisionTableId == null || decisionTableId.isEmpty()) throw new IllegalArgumentException("decision table id is required"); Try / catch
try { new GetDeploymentDmnResourceCmd(id); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().startsWith("The decision table id is mandatory")) { throw new BadRequestException("decisionTableId required"); } throw e; } Prevention
- Obtain ids from DmnDecisionTable entities returned by queries
- Treat blank strings as invalid everywhere, not just null
- Add bean validation on DTOs carrying ids
When it happens
Trigger: new GetDeploymentDmnResourceCmd(null) or length < 1 — e.g. dmnRepositoryService.getDecisionTableResource? or getDeploymentResource flow invoked with a null decisionTableId.
Common situations: Passing the id from an unset variable or empty optional; REST layer accepting blank path segments; migrating code from another engine API where empty ids were tolerated.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- decisionKey is null
- The decision id is mandatory, but '<decisionId>' has been pr
- Cannot find case definition for id:
- DMN repository service is not available
- The query is already in an or statement
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d9559e95a061f072.
Report an issue: GitHub.