{"record":{"id":"a645366271552cd5","repo":"flowable/flowable-engine","slug":"no-resource-name-provided-a64536","errorCode":null,"errorMessage":"No resource name provided","messagePattern":"No resource name provided","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/repository/BaseDmnDeploymentResourceDataResource.java","lineNumber":51,"sourceCode":" */\npublic class BaseDmnDeploymentResourceDataResource {\n\n    @Autowired\n    protected ContentTypeResolver contentTypeResolver;\n\n    @Autowired\n    protected DmnRepositoryService dmnRepositoryService;\n    \n    @Autowired(required=false)\n    protected DmnRestApiInterceptor restApiInterceptor;\n\n    protected byte[] getDmnDeploymentResourceData(String deploymentId, String resourceName, HttpServletResponse response) {\n\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"No deployment id provided\");\n        }\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"No resource name provided\");\n        }\n\n        // Check if deployment exists\n        DmnDeploymentQuery deploymentQuery = dmnRepositoryService.createDeploymentQuery().deploymentId(deploymentId);\n        \n        DmnDeployment deployment = deploymentQuery.singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a DMN deployment with id '\" + deploymentId);\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        List<String> resourceList = dmnRepositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {\n            String contentType = contentTypeResolver.resolveContentType(resourceName);","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/repository/BaseDmnDeploymentResourceDataResource.java#L33-L69","documentation":"getDmnDeploymentResourceData throws FlowableIllegalArgumentException(\"No resource name provided\") when resourceName is null. The resource-data endpoint looks a resource up by its exact name inside a deployment, so the name is a required path variable validated before the deployment query runs.","triggerScenarios":"GET /dmn-repository/deployments/{deploymentId}/resource-data/{resourceName} where the {resourceName} segment is missing or resolves to null/empty in the client-built URL.","commonSituations":"URL templates with an empty interpolated resource name; path-encoding bugs dropping the last segment; confusing the by-id resource endpoint with the by-name resource-data endpoint and omitting the wrong segment.","solutions":["Pass the exact resource name (e.g. 'my-decision.dmn') in the URL path.","Get valid resource names from GET /dmn-repository/deployments/{deploymentId}/resources before calling.","Fix client URL construction to fail fast on null/empty names."],"exampleFix":"// before\nbyte[] data = client.getDeploymentResourceDataByName(deploymentId, resourceName); // null\n// after\nString name = Optional.ofNullable(resourceName).filter(n -> !n.isEmpty())\n    .orElseGet(() -> listResourceNames(deploymentId).get(0));\nbyte[] data = client.getDeploymentResourceDataByName(deploymentId, name);","handlingStrategy":"validation","validationCode":"if (resourceName == null || resourceName.isEmpty()) {\n    resourceName = getDeploymentResources(deploymentId).get(0).getName();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fetch valid resource names from the deployment's resources endpoint","Check URL templates so no segment is left empty","Distinguish the by-id resources endpoint from the by-name resource-data endpoint"],"tags":["rest","validation","missing-parameter"],"backgroundTag":"missing-required-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}