{"record":{"id":"c7308d8a3f6b0127","repo":"flowable/flowable-engine","slug":"there-is-no-engine-registered-for-the-scope-type","errorCode":null,"errorMessage":"There is no engine registered for the scope type \" + engineScopeType","messagePattern":"There is no engine registered for the scope type \" \\+ engineScopeType","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/tenant/BaseChangeTenantIdCmd.java","lineNumber":68,"sourceCode":"        Map<String, Long> results = executeOperation(dbSqlSession, parameters);\n        DefaultChangeTenantIdResult result = new DefaultChangeTenantIdResult(results);\n        beforeReturn(commandContext, result);\n        return result;\n    }\n\n    protected void beforeReturn(CommandContext commandContext, ChangeTenantIdResult result) {\n        // Nothing to do\n    }\n\n    protected abstract Map<String, Long> executeOperation(DbSqlSession dbSqlSession, Map<String, Object> parameters);\n\n    protected AbstractEngineConfiguration getEngineConfiguration(CommandContext commandContext) {\n        AbstractEngineConfiguration configuration = commandContext.getEngineConfigurations().get(engineScopeType);\n        if (configuration != null) {\n            return configuration;\n        }\n\n        throw new FlowableException(\"There is no engine registered for the scope type \" + engineScopeType);\n    }\n\n}\n","sourceCodeStart":50,"sourceCodeEnd":72,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/tenant/BaseChangeTenantIdCmd.java#L50-L72","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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."],"exampleFix":"// before\nprocessEngine.getManagementService()\n    .createChangeTenantIdBuilder(\"t1\", \"t2\")\n    .scopeType(\"cmmn\")   // CMMN engine not deployed\n    .execute();\n\n// after: only change process-scope definitions\nprocessEngine.getManagementService()\n    .createChangeTenantIdBuilder(\"t1\", \"t2\")\n    .scopeType(EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG)\n    .execute();","handlingStrategy":"validation","validationCode":"Set<String> available = ((CommandContextImpl) Context.getCommandContext()).getEngineConfigurations().keySet();\nif (!available.contains(scopeType)) {\n    throw new IllegalStateException(\"Engine for scope type '\" + scopeType + \"' is not deployed; available: \" + available);\n}","typeGuard":null,"tryCatchPattern":"try {\n    builder.execute();\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"There is no engine registered for the scope type\")) {\n        log.error(\"Scope type '{}' not available; check engine module registration\", scopeType, e);\n    }\n    throw e;\n}","preventionTips":["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."],"tags":["tenant","multi-engine","configuration"],"backgroundTag":"missing-required-config","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}