flowable/flowable-engine · error · FlowableIllegalArgumentException
Unsupported multipart mode
Error message
Unsupported multipart mode: ${mode}. Supported values are: STRICT, BROWSER_COMPATIBLE, LEGACY, EXTENDED What it means
The HttpClient 5.x Flowable client resolves an optional configured multipart mode into Apache's `HttpMultipartMode` enum. When the configured `mode` string (upper-cased) does not map to STRICT, BROWSER_COMPATIBLE, LEGACY, or EXTENDED, `resolveMultipartMode` throws this `FlowableIllegalArgumentException`.
Solutions
- Set the multipart mode to exactly one of STRICT, BROWSER_COMPATIBLE, LEGACY, or EXTENDED (case-insensitive, no extra characters).
- Remove the multipart-mode setting entirely to get the default (STRICT).
- Trim/normalize the config value at load time if it comes from user-supplied properties.
Example fix
// before (config) multipart-mode=RFC6532 // after multipart-mode=STRICT
Defensive patterns
Strategy: validation
Validate before calling
Set<String> allowed = Set.of("STRICT", "BROWSER_COMPATIBLE", "LEGACY", "EXTENDED");
if (mode != null && !allowed.contains(mode.trim().toUpperCase(Locale.ROOT))) {
throw new IllegalArgumentException("multipart mode must be one of " + allowed + ", got: " + mode);
} Try / catch
try {
client = new ApacheHttpComponents5FlowableHttpClient(builder.build());
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage().startsWith("Unsupported multipart mode")) {
log.error("Fix multipart-mode config to STRICT|BROWSER_COMPATIBLE|LEGACY|EXTENDED");
}
throw e;
} Prevention
- Keep multipart-mode values in a constant/enum in your configuration layer.
- Trim and upper-case config values before passing them to the client.
- Prefer omitting the setting to get the STRICT default.
When it happens
Trigger: Constructing/configuring `ApacheHttpComponents5FlowableHttpClient` with a multipart mode option set to an unrecognized value such as "RFC6532", "browser", "strict " (trailing space), or any misspelling.
Common situations: Copy-pasting multipart-mode settings from HttpClient 4.x docs that mention modes not in this switch; typos or wrong casing plus stray whitespace in YAML/properties config.
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
- Only 'binary' and 'serializable' are supported as variable…
- Attachment content is required.
- Invalid event-type:
- Invalid value for enum form property: + value
- Invalid value for enum form property
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/1864d9e46ca0dbd7.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/apache/client5/ApacheHttpComponents5FlowableHttpClient.java:173
public ApacheHttpComponents5FlowableHttpClient(HttpAsyncClient client, int socketTimeout, int connectTimeout,
int connectionRequestTimeout) {
this.client = client;
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", "LEGACY" -> HttpMultipartMode.LEGACY;
case "STRICT" -> HttpMultipartMode.STRICT;
case "EXTENDED" -> HttpMultipartMode.EXTENDED;
default -> throw new FlowableIllegalArgumentException("Unsupported multipart mode: " + mode
+ ". Supported values are: STRICT, BROWSER_COMPATIBLE, LEGACY, EXTENDED");
};
}
public void close() {
if (closeClient && client instanceof ModalCloseable) {
((ModalCloseable) client).close(CloseMode.GRACEFUL);
}
}
@Override
public AsyncExecutableHttpRequest prepareRequest(HttpRequest requestInfo) {
try {
AsyncRequestBuilder request;
URI uri = createUri(requestInfo.getUrl());
switch (requestInfo.getMethod()) {
case "GET": {
request = AsyncRequestBuilder.get(uri);View on GitHub (pinned to d6d39ce1c6)