flowable/flowable-engine · error · FlowableObjectNotFoundException

Could not find a resource with name

Error message

Could not find a resource with name '<resourceName>' in deployment '<deploymentId>

What it means

If the deployment's resource map contains no entry for the given resourceName, the method throws FlowableObjectNotFoundException("Could not find a resource with name '<resourceName>' in deployment '<deploymentId>'"). The deployment exists, but no resource in it has that exact name.

Solutions

  1. List resource names via GET /dmn-repository/deployments/{deploymentId}/resources and copy the exact name.
  2. Match the name case-sensitively, including any path prefix stored with the resource.
  3. Point the request at the correct deployment that actually contains the named resource.
  4. Redeploy the DMN file under the expected name if it was renamed.

Example fix

// before
byte[] data = client.getDeploymentResourceDataByName(deploymentId, "MyDecision.DMN"); // stored as 'my-decision.dmn'
// after
String exactName = client.getDeploymentResources(deploymentId).stream()
    .map(ResourceResponse::getName)
    .filter(n -> n.equalsIgnoreCase("MyDecision.DMN"))
    .findFirst().orElseThrow(() -> new IllegalStateException("resource not deployed"));
byte[] data = client.getDeploymentResourceDataByName(deploymentId, exactName);
Defensive patterns

Strategy: validation

Validate before calling

List<String> names = getDeploymentResources(deploymentId).stream()
    .map(ResourceResponse::getName).collect(toList());
if (!names.contains(resourceName)) throw new IllegalStateException("available: " + names);

Try / catch

try {
    return client.getDeploymentResourceDataByName(deploymentId, resourceName);
} catch (FlowableObjectNotFoundException e) {
    // resolve exact (case-sensitive) name from resources list and retry once
}

Prevention

When it happens

Trigger: GET /dmn-repository/deployments/{deploymentId}/resource-data/{resourceName} where resourceName does not match any resource name in the deployment: wrong file name, wrong deployment, case mismatch, or resource ids used in place of names.

Common situations: Deployments containing renamed DMN files; expecting auto-generated or path-prefixed names that differ from the original file name; case-sensitive filesystem vs DB name comparison; typos in configured names.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

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

        if (restApiInterceptor != null) {
            restApiInterceptor.accessDeploymentById(deployment);
        }

        List<String> resourceList = dmnRepositoryService.getDeploymentResourceNames(deploymentId);

        if (resourceList.contains(resourceName)) {
            String contentType = contentTypeResolver.resolveContentType(resourceName);
            response.setContentType(contentType);
            try (final InputStream resourceStream = dmnRepositoryService.getResourceAsStream(deploymentId, resourceName)) {
                return IOUtils.toByteArray(resourceStream);
                
            } catch (Exception e) {
                throw new FlowableException("Error converting resource stream", e);
            }
            
        } else {
            // Resource not found in deployment
            throw new FlowableObjectNotFoundException("Could not find a resource with name '" + resourceName + "' in deployment '" + deploymentId);
        }
    }
}

View on GitHub (pinned to d6d39ce1c6)