{"record":{"id":"2b034834d9686f01","repo":"flowable/flowable-engine","slug":"http-task-request-url-required","errorCode":null,"errorMessage":"HTTP_TASK_REQUEST_URL_REQUIRED","messagePattern":"HTTP_TASK_REQUEST_URL_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":257,"sourceCode":"\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) {\n        return parseRequestHeaders(variableContainer, requestHeaders, HTTP_TASK_REQUEST_HEADERS_INVALID);\n    }\n\n    protected HttpHeaders getRequestSecureHeaders(VariableContainer variableContainer) {\n        return parseRequestHeaders(variableContainer, requestSecureHeaders, HTTP_TASK_REQUEST_SECURE_HEADERS_INVALID);\n    }\n\n    protected HttpHeaders parseRequestHeaders(VariableContainer variableContainer, Expression headers, String errorPrefix) {\n        try {\n            String headersString = ExpressionUtils.getStringFromField(headers, variableContainer);\n            return HttpHeaders.parseFromString(headersString);\n        } catch (FlowableIllegalArgumentException ex) {\n            throw new FlowableException(errorPrefix + \" for \" + variableContainer, ex);\n        }\n    }","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/BaseHttpActivityDelegate.java#L239-L275","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Set the requestUrl attribute (or requestExpression) on the flowable:httpTask in the BPMN XML","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)","Add a default in the expression, e.g. ${targetUrl != null ? targetUrl : 'https://default.example.com'}","Validate the process definition at deploy time with a unit test that reaches the HTTP task"],"exampleFix":"// before\n<flowable:httpTask requestMethod=\"GET\" />\n// after\n<flowable:httpTask requestMethod=\"GET\" requestUrl=\"https://api.example.com/users\" />","handlingStrategy":"validation","validationCode":"String url = (String) execution.getVariable(\"requestUrl\");\nif (url == null || url.isBlank()) {\n    throw new IllegalArgumentException(\"requestUrl must be set before the HTTP task executes\");\n}","typeGuard":"boolean hasUrl(VariableContainer c) { Object v = c.getVariable(\"requestUrl\"); return v instanceof String s && !s.isBlank(); }","tryCatchPattern":"try {\n    httpActivityBehavior.execute(execution);\n} catch (FlowableException e) {\n    if (\"HTTP_TASK_REQUEST_URL_REQUIRED\".equals(e.getMessage())) {\n        // set default url or fail the process with a clear message\n    } else { throw e; }\n}","preventionTips":["Always set requestUrl/requestExpression in BPMN HTTP task definitions","Unit-test each process path that reaches an HTTP task","Use expressions with null-safe defaults for variable-driven URLs"],"tags":["flowable","http-task","validation","process-configuration"],"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-14T05:17:10.506Z"}