flowable/flowable-engine · error · FlowableException
Compensating execution not set for " + eventSubscription
Error message
Compensating execution not set for " + eventSubscription
What it means
Thrown by CompensationEventHandler.handleEvent when the compensation event subscription has a null configuration. The configuration stores the id of the compensating execution; without it the handler cannot locate the scope/execution that should run the compensation handler.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/event/CompensationEventHandler.java:53
import org.flowable.eventsubscription.service.impl.persistence.entity.CompensateEventSubscriptionEntity;
import org.flowable.eventsubscription.service.impl.persistence.entity.EventSubscriptionEntity;
/**
* @author Tijs Rademakers
*/
public class CompensationEventHandler implements EventHandler {
@Override
public String getEventHandlerType() {
return CompensateEventSubscriptionEntity.EVENT_TYPE;
}
@Override
public void handleEvent(EventSubscriptionEntity eventSubscription, Object payload, CommandContext commandContext) {
String configuration = eventSubscription.getConfiguration();
if (configuration == null) {
throw new FlowableException("Compensating execution not set for " + eventSubscription);
}
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
ExecutionEntity compensatingExecution = processEngineConfiguration.getExecutionEntityManager().findById(configuration);
String processDefinitionId = compensatingExecution.getProcessDefinitionId();
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
if (process == null) {
throw new FlowableException("Cannot start process instance. Process model (id = " + processDefinitionId + ") could not be found for " + eventSubscription);
}
FlowElement flowElement = process.getFlowElement(eventSubscription.getActivityId(), true);
if (flowElement instanceof SubProcess && !((SubProcess) flowElement).isForCompensation()) {
// descend into scope:
compensatingExecution.setScope(true);
List<CompensateEventSubscriptionEntity> eventsForThisScope = processEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService()
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the ACT_RU_EVENT_SUBSCR row for the subscription has CONFIG_ set; if runtime data is corrupt, cancel the process instance and restart the flow.
- Check that the process definition correctly models the compensation (boundary compensation events inside a transaction subprocess), then redeploy.
- Restore consistent runtime data from backup or let the transaction roll back cleanly so the engine rebuilds subscriptions.
- If reproducible, search/upgrade Flowable - known data-migration issues can drop the configuration value.
Defensive patterns
Strategy: validation
Validate before calling
EventSubscriptionEntity s = /* fetched */;
if (s != null && s.getConfiguration() == null) {
throw new IllegalStateException("compensation subscription without configuration");
} Try / catch
try {
runtimeService.signalEventReceived(compensationSignal);
} catch (FlowableException e) {
if (e.getMessage().contains("Compensating execution not set")) {
// runtime data corrupt: restart the process instance
}
} Prevention
- Don't manipulate event-subscription rows directly in the database.
- Model compensation with proper transaction subprocesses/boundary events.
- Restore runtime data only from consistent, engine-created backups.
- Test compensation paths in integration tests before production.
When it happens
Trigger: Triggering compensation (e.g. transaction rollback / end of a transaction subprocess, or explicitly signaling the compensation event subscription) where eventSubscription.getConfiguration() returns null - i.e. an event subscription for a compensation boundary/handler created without its compensating-execution configuration.
Common situations: Manually inserted or migrated ACT_RU_EVENT_SUBSCR rows missing the CONFIG_ column value; engine bugs/upgrade scripts that lost the configuration; corrupt runtime data after failed transactions or inconsistent DB restores.
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
- Error while sending signal for " + eventSubscription + ": no
- Error while handling compensation event ${eventSubscription}
- Process model for ${executionEntity} could not be found
- Parent activity for boundary compensation event could not be
- Compensation activity could not be found (or it is missing '
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5f0d11e42c243dd1.
Report an issue: GitHub.