flowable/flowable-engine · error · ActivitiException
failedJobRetryTimeCycle has wrong format:" +…
Error message
failedJobRetryTimeCycle has wrong format:" + failedJobRetryTimeCycle
What it means
Thrown from JobRetryCmd.execute() when parsing the failedJobRetryTimeCycle value fails while decrementing job retries. The retry time cycle (e.g. "R5/PT7M") is parsed with a DurationHelper; any exception during parsing is rethrown as ActivitiException with the offending value, wrapping the original exception.
Solutions
- Fix the failedJobRetryTimeCycle value in the BPMN XML to valid ISO-8601 (e.g. R5/PT7M)
- Redeploy the process definition with the corrected extension attribute
- Check the wrapped 'exception' cause in the message/log for the exact parse failure
- Validate the cycle expression before deployment (unit-test DurationHelper.parse)
Example fix
// before <flowable:failedJobRetryTimeCycle value="5/7 minutes" /> // after <flowable:failedJobRetryTimeCycle value="R5/PT7M" />
Defensive patterns
Strategy: validation
Validate before calling
// validate retry cycle at deploy time
java.time.Duration.parse("PT7M"); // cycle must be ISO-8601 like R5/PT7M
if (!cycle.matches("R\\d*/PT?[^/]+")) throw new IllegalArgumentException("bad failedJobRetryTimeCycle: " + cycle); Try / catch
try { jobExecutor handling } catch (ActivitiException e) { if (e.getMessage().contains("failedJobRetryTimeCycle")) { fixBpmnAndRedeploy(); } throw e; } Prevention
- Always use ISO-8601 repetition format (Rn/PT) in failedJobRetryTimeCycle
- Add BPMN lint/deploy-time tests parsing every retry cycle used
- Read the wrapped cause exception in logs for the exact parse error
When it happens
Trigger: A job fails and its boundary event/failed job retry configuration has a malformed time cycle string (missing R prefix, bad ISO-8601 duration like "7 minutes" or "R/PT10M"); the async executor then attempts to compute the next retry and hits the parse error.
Common situations: Typo in flowable:failedJobRetryTimeCycle extension element in BPMN XML; copy-pasted cycle with wrong separator (comma instead of slash); Spring/XSD not validating the attribute so bad values deploy unnoticed.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- activity tenant id is null
- Business key is null
- Business key is null
- Cannot set JPA variable: " + EntityManagerSession.class + "…
- Cannot use taskId together with excludeTaskVariables
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6c9de21be340708d.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/JobRetryCmd.java:128
newJobEntity = deadLetterJob;
} else {
TimerJobEntity timerJob = new TimerJobEntity(job);
timerJob.insert();
newJobEntity = timerJob;
}
newJobEntity.setDuedate(durationHelper.getDateAfter());
if (job.getExceptionMessage() == null) { // is it the first exception
LOGGER.debug("Applying JobRetryStrategy '{}' the first time for job {} with {} retries", failedJobRetryTimeCycle, job.getId(), durationHelper.getTimes());
} else {
LOGGER.debug("Decrementing retries of JobRetryStrategy '{}' for job {}", failedJobRetryTimeCycle, job.getId());
}
newJobEntity.setRetries(jobRetries - 1);
} catch (Exception e) {
throw new ActivitiException("failedJobRetryTimeCycle has wrong format:" + failedJobRetryTimeCycle, exception);
}
}
if (exception != null) {
newJobEntity.setExceptionMessage(exception.getMessage());
newJobEntity.setExceptionStacktrace(getExceptionStacktrace());
}
job.delete();
// Dispatch both an update and a retry-decrement event
FlowableEventDispatcher eventDispatcher = commandContext.getEventDispatcher();
if (eventDispatcher.isEnabled()) {
eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
FlowableEngineEventType.ENTITY_UPDATED, newJobEntity), EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);
eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
FlowableEngineEventType.JOB_RETRIES_DECREMENTED, newJobEntity), EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);
}
View on GitHub (pinned to d6d39ce1c6)