{"record":{"id":"e38d5fb79c1d9d62","repo":"flowable/flowable-engine","slug":"getting-the-camel-context-is-not-support-in-this-e","errorCode":null,"errorMessage":"Getting the Camel context is not support in this engine configuration","messagePattern":"Getting the Camel context is not support in this engine configuration","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-compatibility/src/main/java/org/flowable/compatibility/DefaultFlowable5CompatibilityHandler.java","lineNumber":1067,"sourceCode":"    @Override\n    public Object getRawProcessEngine() {\n        return getProcessEngine();\n    }\n\n    @Override\n    public Object getRawProcessConfiguration() {\n        return getProcessEngine().getProcessEngineConfiguration();\n    }\n\n    @Override\n    public Object getRawCommandExecutor() {\n        ProcessEngineConfigurationImpl processEngineConfig = (ProcessEngineConfigurationImpl) getProcessEngine().getProcessEngineConfiguration();\n        return processEngineConfig.getCommandExecutor();\n    }\n\n    @Override\n    public Object getCamelContextObject(String camelContextValue) {\n        throw new FlowableException(\"Getting the Camel context is not support in this engine configuration\");\n    }\n\n    @Override\n    public void setJobProcessor(List<Object> flowable5JobProcessors) {\n        getProcessEngine().getProcessEngineConfiguration().setJobProcessors(convertToFlowable5JobProcessors(flowable5JobProcessors));\n    }\n\n    private List<JobProcessor> convertToFlowable5JobProcessors(List<Object> jobProcessors) {\n        ArrayList<JobProcessor> flowable5JobProcessors = new ArrayList<>();\n        for (Object jobProcessor : jobProcessors) {\n            flowable5JobProcessors.add((org.activiti.engine.runtime.JobProcessor) jobProcessor);\n        }\n        return flowable5JobProcessors;\n    }\n\n    protected ProcessEngine getProcessEngine() {\n        if (processEngine == null) {\n            synchronized (this) {","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-compatibility/src/main/java/org/flowable/compatibility/DefaultFlowable5CompatibilityHandler.java#L1049-L1085","documentation":"The default Flowable 5 compatibility handler does not support resolving a Camel context object through the compatibility layer. getCamelContextObject unconditionally throws this FlowableException — the capability simply is not implemented in this handler configuration.","triggerScenarios":"Calling Flowable5CompatibilityHandler.getCamelContextObject(...) (or the corresponding API on the compatibility handler) when the default handler is in use, e.g., retrieving a camelContext variable via the v5 API bridge.","commonSituations":"Migrating Activiti 5 processes that relied on the Activiti Camel module into Flowable while still requesting the Camel context through the compatibility handler.","solutions":["Do not fetch the Camel context through the compatibility layer — access the org.apache.camel.CamelContext directly from your Spring/Camel registry","Provide a custom Flowable5CompatibilityHandler subclass overriding getCamelContextObject to return the real CamelContext","Remove dependencies on v5 Camel integration and migrate those routes to the Flowable Camel module"],"exampleFix":"// before\nObject camel = compatibilityHandler.getCamelContextObject(\"camelContext\");\n// after\nCamelContext camel = (CamelContext) applicationContext.getBean(\"camelContext\");","handlingStrategy":"try-catch","validationCode":"// Feature-detect instead of calling blindly\nif (compatibilityHandler.getClass() == DefaultFlowable5CompatibilityHandler.class) {\n    throw new UnsupportedOperationException(\"Default handler does not expose the Camel context\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    Object camel = handler.getCamelContextObject(value);\n} catch (FlowableException e) {\n    CamelContext ctx = (CamelContext) applicationContext.getBean(\"camelContext\"); // fallback to direct lookup\n}","preventionTips":["Access the Camel context from your own DI container, never through the v5 bridge","Subclass DefaultFlowable5CompatibilityHandler if you need Camel support","Plan the Camel integration migration to the Flowable Camel module when moving from Activiti 5"],"tags":["camel","compatibility","unsupported"],"backgroundTag":"unsupported-operation","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"}