flowable/flowable-engine · error · FlowableIllegalArgumentException

File must be of type .dmn

Error message

File must be of type .dmn

What it means

The uploaded deployment file's name failed DmnResourceUtil.isDmnResource(name), i.e. it does not end with the .dmn (or accepted DMN) extension. Flowable only accepts files recognized as DMN resources when creating a deployment via this REST endpoint and throws FlowableIllegalArgumentException otherwise.

Solutions

  1. Rename the file so it ends in .dmn before uploading.
  2. Verify the content is DMN XML, not BPMN or another format.
  3. If deploying a package (.bar/.zip) with mixed resources, use the appropriate deployment path or split it.
  4. Check DmnResourceUtil.isDmnResource for the exact accepted suffixes in your Flowable version.

Example fix

// before
curl -F 'file=@decision.xml' http://host/dmn-repository/deployments
// after
cp decision.xml decision.dmn
curl -F 'file=@decision.dmn' http://host/dmn-repository/deployments
Defensive patterns

Strategy: validation

Validate before calling

if (!fileName.toLowerCase().endsWith('.dmn')) throw new Error('only .dmn files are accepted for DMN deployments');

Try / catch

try { return await deploy(file); }
catch (e) { if (/must be of type .dmn/.test(e.message)) { console.error(`rename ${file.name} to ${file.name}.dmn`); } throw e; }

Prevention

When it happens

Trigger: Uploading a file with extension .xml, .txt, .bpmn, or .dmn.xml-variant not matched by isDmnResource to POST /dmn-repository/deployments.

Common situations: Renaming BPMN files to deploy into the DMN app, exporting models with wrong extensions, uploading zipped files (.zip/.bar) where the endpoint expects a single .dmn resource, or missing file extension after download.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/repository/DmnDeploymentCollectionResource.java:187

            throw new FlowableIllegalArgumentException("Multipart request with file content is required");
        }

        MultipartFile file = multipartRequest.getFileMap().values().iterator().next();

        try {
            DmnDeploymentBuilder deploymentBuilder = dmnRepositoryService.createDeployment();
            String fileName = file.getOriginalFilename();
            if (StringUtils.isEmpty(fileName) || !DmnResourceUtil.isDmnResource(fileName)) {
                fileName = file.getName();
            }

            if (DmnResourceUtil.isDmnResource(fileName)) {
                try (final InputStream fileInputStream = file.getInputStream()) {
                    deploymentBuilder.addInputStream(fileName, fileInputStream);
                }
                
            } else {
                throw new FlowableIllegalArgumentException("File must be of type .dmn");
            }
            
            deploymentBuilder.name(fileName);

            if (tenantId != null) {
                deploymentBuilder.tenantId(tenantId);
            }

            if (restApiInterceptor != null) {
                restApiInterceptor.enhanceDeployment(deploymentBuilder);
            }

            DmnDeployment deployment = deploymentBuilder.deploy();

            return dmnRestResponseFactory.createDmnDeploymentResponse(deployment);

        } catch (Exception e) {
            if (e instanceof FlowableException) {

View on GitHub (pinned to d6d39ce1c6)