flowable/flowable-engine · error · FlowableException

HTTP_TASK_REQUEST_METHOD_REQUIRED

Error message

HTTP_TASK_REQUEST_METHOD_REQUIRED

What it means

BaseHttpActivityDelegate.validateRequest requires every HTTP request built for an HTTP task to have a non-null method. If request.getMethod() is null, it throws FlowableException(HTTP_TASK_REQUEST_METHOD_REQUIRED), because no HTTP call can be made without a verb.

Solutions

  1. Set requestMethod (GET/POST/PUT/PATCH/DELETE) on the HTTP task definition or on the HttpRequest before execution.
  2. Verify field injection/delegate configuration so requestMethod reaches the delegate.
  3. Add a pre-execution check on process variables feeding the method field so it is never blank.

Example fix

// before
HttpRequest request = new HttpRequest();
request.setUrl("https://api.example.com"); // throws at validateRequest

// after
HttpRequest request = new HttpRequest();
request.setMethod("GET");
request.setUrl("https://api.example.com");
Defensive patterns

Strategy: validation

Validate before calling

if (request.getMethod() == null) {
    throw new IllegalArgumentException("requestMethod is required before executing HTTP task");
}

Try / catch

try {
    delegate.execute(execution);
} catch (FlowableException e) {
    if ("HTTP_TASK_REQUEST_METHOD_REQUIRED".equals(e.getMessage())) {
        // fix task configuration: set requestMethod
    }
}

Prevention

When it happens

Trigger: Executing an HTTP activity where the request method was never set — e.g. missing/requestMethod not configured on the HTTP task, or a programmatically built HttpRequest without setMethod(...).

Common situations: BPMN HTTP task missing the requestMethod attribute; field injection not applied (wrong delegate expression or missing field mapping); building HttpRequest in custom code and forgetting setMethod.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

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

        } else if (httpRequest instanceof AsyncExecutableHttpRequest) {

            return ((AsyncExecutableHttpRequest) httpRequest).callAsync()
                    .handle((response, throwable) -> new ExecutionData(request, response, throwable));
        }
        return taskInvoker.submit(() -> {
            try {
                return new ExecutionData(request, httpRequest.call());
            } catch (Exception ex) {
                return new ExecutionData(request, null, ex);
            }
        });
    }

    // HttpRequest validation

    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) {

View on GitHub (pinned to d6d39ce1c6)