flowable/flowable-engine · error · FlowableException
There is no engine registered for the scope type " +…
Error message
There is no engine registered for the scope type " + engineScopeType
What it means
BaseChangeTenantIdCmd.getEngineConfiguration looks up the engine configuration for the builder's scope type in the CommandContext's engine configurations map and throws FlowableException when no engine is registered under that key. This means the tenant-change command was built with a scope type whose engine is not part of the running app context.
Solutions
- Use scopeType(EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG) or omit it to target only registered engines.
- Ensure the CMMN/APP engine modules and their configurations are registered in the app (flowable-spring-boot-starter-process/cmmn) before using their scope types.
- Check commandContext.getEngineConfigurations().keySet() at runtime to see which scope types are actually available.
- Fix typos in the scope type string.
Example fix
// before
processEngine.getManagementService()
.createChangeTenantIdBuilder("t1", "t2")
.scopeType("cmmn") // CMMN engine not deployed
.execute();
// after: only change process-scope definitions
processEngine.getManagementService()
.createChangeTenantIdBuilder("t1", "t2")
.scopeType(EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG)
.execute(); Defensive patterns
Strategy: validation
Validate before calling
Set<String> available = ((CommandContextImpl) Context.getCommandContext()).getEngineConfigurations().keySet();
if (!available.contains(scopeType)) {
throw new IllegalStateException("Engine for scope type '" + scopeType + "' is not deployed; available: " + available);
} Try / catch
try {
builder.execute();
} catch (FlowableException e) {
if (e.getMessage().startsWith("There is no engine registered for the scope type")) {
log.error("Scope type '{}' not available; check engine module registration", scopeType, e);
}
throw e;
} Prevention
- Only pass scope types for engines actually included in the application (process vs cmmn vs app).
- Use EngineConfigurationConstants keys instead of raw strings.
- Verify engine registrations at startup in multi-engine setups.
When it happens
Trigger: Calling createChangeTenantIdBuilder(...).scopeType(<type>) with a scope type (e.g. 'cmmn', 'app') whose engine is not deployed/registered in the current ProcessEngineConfiguration / CommandContext, then executing the change-tenant-id command.
Common situations: Using the tenant-id change API against a flowable-process-only setup with scopeType('cmmn'); engine module not on classpath; typo in the scope type key; engine not registered in the shared engine configuration (flowable.engine-configurations / deployers).
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- A datasource is required for initializing the engine
- The channel expression tenant detection value was not found…
- A channel key detection value is required for the channel…
- ackMode in definition
- activity tenant id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c7308d8a3f6b0127.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/tenant/BaseChangeTenantIdCmd.java:68
Map<String, Long> results = executeOperation(dbSqlSession, parameters);
DefaultChangeTenantIdResult result = new DefaultChangeTenantIdResult(results);
beforeReturn(commandContext, result);
return result;
}
protected void beforeReturn(CommandContext commandContext, ChangeTenantIdResult result) {
// Nothing to do
}
protected abstract Map<String, Long> executeOperation(DbSqlSession dbSqlSession, Map<String, Object> parameters);
protected AbstractEngineConfiguration getEngineConfiguration(CommandContext commandContext) {
AbstractEngineConfiguration configuration = commandContext.getEngineConfigurations().get(engineScopeType);
if (configuration != null) {
return configuration;
}
throw new FlowableException("There is no engine registered for the scope type " + engineScopeType);
}
}
View on GitHub (pinned to d6d39ce1c6)