flowable/flowable-engine · error · FlowableEventJsonException
Error reading event json
Error message
Error reading event json
What it means
EventJsonConverter.convertToEventModel parses an event definition JSON string into an EventModel. Any exception during parsing/deserialization is wrapped as FlowableEventJsonException('Error reading event json') with the root cause attached. It signals malformed or unreadable event JSON.
Solutions
- Check the wrapped cause (e.getCause()) for the exact deserialization problem.
- Validate the event JSON structure (key, name, payload, correlationParameters) against the EventModel schema.
- Redeploy with a corrected event definition file; regenerate the JSON from the Flowable designer if possible.
Example fix
// before
EventModel model = converter.convertToEventModel(eventJson); // malformed JSON
// after
try {
EventModel model = converter.convertToEventModel(eventJson);
} catch (FlowableEventJsonException e) {
LOG.error("Bad event JSON: " + e.getCause().getMessage());
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
try {
JsonNode node = new ObjectMapper().readTree(eventJson);
if (node == null || !node.has("key") || !node.has("name")) {
throw new IllegalArgumentException("Event JSON missing key/name");
}
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("Event JSON is not valid JSON", e);
} Type guard
boolean isParsableEventJson(String json) {
try { new ObjectMapper().readTree(json); return true; } catch (Exception e) { return false; }
} Try / catch
try {
EventModel model = converter.convertToEventModel(eventJson);
} catch (FlowableEventJsonException e) {
LOG.error("Event JSON invalid: {}", e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
throw new DeploymentException("Cannot deploy event definition", e);
} Prevention
- Schema-validate event JSON in CI before deployment.
- Never hand-edit exported event JSON; use the modeler/export tooling.
- Log e.getCause() to surface the real deserialization error.
When it happens
Trigger: Calling convertToEventModel with syntactically invalid JSON, JSON missing required event fields, or structure that fails Jackson deserialization into the event model classes.
Common situations: Deploying a hand-edited or corrupted .event JSON resource, exporting an event from a different Flowable version and deploying to an incompatible engine, or copy-paste errors in payload/correlation definitions.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
Related errors
- Error reading channel json
- Error deserializing json info for process definition +…
- Error parsing Case Instance Migration Document
- Error parsing channel definition JSON
- Error parsing event definition JSON
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/42c22d454e990418.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry-json-converter/src/main/java/org/flowable/eventregistry/json/converter/EventJsonConverter.java:89
eventModel.addPayload(payload);
}
}
JsonNode correlationParameters = modelNode.path("correlationParameters");
if (correlationParameters.isArray()) {
for (JsonNode correlationPayloadNode : correlationParameters) {
String name = correlationPayloadNode.path("name").stringValue(null);
String type = correlationPayloadNode.path("type").stringValue(null);
EventPayload payload = eventModel.addCorrelation(name, type);
processExtensionProperties(correlationPayloadNode, payload);
}
}
return eventModel;
} catch (Exception e) {
throw new FlowableEventJsonException("Error reading event json", e);
}
}
public String convertToJson(EventModel definition) {
ObjectMapper objectMapper = objectMapperSupplier.get();
ObjectNode modelNode = objectMapper.createObjectNode();
if (definition.getKey() != null) {
modelNode.put("key", definition.getKey());
}
if (definition.getName() != null) {
modelNode.put("name", definition.getName());
}
Collection<EventPayload> payload = definition.getPayload();
if (!payload.isEmpty()) {
ArrayNode payloadNode = modelNode.putArray("payload");View on GitHub (pinned to d6d39ce1c6)