{"record":{"id":"c9477006adc01870","repo":"flowable/flowable-engine","slug":"no-resource-name-provided-c94770","errorCode":null,"errorMessage":"No resource name provided","messagePattern":"No resource name provided","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/BaseDeploymentResourceDataResource.java","lineNumber":51,"sourceCode":" */\npublic class BaseDeploymentResourceDataResource {\n\n    @Autowired\n    protected ContentTypeResolver contentTypeResolver;\n\n    @Autowired\n    protected RepositoryService repositoryService;\n    \n    @Autowired(required=false)\n    protected BpmnRestApiInterceptor restApiInterceptor;\n\n    protected byte[] getDeploymentResourceData(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        Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + deploymentId + \"'.\", Deployment.class);\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {\n            String contentType = contentTypeResolver.resolveContentType(resourceName);\n            response.setContentType(contentType);\n            try (final InputStream resourceStream = repositoryService.getResourceAsStream(deploymentId, resourceName)) {","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/BaseDeploymentResourceDataResource.java#L33-L69","documentation":"getDeploymentResourceData validates that a resourceName was supplied after checking the deploymentId. A null resourceName throws FlowableIllegalArgumentException. Resource content can only be fetched when both the deployment and the resource name identify the artifact.","triggerScenarios":"Requesting resource data with a null resourceName (e.g. empty {resourceName} path segment or direct call to the helper with null).","commonSituations":"Resource name lost during URL encoding/splitting (names often contain slashes like 'bpmn/process.bpmn20.xml'); client builds URL with missing resource segment; custom code calling the protected method directly.","solutions":["Supply the full resource name from GET /repository/deployments/{deploymentId}/resources in the URL.","URL-encode resource names containing slashes or special characters.","Validate resourceName non-null/non-empty before issuing the request."],"exampleFix":"// before\nGET /repository/deployments/2501/resourcedata/\n// after\nGET /repository/deployments/2501/resourcedata/processes.bpmn20.xml","handlingStrategy":"validation","validationCode":"if (!resourceName) throw new Error('resourceName is required');","typeGuard":null,"tryCatchPattern":"try { ... } catch (e) { if (e.status === 400) log.error('Missing resource name'); throw e; }","preventionTips":["Obtain resource names from the deployment resources listing, never construct them.","URL-encode resource names containing slashes or special characters.","Validate all path segments non-empty before requesting."],"tags":["rest-api","invalid-argument","missing-parameter","resource"],"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-18T16:17:23.245Z"}