flowable/flowable-engine · error · FlowableIllegalArgumentException
groupId is null
Error message
groupId is null
What it means
DeleteGroupCmd.execute() checks that the groupId field is non-null before delegating to the GroupEntityManager. A null groupId would be an invalid delete key, so the command throws FlowableIllegalArgumentException at execution time.
Solutions
- Pass a non-null groupId to IdentityService.deleteGroup() / DeleteGroupCmd.
- Verify the group exists (createGroupQuery().groupId(id).singleResult() != null) before deleting.
- In batch deletes, filter out null ids before issuing delete calls.
- Catch FlowableIllegalArgumentException and surface a 'group id required' validation message to the caller.
Example fix
// before
identityService.deleteGroup(groupId); // groupId may be null
// after
if (groupId != null) {
identityService.deleteGroup(groupId);
} Defensive patterns
Strategy: validation
Validate before calling
if (groupId == null || groupId.isEmpty()) {
throw new IllegalArgumentException("groupId must be provided before deleting a group");
} Type guard
boolean hasValidGroupId(String groupId) {
return groupId != null && !groupId.isEmpty();
} Try / catch
try {
identityService.deleteGroup(groupId);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage().contains("groupId is null")) {
throw new InvalidRequestException("Group id must not be null");
}
throw e;
} Prevention
- Check group existence with a query before delete operations.
- Filter null ids out of batch delete loops.
- Validate form/path parameters before mapping them to engine calls.
- Log the originating id variable when deletion fails so null sources are traceable.
When it happens
Trigger: Executing new DeleteGroupCmd(null) directly, or calling IdentityService.deleteGroup(null) which builds this command with a null group id.
Common situations: Group id lost when copying from a DTO or form submission; deleting in a loop where one iteration's id is null because the group was not found earlier; hardcoded cleanup scripts referencing a group that was never created.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/780a6ce8f9e0ec29.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/cmd/DeleteGroupCmd.java:37
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.idm.engine.impl.util.CommandContextUtil;
/**
* @author Tom Baeyens
*/
public class DeleteGroupCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
String groupId;
public DeleteGroupCmd(String groupId) {
this.groupId = groupId;
}
@Override
public Void execute(CommandContext commandContext) {
if (groupId == null) {
throw new FlowableIllegalArgumentException("groupId is null");
}
CommandContextUtil.getGroupEntityManager(commandContext).delete(groupId);
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)