flowable/flowable-engine · error · FlowableIllegalArgumentException
No historic case instance id provided
Error message
No historic case instance id provided
What it means
ReactivateHistoricCaseInstanceCmd reactivates a finished (historic) case instance back into the runtime. It first validates that the reactivation builder carries a case instance id; if reactivationBuilder.getCaseInstanceId() is null it throws FlowableIllegalArgumentException 'No historic case instance id provided'.
Solutions
- Call .caseInstanceId(historicCaseInstanceId) on the reactivation builder before .reactivate()
- Fetch the historic id first via cmmnHistoryService.createHistoricCaseInstanceQuery() and null-check it
- Guard the builder input in application code before invoking reactivate()
Example fix
// before
cmmnRuntimeService.createCaseInstanceReactivationBuilder().setReactivationListener(...).reactivate();
// after
cmmnRuntimeService.createCaseInstanceReactivationBuilder()
.caseInstanceId(historicCaseInstanceId)
.setReactivationListener(...)
.reactivate(); Defensive patterns
Strategy: validation
Validate before calling
if (historicCaseInstanceId == null || historicCaseInstanceId.isEmpty()) throw new IllegalArgumentException("Historic case instance id is required for reactivation"); Try / catch
try { reactivationBuilder.caseInstanceId(id).reactivate(); } catch (FlowableIllegalArgumentException e) { log.error("Reactivation misconfigured: {}", e.getMessage()); } Prevention
- Chain builder calls fluently so caseInstanceId() cannot be skipped
- Obtain the historic id from cmmnHistoryService queries, not user input
- Unit-test the reactivation flow with a real finished case instance
When it happens
Trigger: Calling cmmnRuntimeService.createCaseInstanceReactivationBuilder() and then .reactivate() without ever calling .caseInstanceId(historicId) — e.g. the id variable was null because the historic lookup returned nothing earlier.
Common situations: Builders where the chain skipped the mandatory caseInstanceId(...) call; a null id propagated from a UI/form field; reactivating by key/version assumptions that don't exist in this API.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- activatedBefore is null
- after time is null
- assignee is null
- availableAfter is null
- availableBefore is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/950f657c5b249ff5.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/ReactivateHistoricCaseInstanceCmd.java:61
/**
* This command reactivates a history case instance by putting it back to the runtime and triggering the reactivation event on its CMMN model. If there is no
* reactivation event explicitly available, an exception is thrown.
*
* @author Micha Kiener
*/
public class ReactivateHistoricCaseInstanceCmd implements Command<CaseInstance>, Serializable {
private static final long serialVersionUID = 1L;
protected final CaseReactivationBuilderImpl reactivationBuilder;
public ReactivateHistoricCaseInstanceCmd(CaseReactivationBuilderImpl reactivationBuilder) {
this.reactivationBuilder = reactivationBuilder;
}
@Override
public CaseInstance execute(CommandContext commandContext) {
if (reactivationBuilder.getCaseInstanceId() == null) {
throw new FlowableIllegalArgumentException("No historic case instance id provided");
}
// Check if the historic case instance is found and if it is no longer running
CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);
HistoricCaseInstance instance = cmmnEngineConfiguration.getHistoricCaseInstanceEntityManager().createHistoricCaseInstanceQuery()
.caseInstanceId(reactivationBuilder.getCaseInstanceId())
.singleResult();
if (instance == null) {
throw new FlowableObjectNotFoundException("No historic case instance to be reactivated found with id: " + reactivationBuilder.getCaseInstanceId(), HistoricCaseInstance.class);
}
if (instance.getEndTime() == null) {
throw new FlowableIllegalStateException("Case instance is still running, cannot reactivate historic case instance: " + reactivationBuilder.getCaseInstanceId());
}
// move the case instance back to the runtime (this also checks, if the reactivation listener is even existent)
CaseInstanceEntity caseInstanceEntity = cmmnEngineConfiguration.getCaseInstanceHelper()
.copyHistoricCaseInstanceToRuntime(instance);View on GitHub (pinned to d6d39ce1c6)