flowable/flowable-engine · error · FlowableIllegalArgumentException
process definition info node is null
Error message
process definition info node is null
What it means
SaveProcessDefinitionInfoCmd.execute throws FlowableIllegalArgumentException when the infoNode (an ObjectNode holding the process definition info JSON) is null. The node is the payload to persist, so without it there is nothing to save. This guard runs after the processDefinitionId null check.
Solutions
- Pass a non-null ObjectNode as the info node; create one with the engine's ObjectMapper if needed.
- Check the result of whatever produced the node (e.g. objectMapper.readTree) for null before calling the API.
- If there is truly no info to save, skip the call instead of passing null.
Example fix
// before
managementService.saveProcessDefinitionInfo(pdId, null);
// after
ObjectNode infoNode = CommandContextUtil.getProcessEngineConfiguration().getObjectMapper().createObjectNode();
infoNode.put("field", "value");
managementService.saveProcessDefinitionInfo(pdId, infoNode); Defensive patterns
Strategy: validation
Validate before calling
if (infoNode == null) {
infoNode = objectMapper.createObjectNode(); // or skip the call entirely
}
managementService.saveProcessDefinitionInfo(processDefinitionId, infoNode); Type guard
boolean hasInfoNode = infoNode != null && infoNode instanceof ObjectNode;
Prevention
- Always build the info node explicitly with objectMapper.createObjectNode().
- Treat readTree() results as nullable and handle null before use.
- Prefer skipping the save when there is no info rather than passing null.
When it happens
Trigger: Calling managementService.saveProcessDefinitionInfo(processDefinitionId, null) or executing new SaveProcessDefinitionInfoCmd(id, null).
Common situations: Parsing the info JSON failed and the caller forwarded a null node; a builder/parse method returned null silently; a variable holding the JSON node was never initialized.
Related errors
- appsDefinitionIds is null
- at least one of userId or groups must be provided
- Business status is null
- Candidate user is null
- Case definition keys is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/501e3a12c08901fc.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SaveProcessDefinitionInfoCmd.java:50
private static final long serialVersionUID = 1L;
protected String processDefinitionId;
protected ObjectNode infoNode;
public SaveProcessDefinitionInfoCmd(String processDefinitionId, ObjectNode infoNode) {
this.processDefinitionId = processDefinitionId;
this.infoNode = infoNode;
}
@Override
public Void execute(CommandContext commandContext) {
if (processDefinitionId == null) {
throw new FlowableIllegalArgumentException("process definition id is null");
}
if (infoNode == null) {
throw new FlowableIllegalArgumentException("process definition info node is null");
}
ProcessDefinitionInfoEntityManager definitionInfoEntityManager = CommandContextUtil.getProcessDefinitionInfoEntityManager(commandContext);
ProcessDefinitionInfoEntity definitionInfoEntity = definitionInfoEntityManager.findProcessDefinitionInfoByProcessDefinitionId(processDefinitionId);
if (definitionInfoEntity == null) {
definitionInfoEntity = definitionInfoEntityManager.create();
definitionInfoEntity.setProcessDefinitionId(processDefinitionId);
CommandContextUtil.getProcessDefinitionInfoEntityManager().insertProcessDefinitionInfo(definitionInfoEntity);
}
try {
ObjectWriter writer = CommandContextUtil.getProcessEngineConfiguration(commandContext).getObjectMapper().writer();
CommandContextUtil.getProcessDefinitionInfoEntityManager().updateInfoJson(definitionInfoEntity.getId(), writer.writeValueAsBytes(infoNode));
} catch (Exception e) {
throw new FlowableException("Unable to serialize info node " + infoNode, e);
}
return null;View on GitHub (pinned to d6d39ce1c6)