flowable/flowable-engine · error · FlowableIllegalArgumentException
Could not find reactivation listener plan item instance in c
Error message
Could not find reactivation listener plan item instance in case {caseInstanceId} What it means
When resuming (reactivating) a suspended case instance, the engine looks up the case model's ReactivateEventListener definition and searches the case's child plan item instances for a matching instance. If no such plan item instance exists, the reactivation cannot proceed and a FlowableIllegalArgumentException is thrown.
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/agenda/operation/ReactivateCaseInstanceOperation.java:52
public class ReactivateCaseInstanceOperation extends AbstractCaseInstanceOperation {
public ReactivateCaseInstanceOperation(CommandContext commandContext, CaseInstanceEntity caseInstanceEntity) {
super(commandContext, null, caseInstanceEntity);
}
@Override
public void run() {
super.run();
// PHASE 1:
// execute phase 1 of the reactivation: reactivate the listener plan item and all of its depending plan items, then trigger it
List<PlanItemInstanceEntity> planItemInstances = caseInstanceEntity.getChildPlanItemInstances();
// we first search for the reactivation event, set it to available and then actually trigger it
ReactivateEventListener reactivateEventListener = CaseDefinitionUtil.getCase(caseInstanceEntity.getCaseDefinitionId()).getReactivateEventListener();
PlanItemInstanceEntity reactivationListenerPlanItemInstance = searchPlanItemInstance(reactivateEventListener.getId(), planItemInstances);
if (reactivationListenerPlanItemInstance == null) {
throw new FlowableIllegalArgumentException("Could not find reactivation listener plan item instance in case " + caseInstanceEntity.getId());
}
// reactivate the listener and direct dependencies of it so they can be triggered later
// we don't reuse the existing plan item instance but rather create a new one so we don't lose its history and data
PlanItemInstanceEntity reactivationListener = reactivatePlanItem(reactivationListenerPlanItemInstance);
// all directly depending plan items need to be reactivated as well to be in the correct state before the listener is triggered
List<PlanItem> directlyReactivatedPlanItems = reactivateDependingPlanItems(reactivationListener, planItemInstances);
// now as all depending plan items have been reactivated, trigger the reactivation event listener to start the reactivation of the case
CommandContextUtil.getAgenda(commandContext).planTriggerPlanItemInstanceOperation(reactivationListener);
// PHASE 2:
// execute phase 2 of the reactivation: step through all root plan items and reactivate them according the cae model
CommandContextUtil.getAgenda(commandContext).planReactivatePlanModelOperation(caseInstanceEntity, directlyReactivatedPlanItems);
}
/**View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the case definition contains a ReactivateEventListener and that it was instantiated (check ACT_CMMN_RU_PLAN_ITEM_INST) before suspending.
- Ensure you resume the correct case instance id.
- Redeploy a corrected case model or repair the plan item instance data so the listener definition id matches.
- Catch FlowableIllegalArgumentException and surface a clear message that the case lacks a reactivation listener.
Example fix
// before
cmmnRuntimeService.resumeCaseInstance(caseInstanceId);
// after
PlanItemInstanceQuery q = cmmnRuntimeService.createPlanItemInstanceQuery()
.caseInstanceId(caseInstanceId)
.planItemDefinitionType("reactivateEventListener");
if (q.count() == 0) {
throw new IllegalStateException("No reactivation listener on case " + caseInstanceId);
}
cmmnRuntimeService.resumeCaseInstance(caseInstanceId); Defensive patterns
Strategy: validation
Validate before calling
// java
long n = cmmnRuntimeService.createPlanItemInstanceQuery()
.caseInstanceId(caseInstanceId)
.planItemDefinitionType("reactivateEventListener").count();
if (n == 0) throw new IllegalStateException("Case has no reactivation listener instance"); Try / catch
try {
cmmnRuntimeService.resumeCaseInstance(caseInstanceId);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage().contains("Could not find reactivation listener")) {
// repair model or data
}
} Prevention
- Include a ReactivateEventListener in every case model that supports suspend/resume.
- Do not rename plan item ids in deployed case models with running instances.
- Verify listener instantiation before suspending a case.
When it happens
Trigger: Calling CmmnRuntimeService.resumeCaseInstance (or agenda-based reactivation) on a case instance whose plan model never created the reactivation event listener plan item, or whose listener instance has a different definition id.
Common situations: Case suspended before the reactivation listener plan item was created; case definition redeployed/changed so the listener id no longer matches persisted instances; wrong case instance id passed to resume.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Case instance is still running, cannot reactivate historic c
- There can only be one reactivation listener on a case model,
- Could not find plan item instance for plan item with definit
- Cannot exit case with 'complete' event type as the case '${c
- No case instance found for id ${caseInstanceEntityId}
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/a0de9afbd0ad0fef.
Report an issue: GitHub.