{"record":{"id":"489e390a5fddda7d","repo":"flowable/flowable-engine","slug":"unrecognized-calledelementtype-calledelementtyp","errorCode":null,"errorMessage":"Unrecognized calledElementType [${calledElementType}] in ${execution}","messagePattern":"Unrecognized calledElementType \\[(.+?)\\] in (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java","lineNumber":246,"sourceCode":"        processEngineConfiguration.getActivityInstanceEntityManager().recordSubProcessInstanceStart(executionEntity, subProcessInstance);\n\n        CommandContextUtil.getAgenda().planContinueProcessOperation(subProcessInitialExecution);\n\n        if (eventDispatcher != null && eventDispatcher.isEnabled()) {\n            Map<String, Object> allVariables = new HashMap<>();\n            allVariables.putAll(instanceBeforeContext.getVariables());\n            allVariables.putAll(instanceBeforeContext.getTransientVariables());\n            eventDispatcher.dispatchEvent(FlowableEventBuilder.createProcessStartedEvent(subProcessInitialExecution, allVariables, false),\n                    processEngineConfiguration.getEngineCfgKey());\n        }\n        \n    }\n\n    protected ProcessDefinition getProcessDefinition(DelegateExecution execution, CallActivity callActivity, ProcessEngineConfigurationImpl processEngineConfiguration) {\n        ProcessDefinition processDefinition = switch (StringUtils.isNotEmpty(calledElementType) ? calledElementType : CALLED_ELEMENT_TYPE_KEY) {\n            case CALLED_ELEMENT_TYPE_ID -> getProcessDefinitionById(execution, processEngineConfiguration);\n            case CALLED_ELEMENT_TYPE_KEY -> getProcessDefinitionByKey(execution, callActivity.isSameDeployment(), processEngineConfiguration);\n            default -> throw new FlowableException(\"Unrecognized calledElementType [\" + calledElementType + \"] in \" + execution);\n        };\n        return processDefinition;\n    }\n\n    @Override\n    public void completing(DelegateExecution execution, DelegateExecution subProcessInstance) throws Exception {\n        // only data. no control flow available on this execution.\n\n        ExpressionManager expressionManager = CommandContextUtil.getProcessEngineConfiguration().getExpressionManager();\n\n        // copy process variables\n        ExecutionEntity executionEntity = (ExecutionEntity) execution;\n        CallActivity callActivity = (CallActivity) executionEntity.getCurrentFlowElement();\n\n        List<IOParameter> outParameters = callActivity.getOutParameters();\n        if (!outParameters.isEmpty()) {\n            BiConsumer<String, Object> variableConsumer = (variableName, value) -> {\n                if (callActivity.isUseLocalScopeForOutParameters()) {","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java#L228-L264","documentation":"CallActivityBehavior.getProcessDefinition dispatches on the call activity's flowable:calledElementType attribute, which must be either 'key' or 'id'. Any other value falls through the switch's default branch and throws this FlowableException. It is a static configuration error in the BPMN XML of the call activity.","triggerScenarios":"A call activity element declares flowable:calledElementType with a value other than \"key\" or \"id\" (e.g. a typo like 'keys', 'Id', or 'definitionKey'), and the process reaches that call activity during execution.","commonSituations":"Hand-edited BPMN XML; bulk XML transformation or template generation producing an invalid attribute value; copy-paste from documentation of a different Flowable version with different accepted values.","solutions":["Correct the calledElementType attribute in the call activity BPMN XML to exactly \"key\" or \"id\" and redeploy.","Search the model XML for calledElementType and fix any value not matching CALLED_ELEMENT_TYPE_KEY/CALLED_ELEMENT_TYPE_ID constants.","If the attribute is set programmatically, validate against allowed values before deployment.","Remove the attribute entirely to fall back to the default (key) behavior if a key lookup is intended."],"exampleFix":"// before\n<callActivity id=\"callSub\" calledElement=\"subProcess\" flowable:calledElementType=\"definitionKey\"/>\n// after\n<callActivity id=\"callSub\" calledElement=\"subProcess\" flowable:calledElementType=\"key\"/>","handlingStrategy":"validation","validationCode":"String t = callActivity.getAttributeValue(\"http://flowable.org/bpmn\", \"calledElementType\");\nif (t != null && !t.equals(\"key\") && !t.equals(\"id\")) throw new IllegalArgumentException(\"Bad calledElementType: \" + t);","typeGuard":null,"tryCatchPattern":"try { process.advance(); }\ncatch (FlowableException e) { if (e.getMessage().startsWith(\"Unrecognized calledElementType\")) { fixBpmnAttributeAndRedeploy(); } else { throw e; } }","preventionTips":["Only use calledElementType values key or id.","Lint BPMN XML attributes in CI before deployment.","Avoid hand-editing deployed BPMN; use the modeler.","Omit the attribute to accept the default (key)."],"tags":["flowable","call-activity","bpmn-config","invalid-enum"],"backgroundTag":"invalid-enum-value","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"}