{"record":{"id":"710e0b211adc9a06","repo":"flowable/flowable-engine","slug":"http-task-request-method-required","errorCode":null,"errorMessage":"HTTP_TASK_REQUEST_METHOD_REQUIRED","messagePattern":"HTTP_TASK_REQUEST_METHOD_REQUIRED","errorType":"validation","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/BaseHttpActivityDelegate.java","lineNumber":242,"sourceCode":"        } else if (httpRequest instanceof AsyncExecutableHttpRequest) {\n\n            return ((AsyncExecutableHttpRequest) httpRequest).callAsync()\n                    .handle((response, throwable) -> new ExecutionData(request, response, throwable));\n        }\n        return taskInvoker.submit(() -> {\n            try {\n                return new ExecutionData(request, httpRequest.call());\n            } catch (Exception ex) {\n                return new ExecutionData(request, null, ex);\n            }\n        });\n    }\n\n    // HttpRequest validation\n\n    protected void validateRequest(HttpRequest request) throws FlowableException {\n        if (request.getMethod() == null) {\n            throw new FlowableException(HTTP_TASK_REQUEST_METHOD_REQUIRED);\n        }\n\n        switch (request.getMethod()) {\n            case \"GET\":\n            case \"POST\":\n            case \"PUT\":\n            case \"PATCH\":\n            case \"DELETE\":\n                break;\n            default:\n                throw new FlowableException(HTTP_TASK_REQUEST_METHOD_INVALID);\n        }\n\n        if (request.getUrl() == null) {\n            throw new FlowableException(HTTP_TASK_REQUEST_URL_REQUIRED);\n        }\n    }\n    protected HttpHeaders getRequestHeaders(VariableContainer variableContainer) {","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/BaseHttpActivityDelegate.java#L224-L260","documentation":"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.","triggerScenarios":"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(...).","commonSituations":"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.","solutions":["Set requestMethod (GET/POST/PUT/PATCH/DELETE) on the HTTP task definition or on the HttpRequest before execution.","Verify field injection/delegate configuration so requestMethod reaches the delegate.","Add a pre-execution check on process variables feeding the method field so it is never blank."],"exampleFix":"// before\nHttpRequest request = new HttpRequest();\nrequest.setUrl(\"https://api.example.com\"); // throws at validateRequest\n\n// after\nHttpRequest request = new HttpRequest();\nrequest.setMethod(\"GET\");\nrequest.setUrl(\"https://api.example.com\");","handlingStrategy":"validation","validationCode":"if (request.getMethod() == null) {\n    throw new IllegalArgumentException(\"requestMethod is required before executing HTTP task\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    delegate.execute(execution);\n} catch (FlowableException e) {\n    if (\"HTTP_TASK_REQUEST_METHOD_REQUIRED\".equals(e.getMessage())) {\n        // fix task configuration: set requestMethod\n    }\n}","preventionTips":["Always set requestMethod in BPMN HTTP task definitions","Validate field injection/delegate expressions during process deployment","Fail fast in custom builders when method is missing","Add process-definition validation tests that exercise validateRequest paths"],"tags":["http","validation","missing-config","http-task"],"backgroundTag":"missing-required-config-field","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"}