flowable/flowable-engine · error · FlowableException
Could not find engine configuration with variable service…
Error message
Could not find engine configuration with variable service configuration
What it means
TraceableObject (used by traceable serializable variable types to reach the engine) scans registered engine configurations to find one exposing a VariableServiceConfiguration. When no known engine configuration carries the variable service configuration, this FlowableException is thrown. It indicates the object is being resolved outside a properly initialized engine context.
Solutions
- Ensure the process engine (and its variable service configuration) is fully built and registered before objects using TraceableObject are serialized/deserialized
- Check that the scope type maps to a registered engine configuration (getEngineType lookup) and that EngineConfigurationConstants.KEY_VARIABLE_SERVICE_CONFIG is present in the service configurations
- In tests, build the full engine via ProcessEngineConfiguration rather than partial configuration objects
- If deserializing in another application, register an engine configuration implementing HasVariableServiceConfiguration first
Example fix
// before
EngineConfiguration cfg = EngineConfigurations.getEngineConfiguration(engineType); // null -> throw
// after
if (cfg == null) {
cfg = ProcessEngines.getDefaultProcessEngine().getProcessEngineConfiguration();
} Defensive patterns
Strategy: validation
Validate before calling
EngineConfiguration cfg = ProcessEngineConfigurationImpl
.getEngineConfigurations() == null ? null
: org.flowable.common.engine.impl.EngineConfigurations.getEngineConfiguration(
ProcessEngines.getDefaultProcessEngine().getProcessEngineConfiguration().getEngineType());
if (cfg == null || !(cfg instanceof HasVariableServiceConfiguration)) {
throw new IllegalStateException("No engine configuration with variable service support registered");
} Prevention
- Start the full process engine before touching traceable variable objects
- In tests, use the standard ProcessEngineConfiguration builder instead of partial configs
- Never serialize traceable variable types into a different application/JVM without registering an engine configuration there
When it happens
Trigger: Calling getVariableServiceConfiguration when EngineConfigurations.getEngineConfiguration(...) returns null for the engine type — i.e., the engine configuration was not registered, the scope type maps to an unknown engine, or the code runs outside any started process engine.
Common situations: Using traceable variable types in a standalone/unit-test setup where the full engine configuration set was never registered; multiple engine configurations where the variable-service key was removed; deserializing traceable objects in a different JVM/app that lacks the engine configuration.
Related errors
- Variable entity engine scope has no variable service…
- BPMN engine has not been initialized
- Cannot access id method/field for JPA Entity
- Cannot aggregate overview variable
- Cannot aggregate variable
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6f8a77d2950173f4.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/TraceableObject.java:73
variableInstanceEntity, variableServiceConfiguration.getClock().getCurrentTime());
}
}
}
protected VariableServiceConfiguration getVariableServiceConfiguration() {
String engineType = getEngineType(variableInstanceEntity.getScopeType());
Map<String, AbstractEngineConfiguration> engineConfigurationMap = Context.getCommandContext().getEngineConfigurations();
AbstractEngineConfiguration engineConfiguration = engineConfigurationMap.get(engineType);
if (engineConfiguration == null) {
for (AbstractEngineConfiguration possibleEngineConfiguration : engineConfigurationMap.values()) {
if (possibleEngineConfiguration instanceof HasVariableServiceConfiguration) {
engineConfiguration = possibleEngineConfiguration;
}
}
}
if (engineConfiguration == null) {
throw new FlowableException("Could not find engine configuration with variable service configuration");
}
if (!(engineConfiguration instanceof HasVariableServiceConfiguration)) {
throw new FlowableException("Variable entity engine scope has no variable service configuration " + engineType);
}
return (VariableServiceConfiguration) engineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_VARIABLE_SERVICE_CONFIG);
}
protected String getEngineType(String scopeType) {
if (StringUtils.isNotEmpty(scopeType)) {
return scopeType;
} else {
return ScopeTypes.BPMN;
}
}
}
View on GitHub (pinned to d6d39ce1c6)