flowable/flowable-engine · error · FlowableIllegalArgumentException

No deployment id provided

Error message

No deployment id provided

What it means

Thrown by AppDeploymentResourceDataResource.getAppDeploymentResource when the deploymentId path variable is null. In normal Spring MVC routing a path variable cannot be null, so this guard effectively fires when the method is invoked programmatically or bound unusually; it enforces that both deploymentId and resourceName are supplied before any lookup. A twin guard exists for a null resourceName immediately after.

Source

Thrown at modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceDataResource.java:65

    @Autowired
    protected AppRepositoryService appRepositoryService;
    
    @Autowired(required=false)
    protected AppRestApiInterceptor restApiInterceptor;

    @ApiOperation(value = "Get an app deployment resource content", tags = {"App Deployments" }, nickname = "getAppDeploymentResource",
            notes = "The response body will contain the binary resource-content for the requested resource. The response content-type will be the same as the type returned in the resources mimeType property. Also, a content-disposition header is set, allowing browsers to download the file instead of displaying it.")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Indicates both app deployment and resource have been found and the resource data has been returned."),
            @ApiResponse(code = 404, message = "Indicates the requested app deployment was not found or there is no resource with the given id present in the app deployment. The status-description contains additional information.") })
    @GetMapping(value = "/app-repository/deployments/{deploymentId}/resourcedata/{resourceName}")
    @ResponseBody
    public byte[] getAppDeploymentResource(@ApiParam(name = "deploymentId") @PathVariable("deploymentId") String deploymentId,
            @ApiParam(name = "resourceName") @PathVariable("resourceName") String resourceName,
            HttpServletResponse response) {
        
        if (deploymentId == null) {
            throw new FlowableIllegalArgumentException("No deployment id provided");
        }
        if (resourceName == null) {
            throw new FlowableIllegalArgumentException("No resource name provided");
        }

        // Check if deployment exists
        AppDeployment deployment = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
        if (deployment == null) {
            throw new FlowableObjectNotFoundException("Could not find an app deployment with id '" + deploymentId);
        }
        
        if (restApiInterceptor != null) {
            restApiInterceptor.accessDeploymentById(deployment);
        }

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

        if (resourceList.contains(resourceName)) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Call the endpoint via its mapped URL /app-repository/deployments/{deploymentId}/resources/{resourceName} with both segments populated.
  2. If invoking the method directly (tests), pass non-null ids.
  3. Review custom interceptor/controller forwarding that may strip path variables.
  4. Also supply resourceName — the same guard fires for it immediately after.

Example fix

// before
resource.getAppDeploymentResource(null, "my.app", response);
// after
resource.getAppDeploymentResource(deploymentId, resourceName, response); // both non-null
Defensive patterns

Strategy: validation

Validate before calling

// Guard before calling (e.g. in tests or programmatic use)
Objects.requireNonNull(deploymentId, "deploymentId must not be null");
Objects.requireNonNull(resourceName, "resourceName must not be null");
byte[] data = resource.getAppDeploymentResource(deploymentId, resourceName, response);

Type guard

boolean hasPathVars(String deploymentId, String resourceName) {
    return deploymentId != null && !deploymentId.isEmpty()
        && resourceName != null && !resourceName.isEmpty();
}

Try / catch

try {
    byte[] data = getAppDeploymentResource(deploymentId, resourceName, response);
} catch (FlowableIllegalArgumentException e) {
    if (e.getMessage().contains("No deployment id provided")) {
        throw new IllegalArgumentException("Both deploymentId and resourceName path segments are required");
    }
    throw e;
}

Prevention

When it happens

Trigger: Direct/programmatic invocation of getAppDeploymentResource with a null deploymentId; malformed path mapping or custom controller wiring where the variable is not populated.

Common situations: Unit tests calling the method directly; custom routing/forwarding that drops a path segment; template mistakes producing empty segments bound as null by non-standard resolvers.

Related errors


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