{"record":{"id":"405dc403c82b3c9c","repo":"flowable/flowable-engine","slug":"endpoint-not-defined-for-key","errorCode":null,"errorMessage":"Endpoint not defined for ${key}","messagePattern":"Endpoint not defined for (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-camel/src/main/java/org/flowable/camel/CamelBehavior.java","lineNumber":158,"sourceCode":"            leave(execution);\n        }\n    }\n\n    protected FlowableEndpoint createEndpoint(DelegateExecution execution, boolean isV5Execution) {\n        String uri = \"flowable://\" + getProcessDefinitionKey(execution, isV5Execution) + \":\" + execution.getCurrentActivityId();\n        CamelContext camelContext = getCamelContext(execution, isV5Execution);\n        return getEndpoint(camelContext, uri);\n    }\n\n    protected abstract CamelContext getCamelContext(DelegateExecution execution, boolean isV5Execution);\n\n    protected FlowableEndpoint getEndpoint(CamelContext camelContext, String key) {\n        for (Endpoint e : camelContext.getEndpoints()) {\n            if (e.getEndpointKey().equals(key) && (e instanceof FlowableEndpoint)) {\n                return (FlowableEndpoint) e;\n            }\n        }\n        throw new FlowableException(\"Endpoint not defined for \" + key);\n    }\n\n    protected Exchange createExchange(DelegateExecution activityExecution, FlowableEndpoint endpoint) {\n        Exchange ex = endpoint.createExchange();\n        ex.setProperty(FlowableProducer.PROCESS_ID_PROPERTY, activityExecution.getProcessInstanceId());\n        ex.setProperty(FlowableProducer.EXECUTION_ID_PROPERTY, activityExecution.getId());\n        Map<String, Object> variables = activityExecution.getVariables();\n        TargetType toTargetType = determineToTargetType(endpoint);\n        copyVariables(variables, ex, endpoint, toTargetType);\n        return ex;\n    }\n\n    protected boolean handleCamelException(Exchange exchange, DelegateExecution execution, boolean isV5Execution) {\n        Exception camelException = exchange.getException();\n        boolean notHandledByCamel = exchange.isFailed() && camelException != null;\n        if (notHandledByCamel) {\n            if (camelException instanceof BusinessError) {\n                if (isV5Execution) {","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-camel/src/main/java/org/flowable/camel/CamelBehavior.java#L140-L176","documentation":"CamelBehavior.createEndpoint looks up a pre-registered FlowableEndpoint in the CamelContext by endpoint key derived from the process/activity. If no FlowableEndpoint with that key exists in the context, a FlowableException is thrown.","triggerScenarios":"A service task configured with camelBehavior runs, but no flowable:<routeName> endpoint was registered in the CamelContext matching the key (usually the route URI used in the camelExtension).","commonSituations":"Camel route declared but not started; URI in the BPMN camel connector does not match the registered endpoint URI; CamelContext is a different instance than the one containing the endpoints.","solutions":["Define the Camel route in the same CamelContext with a URI matching the key, e.g. from(\"flowable:orderProcess\") ","Ensure the endpoint URI in the BPMN extension exactly matches the route's from URI","Verify a single CamelContext instance is shared between the route registry and Flowable"],"exampleFix":"// before: no route defined for the URI used by camelBehavior\n// after\nfrom(\"flowable:camelProcess:camelTask\").to(\"bean:myBean?method=handle\");","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* execute task */ } catch (FlowableException e) { if (e.getMessage().startsWith(\"Endpoint not defined\")) { /* register the flowable: endpoint */ } }","preventionTips":["Register flowable: routes in the shared CamelContext with matching URIs"],"tags":["camel","integration","endpoint"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}