flowable/flowable-engine · error · FlowableException

HTTP_TASK_REQUEST_URL_REQUIRED

Error message

HTTP_TASK_REQUEST_URL_REQUIRED

What it means

Flowable's BaseHttpActivityDelegate validates the HTTP task request before execution. If the request URL expression resolves to null, it throws FlowableException(HTTP_TASK_REQUEST_URL_REQUIRED) because an HTTP activity cannot issue a request without a target URL. This is a fail-fast validation performed in validateRequest after the method has been validated.

Source

Thrown at modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/BaseHttpActivityDelegate.java:257

    protected void validateRequest(HttpRequest request) throws FlowableException {
        if (request.getMethod() == null) {
            throw new FlowableException(HTTP_TASK_REQUEST_METHOD_REQUIRED);
        }

        switch (request.getMethod()) {
            case "GET":
            case "POST":
            case "PUT":
            case "PATCH":
            case "DELETE":
                break;
            default:
                throw new FlowableException(HTTP_TASK_REQUEST_METHOD_INVALID);
        }

        if (request.getUrl() == null) {
            throw new FlowableException(HTTP_TASK_REQUEST_URL_REQUIRED);
        }
    }
    protected HttpHeaders getRequestHeaders(VariableContainer variableContainer) {
        return parseRequestHeaders(variableContainer, requestHeaders, HTTP_TASK_REQUEST_HEADERS_INVALID);
    }

    protected HttpHeaders getRequestSecureHeaders(VariableContainer variableContainer) {
        return parseRequestHeaders(variableContainer, requestSecureHeaders, HTTP_TASK_REQUEST_SECURE_HEADERS_INVALID);
    }

    protected HttpHeaders parseRequestHeaders(VariableContainer variableContainer, Expression headers, String errorPrefix) {
        try {
            String headersString = ExpressionUtils.getStringFromField(headers, variableContainer);
            return HttpHeaders.parseFromString(headersString);
        } catch (FlowableIllegalArgumentException ex) {
            throw new FlowableException(errorPrefix + " for " + variableContainer, ex);
        }
    }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Set the requestUrl attribute (or requestExpression) on the flowable:httpTask in the BPMN XML
  2. Ensure the variable referenced by the URL expression is set before the HTTP task executes (e.g. via an execution listener or earlier service task)
  3. Add a default in the expression, e.g. ${targetUrl != null ? targetUrl : 'https://default.example.com'}
  4. Validate the process definition at deploy time with a unit test that reaches the HTTP task

Example fix

// before
<flowable:httpTask requestMethod="GET" />
// after
<flowable:httpTask requestMethod="GET" requestUrl="https://api.example.com/users" />
Defensive patterns

Strategy: validation

Validate before calling

String url = (String) execution.getVariable("requestUrl");
if (url == null || url.isBlank()) {
    throw new IllegalArgumentException("requestUrl must be set before the HTTP task executes");
}

Type guard

boolean hasUrl(VariableContainer c) { Object v = c.getVariable("requestUrl"); return v instanceof String s && !s.isBlank(); }

Try / catch

try {
    httpActivityBehavior.execute(execution);
} catch (FlowableException e) {
    if ("HTTP_TASK_REQUEST_URL_REQUIRED".equals(e.getMessage())) {
        // set default url or fail the process with a clear message
    } else { throw e; }
}

Prevention

When it happens

Trigger: The httpActivity's requestUrl/requestExpression field is unset, or the URL expression evaluates to null against the current execution variables (e.g. a variable holding the URL was never set before the HTTP task ran).

Common situations: Deploying a BPMN model where the requestUrl attribute was accidentally omitted; relying on an expression like ${targetUrl} whose variable is only set in a branch that did not execute; renaming a process variable without updating the HTTP task configuration.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — 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/2b034834d9686f01. Report an issue: GitHub.