flowable/flowable-engine · error · FlowableException

Getting the Camel context is not support in this engine…

Error message

Getting the Camel context is not support in this engine configuration

What it means

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.

Solutions

  1. Do not fetch the Camel context through the compatibility layer — access the org.apache.camel.CamelContext directly from your Spring/Camel registry
  2. Provide a custom Flowable5CompatibilityHandler subclass overriding getCamelContextObject to return the real CamelContext
  3. Remove dependencies on v5 Camel integration and migrate those routes to the Flowable Camel module

Example fix

// before
Object camel = compatibilityHandler.getCamelContextObject("camelContext");
// after
CamelContext camel = (CamelContext) applicationContext.getBean("camelContext");
Defensive patterns

Strategy: try-catch

Validate before calling

// Feature-detect instead of calling blindly
if (compatibilityHandler.getClass() == DefaultFlowable5CompatibilityHandler.class) {
    throw new UnsupportedOperationException("Default handler does not expose the Camel context");
}

Try / catch

try {
    Object camel = handler.getCamelContextObject(value);
} catch (FlowableException e) {
    CamelContext ctx = (CamelContext) applicationContext.getBean("camelContext"); // fallback to direct lookup
}

Prevention

When it happens

Trigger: 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.

Common situations: Migrating Activiti 5 processes that relied on the Activiti Camel module into Flowable while still requesting the Camel context through the compatibility handler.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable5-compatibility/src/main/java/org/flowable/compatibility/DefaultFlowable5CompatibilityHandler.java:1067

    @Override
    public Object getRawProcessEngine() {
        return getProcessEngine();
    }

    @Override
    public Object getRawProcessConfiguration() {
        return getProcessEngine().getProcessEngineConfiguration();
    }

    @Override
    public Object getRawCommandExecutor() {
        ProcessEngineConfigurationImpl processEngineConfig = (ProcessEngineConfigurationImpl) getProcessEngine().getProcessEngineConfiguration();
        return processEngineConfig.getCommandExecutor();
    }

    @Override
    public Object getCamelContextObject(String camelContextValue) {
        throw new FlowableException("Getting the Camel context is not support in this engine configuration");
    }

    @Override
    public void setJobProcessor(List<Object> flowable5JobProcessors) {
        getProcessEngine().getProcessEngineConfiguration().setJobProcessors(convertToFlowable5JobProcessors(flowable5JobProcessors));
    }

    private List<JobProcessor> convertToFlowable5JobProcessors(List<Object> jobProcessors) {
        ArrayList<JobProcessor> flowable5JobProcessors = new ArrayList<>();
        for (Object jobProcessor : jobProcessors) {
            flowable5JobProcessors.add((org.activiti.engine.runtime.JobProcessor) jobProcessor);
        }
        return flowable5JobProcessors;
    }

    protected ProcessEngine getProcessEngine() {
        if (processEngine == null) {
            synchronized (this) {

View on GitHub (pinned to d6d39ce1c6)