flowable/flowable-engine · error · FlowableException

Error reading json value ${configuration}

Error message

Error reading json value ${configuration}

What it means

TimerActivateProcessDefinitionHandler.execute parses the timer job's configuration string as JSON to read the includeProcessInstances flag. If readTree or getIncludeProcessInstances throws for any reason, it wraps the failure in a FlowableException with the raw configuration in the message. This means the persisted job configuration is malformed or incompatible with the current mapper.

Source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/jobexecutor/TimerActivateProcessDefinitionHandler.java:45

public class TimerActivateProcessDefinitionHandler extends TimerChangeProcessDefinitionSuspensionStateJobHandler {

    public static final String TYPE = "activate-processdefinition";

    @Override
    public String getType() {
        return TYPE;
    }

    @Override
    public void execute(Job job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
        ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration();

        boolean activateProcessInstances = false;
        try {
            JsonNode configNode = processEngineConfiguration.getObjectMapper().readTree(configuration);
            activateProcessInstances = getIncludeProcessInstances(configNode);
        } catch (Exception e) {
            throw new FlowableException("Error reading json value " + configuration, e);
        }

        String processDefinitionId = job.getProcessDefinitionId();

        ActivateProcessDefinitionCmd activateProcessDefinitionCmd = new ActivateProcessDefinitionCmd(processDefinitionId, null, activateProcessInstances, null, job.getTenantId());
        activateProcessDefinitionCmd.execute(commandContext);
    }

}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the job's CONFIGURATION_ column and repair it to valid JSON like {"includeProcessInstances":false,"processDefinitionId":"..."}
  2. Delete the corrupted timer job and re-create the boundary/timer event or re-suspend/activate the process definition
  3. Check engine version migration of flowable job tables; run any pending schema upgrades
  4. Exclude null/legacy configuration rows from old versions or re-fire them manually

Example fix

// corrupted row
UPDATE ACT_RU_TIMER_JOB SET CONFIGURATION_ = '{"includeProcessInstances":false,"processDefinitionId":"pdef:1:4"}' WHERE ID_ = 'job-7';
Defensive patterns

Strategy: try-catch

Validate before calling

String cfg = job.getConfiguration();
if (cfg == null || cfg.isBlank()) throw new IllegalStateException("Timer job configuration empty");
new ObjectMapper().readTree(cfg); // throws early if invalid

Type guard

boolean isValidJson(String s) {
    try { new ObjectMapper().readTree(s); return true; } catch (Exception e) { return false; }
}

Try / catch

try {
    managementService.executeJob(jobId);
} catch (FlowableException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("Error reading json value")) {
        // inspect/repair ACT_RU_TIMER_JOB.CONFIGURATION_ then retry
    } else throw e;
}

Prevention

When it happens

Trigger: A timer-start/timer job for activating a suspended process definition fires with a configuration string that is not valid JSON, is empty, or lacks the expected structure.

Common situations: Job configuration written by a different engine version (schema change); manually edited ACT_RU_JOB/ACT_RU_TIMER_JOB rows; corrupted configuration after failed deployment or DB migration; custom job handler overwrote the configuration.

Understand the failure class

Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.

Related errors


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