flowable/flowable-engine · error · FlowableException

Could not find org.flowable.camel.CamelBehavior:

Error message

Could not find org.flowable.camel.CamelBehavior: 

What it means

When a BPMN model contains a Camel service task, DefaultActivityBehaviorFactory.createCamelActivityBehavior loads the Camel behavior class (default org.flowable.camel.impl.CamelBehaviorDefaultImpl). If the flowable-camel module is not on the classpath, ClassNotFound is wrapped in FlowableException("Could not find org.flowable.camel.CamelBehavior: ").

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/parser/factory/DefaultActivityBehaviorFactory.java:319

                }
            }

            if (behaviorExtension != null) {
                fieldExtensions.remove(behaviorExtension);
            }

            if (theClass == null) {
                // Default Camel behavior class
                theClass = Class.forName(getDefaultCamelBehaviorClassName());
            }

            List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions);
            addExceptionMapAsFieldDeclaration(fieldDeclarations, task.getMapExceptions());
            return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate(
                    theClass, fieldDeclarations);

        } catch (ClassNotFoundException e) {
            throw new FlowableException("Could not find org.flowable.camel.CamelBehavior: ", e);
        }
    }

	protected String getDefaultCamelBehaviorClassName() {
		return "org.flowable.camel.impl.CamelBehaviorDefaultImpl";
	}

    private void addExceptionMapAsFieldDeclaration(List<FieldDeclaration> fieldDeclarations, List<MapExceptionEntry> mapExceptions) {
        FieldDeclaration exceptionMapsFieldDeclaration = new FieldDeclaration(EXCEPTION_MAP_FIELD, mapExceptions.getClass().toString(), mapExceptions);
        fieldDeclarations.add(exceptionMapsFieldDeclaration);

    }

    @Override
    public ShellActivityBehavior createShellActivityBehavior(ServiceTask serviceTask) {
        List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(serviceTask.getFieldExtensions());
        return (ShellActivityBehavior) ClassDelegate.defaultInstantiateDelegate(
                ShellActivityBehavior.class, fieldDeclarations);

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Add the flowable-camel dependency to the runtime classpath (org.flowable:flowable-camel)
  2. If Camel is not needed, remove the camel service task from the BPMN XML
  3. Verify the default CamelBehavior class name matches your Flowable version (getDefaultCamelBehaviorClassName) and that no custom className points to a removed class

Example fix

// before (pom.xml)
<!-- no camel dependency -->
// after (pom.xml)
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-camel</artifactId>
  <version>${flowable.version}</version>
</dependency>
Defensive patterns

Strategy: fallback

Validate before calling

try {
    Class.forName("org.flowable.camel.impl.CamelBehaviorDefaultImpl");
} catch (ClassNotFoundException e) {
    throw new IllegalStateException("flowable-camel module missing from classpath");
}

Try / catch

try {
    repositoryService.createDeployment().deploy();
} catch (FlowableException e) {
    if (e.getMessage().startsWith("Could not find org.flowable.camel.CamelBehavior")) {
        log.error("Add org.flowable:flowable-camel to dependencies");
    }
}

Prevention

When it happens

Trigger: Deploying/executing a process containing <serviceTask flowable:type="camel"> (or a camel implementation) while the flowable-camel dependency is absent from the runtime classpath.

Common situations: Engine deployed without optional flowable-camel module; a process authored in an environment that had Camel is deployed to a runtime without it; fat-jar build excluding optional dependencies.

Related errors


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