flowable/flowable-engine · error · FlowableConflictException

User info with key '' already exists for this user.

Error message

User info with key '' already exists for this user.

What it means

Duplicate-entry violation in UserInfoCollectionResource.setUserInfo: the user already has an info entry stored under the given key, so creating it again is refused; the client should update the existing entry (PUT) instead.

Solutions

  1. Use PUT /identity/users/{userId}/info/{key} to update the entry
  2. Pick a different key
  3. DELETE the existing entry before recreating it
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserInfoCollectionResource.java:86 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserInfoCollectionResource.java:86

            @ApiResponse(code = 404, message = "Indicates the requested user was not found."),
            @ApiResponse(code = 409, message = "Indicates there is already an info-entry with the given key for the user, update the resource instance (PUT).")
    })
    @PostMapping(value = "/identity/users/{userId}/info", produces = "application/json")
    @ResponseStatus(HttpStatus.CREATED)
    public UserInfoResponse setUserInfo(@ApiParam(name = "userId") @PathVariable String userId, @RequestBody UserInfoRequest userRequest) {

        User user = getUserFromRequest(userId);

        if (userRequest.getKey() == null) {
            throw new FlowableIllegalArgumentException("The key cannot be null.");
        }
        if (userRequest.getValue() == null) {
            throw new FlowableIllegalArgumentException("The value cannot be null.");
        }

        String existingValue = identityService.getUserInfo(user.getId(), userRequest.getKey());
        if (existingValue != null) {
            throw new FlowableConflictException("User info with key '" + userRequest.getKey() + "' already exists for this user.");
        }

        identityService.setUserInfo(user.getId(), userRequest.getKey(), userRequest.getValue());

        return restResponseFactory.createUserInfoResponse(userRequest.getKey(), userRequest.getValue(), user.getId());
    }
}

View on GitHub (pinned to d6d39ce1c6)