flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find a resource with id '<resourceName>' in deploy
Error message
Could not find a resource with id '<resourceName>' in deployment '<deploymentId>'.
What it means
Thrown by the app-engine REST layer when a GET on /app-repository/deployments/{deploymentId}/resources/{resourceName} requests a resource whose name (extracted from the request path) is not present in the deployment's resource list. The deployment itself exists, but it contains no artifact with that name, so no stream can be served.
Source
Thrown at modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceResource.java:97
if (deployment == null) {
throw new FlowableObjectNotFoundException("Could not find a deployment with id '" + deploymentId + "'.");
}
if (restApiInterceptor != null) {
restApiInterceptor.accessDeploymentById(deployment);
}
String pathInfo = request.getPathInfo();
String resourceName = pathInfo.replace("/app-repository/deployments/" + deploymentId + "/resources/", "");
List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);
if (resourceList.contains(resourceName)) {
// Build resource representation
return restResponseFactory.createDeploymentResourceResponse(deploymentId, resourceName, contentTypeResolver.resolveContentType(resourceName));
} else {
// Resource not found in deployment
throw new FlowableObjectNotFoundException("Could not find a resource with id '" + resourceName + "' in deployment '" + deploymentId + "'.");
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- List resources first via GET .../app-deployments/{deploymentId}/resources
- Use the exact resource name returned there
- Verify the resource belongs to this deployment, not another one
Example fix
// before GET /app-repository/app-deployments/123/resources/processes/my-process.bpmn20.xml // after GET /app-repository/app-deployments/123/resources # returns app.cmmn.json etc. GET /app-repository/app-deployments/123/resources/app.cmmn.json
Defensive patterns
Strategy: validation
Validate before calling
List<String> resources = repositoryService.getDeploymentResourceNames(deploymentId);
if (!resources.contains(resourceName)) { throw new IllegalArgumentException("Unknown resource " + resourceName); } Try / catch
try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body("Resource not in deployment"); } Prevention
- List deployment resources first and copy exact names
- Match case exactly
- Do not assume process resources exist in app deployments
When it happens
Trigger: GET /app-repository/app-deployments/{deploymentId}/resources/{resourceName} with a name not in that deployment's resource set.
Common situations: Requesting a process definition resource from an app deployment, wrong casing, names altered by URL decoding (e.g. %20 vs space).
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
- Could not find a resource with id '<resourceName>' in deploy
- Could not find an app deployment with id '<deploymentId>
- Could not find an app deployment with id '<deploymentId>
- Could not find a resource with name '<resourceName>' in depl
- Could not find a deployment with id '<deploymentId>'.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/f2a961da2a3a31a7.
Report an issue: GitHub.