flowable/flowable-engine · error · FlowableException

Variable entity engine scope has no variable service…

Error message

Variable entity engine scope has no variable service configuration ${engineType}

What it means

After TraceableObject finds an engine configuration, it verifies it implements HasVariableServiceConfiguration. This FlowableException is thrown when an engine configuration was found for the scope's engine type but that configuration does not expose a variable service configuration, so the variable service cannot be obtained.

Solutions

  1. Make the engine configuration class implement HasVariableServiceConfiguration and return the variable service configuration from getServiceConfigurations()
  2. Verify the scope type string maps to the correct engine (fix the getEngineType mapping or the scope type used)
  3. Upgrade to consistent Flowable module versions so all engine configurations support the variable service contract
  4. Register the variable service configuration under EngineConfigurationConstants.KEY_VARIABLE_SERVICE_CONFIG

Example fix

// before
public class MyEngineConfiguration extends AbstractEngineConfiguration { }
// after
public class MyEngineConfiguration extends AbstractEngineConfiguration implements HasVariableServiceConfiguration {
    public VariableServiceConfiguration getVariableServiceConfiguration() { return variableServiceConfiguration; }
}
Defensive patterns

Strategy: validation

Validate before calling

EngineConfiguration cfg = EngineConfigurations.getEngineConfiguration(engineType);
if (!(cfg instanceof HasVariableServiceConfiguration)) {
    throw new IllegalStateException("Engine " + engineType + " lacks variable service configuration");
}

Type guard

if (engineConfiguration instanceof HasVariableServiceConfiguration) {
    VariableServiceConfiguration vsc = ((HasVariableServiceConfiguration) engineConfiguration).getVariableServiceConfiguration();
}

Prevention

When it happens

Trigger: A scope type resolves (via getEngineType) to an engine whose configuration class does not implement HasVariableServiceConfiguration — e.g., a custom or older engine configuration plugged into EngineConfigurations without variable-service support.

Common situations: Mixed Flowable versions where a custom engine configuration predates the HasVariableServiceConfiguration interface; registering a custom scope/engine type whose configuration was never extended with variable service support.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/41beb6e8be2129a6. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/TraceableObject.java:77

    
    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)