flowable/flowable-engine · error · FlowableIllegalArgumentException
Unsupported multipart mode
Error message
Unsupported multipart mode: ${mode}. Supported values are: STRICT, BROWSER_COMPATIBLE What it means
ApacheHttpComponentsFlowableHttpClient.resolveMultipartMode maps the configured multipartMode string to Apache's HttpMultipartMode enum. Null defaults to STRICT; only 'STRICT' and 'BROWSER_COMPATIBLE' are accepted, and any other value throws FlowableIllegalArgumentException listing the supported values.
Solutions
- Change the multipartMode value to STRICT or BROWSER_COMPATIBLE
- Remove the multipartMode setting to get the STRICT default (when value is null)
- If 'RFC6532' behavior is needed, patch/configure at the Apache client level instead of through this config
Example fix
// before
config.setMultipartMode("RFC6532");
// after
config.setMultipartMode("BROWSER_COMPATIBLE"); Defensive patterns
Strategy: validation
Validate before calling
String mode = config.getMultipartMode();
if (mode != null && !(mode.equalsIgnoreCase("STRICT") || mode.equalsIgnoreCase("BROWSER_COMPATIBLE"))) {
throw new IllegalArgumentException("multipartMode must be STRICT or BROWSER_COMPATIBLE");
} Type guard
boolean isSupportedMultipartMode(String m) { return m == null || m.equalsIgnoreCase("STRICT") || m.equalsIgnoreCase("BROWSER_COMPATIBLE"); } Prevention
- Only use the documented enum names STRICT and BROWSER_COMPATIBLE
- Leave multipartMode unset to get the STRICT default
- Validate configuration values in a startup bean
When it happens
Trigger: Setting httpClientConfig.setMultipartMode(...) (or the equivalent HTTP task config) to a string like 'RFC6532', 'lenient', or a misspelled value that is not STRICT or BROWSER_COMPATIBLE (case-insensitive).
Common situations: Copying multipart mode names from Apache HttpComponents docs (e.g. RFC6532) that Flowable does not expose; typos like 'browser-compatible'; configuring via properties files with wrong casing that also includes stray whitespace is not the issue here since it is trimmed by uppercase only — the value text itself must match.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- A channel key detection value is required for the channel…
- A datasource is required for initializing the engine
- ackMode in definition
- Builder is missing constructor (can't pass features)
- Cannot migrate process(es), not enough information
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c448050e381446d3.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/apache/ApacheHttpComponentsFlowableHttpClient.java:176
}
public ApacheHttpComponentsFlowableHttpClient(HttpClientBuilder clientBuilder, int socketTimeout, int connectTimeout,
int connectionRequestTimeout) {
this.clientBuilder = clientBuilder;
this.multipartMode = HttpMultipartMode.STRICT;
this.socketTimeout = socketTimeout;
this.connectTimeout = connectTimeout;
this.connectionRequestTimeout = connectionRequestTimeout;
}
protected static HttpMultipartMode resolveMultipartMode(String mode) {
if (mode == null) {
return HttpMultipartMode.STRICT;
}
return switch (mode.toUpperCase()) {
case "BROWSER_COMPATIBLE" -> HttpMultipartMode.BROWSER_COMPATIBLE;
case "STRICT" -> HttpMultipartMode.STRICT;
default -> throw new FlowableIllegalArgumentException("Unsupported multipart mode: " + mode
+ ". Supported values are: STRICT, BROWSER_COMPATIBLE");
};
}
@Override
public ExecutableHttpRequest prepareRequest(HttpRequest requestInfo) {
try {
HttpRequestBase request;
URI uri = createUri(requestInfo.getUrl());
switch (requestInfo.getMethod()) {
case "GET": {
request = new HttpGet(uri);
break;
}
case "POST": {
HttpPost post = new HttpPost(uri);
setRequestEntity(requestInfo, post);
request = post;View on GitHub (pinned to d6d39ce1c6)