flowable/flowable-engine · error · FlowableObjectNotFoundException

Could not find a user with id ''.

Error message

Could not find a user with id ''.

What it means

BaseUserResource.getUserFromRequest looks up a user by id via identityService.createUserQuery().userId(userId) and throws FlowableObjectNotFoundException when the query returns null. It backs all user REST endpoints (GET/PUT/DELETE /identity/users/{userId}).

Solutions

  1. Confirm the user exists: SELECT * FROM ACT_ID_USER WHERE ID_ = '<userId>' or GET /identity/users to list ids.
  2. Use the exact stored userId, not the email or display name, unless the userId actually is the email.
  3. If identity is managed externally, verify user synchronization into Flowable's identity tables.
  4. Return a 404 to the end user and prompt re-selection rather than retrying with a stale id.

Example fix

// before
client.get("/identity/users/jdoe@example.com");
// after: use the actual stored userId
User u = identityService.createUserQuery().userId("jdoe").singleResult();
if (u != null) client.get("/identity/users/" + u.getId());
Defensive patterns

Strategy: try-catch

Validate before calling

boolean exists = client.list("/identity/users").stream().anyMatch(u -> userId.equals(u.getId()));

Try / catch

try {
    client.get("/identity/users/" + userId);
} catch (HttpClientErrorException e) {
    if (e.getStatusCode() == HttpStatus.NOT_FOUND) {
        log.warn("User {} not found in Flowable identity tables", userId);
    } else throw e;
}

Prevention

When it happens

Trigger: GET, PUT or DELETE /identity/users/{userId} where userId does not match any row in ACT_ID_USER.

Common situations: User removed or renamed after the client cached the id; external identity store (LDAP/AD) users not synced into Flowable's ACT_ID_USER table; email used as id instead of the actual userId; typo in the path segment.

Understand the failure class

Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.

Related errors


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

Appendix: source

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

/**
 * @author Frederik Heremans
 */
public class BaseUserResource {

    @Autowired
    protected RestResponseFactory restResponseFactory;

    @Autowired
    protected IdentityService identityService;
    
    @Autowired(required=false)
    protected BpmnRestApiInterceptor restApiInterceptor;

    protected User getUserFromRequest(String userId) {
        User user = identityService.createUserQuery().userId(userId).singleResult();

        if (user == null) {
            throw new FlowableObjectNotFoundException("Could not find a user with id '" + userId + "'.", User.class);
        }
        
        if (restApiInterceptor != null) {
            restApiInterceptor.accessUserInfoById(user);
        }
        
        return user;
    }
}

View on GitHub (pinned to d6d39ce1c6)