flowable/flowable-engine · error · FlowableException
Unrecognized calledElementType [${calledElementType}] in ${e
Error message
Unrecognized calledElementType [${calledElementType}] in ${execution} What it means
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.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java:246
processEngineConfiguration.getActivityInstanceEntityManager().recordSubProcessInstanceStart(executionEntity, subProcessInstance);
CommandContextUtil.getAgenda().planContinueProcessOperation(subProcessInitialExecution);
if (eventDispatcher != null && eventDispatcher.isEnabled()) {
Map<String, Object> allVariables = new HashMap<>();
allVariables.putAll(instanceBeforeContext.getVariables());
allVariables.putAll(instanceBeforeContext.getTransientVariables());
eventDispatcher.dispatchEvent(FlowableEventBuilder.createProcessStartedEvent(subProcessInitialExecution, allVariables, false),
processEngineConfiguration.getEngineCfgKey());
}
}
protected ProcessDefinition getProcessDefinition(DelegateExecution execution, CallActivity callActivity, ProcessEngineConfigurationImpl processEngineConfiguration) {
ProcessDefinition processDefinition = switch (StringUtils.isNotEmpty(calledElementType) ? calledElementType : CALLED_ELEMENT_TYPE_KEY) {
case CALLED_ELEMENT_TYPE_ID -> getProcessDefinitionById(execution, processEngineConfiguration);
case CALLED_ELEMENT_TYPE_KEY -> getProcessDefinitionByKey(execution, callActivity.isSameDeployment(), processEngineConfiguration);
default -> throw new FlowableException("Unrecognized calledElementType [" + calledElementType + "] in " + execution);
};
return processDefinition;
}
@Override
public void completing(DelegateExecution execution, DelegateExecution subProcessInstance) throws Exception {
// only data. no control flow available on this execution.
ExpressionManager expressionManager = CommandContextUtil.getProcessEngineConfiguration().getExpressionManager();
// copy process variables
ExecutionEntity executionEntity = (ExecutionEntity) execution;
CallActivity callActivity = (CallActivity) executionEntity.getCurrentFlowElement();
List<IOParameter> outParameters = callActivity.getOutParameters();
if (!outParameters.isEmpty()) {
BiConsumer<String, Object> variableConsumer = (variableName, value) -> {
if (callActivity.isUseLocalScopeForOutParameters()) {View on GitHub (pinned to d6d39ce1c6)
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.
Example fix
// before <callActivity id="callSub" calledElement="subProcess" flowable:calledElementType="definitionKey"/> // after <callActivity id="callSub" calledElement="subProcess" flowable:calledElementType="key"/>
Defensive patterns
Strategy: validation
Validate before calling
String t = callActivity.getAttributeValue("http://flowable.org/bpmn", "calledElementType");
if (t != null && !t.equals("key") && !t.equals("id")) throw new IllegalArgumentException("Bad calledElementType: " + t); Try / catch
try { process.advance(); }
catch (FlowableException e) { if (e.getMessage().startsWith("Unrecognized calledElementType")) { fixBpmnAttributeAndRedeploy(); } else { throw e; } } Prevention
- 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).
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Error while completing sub process of execution ${processIns
- Cannot start a sub process instance. Process model ${process
- No start element found for process definition ${processDefin
- Cannot start process instance. Process definition ${processD
- Cannot complete process instance. Parent process instance ${
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/489e390a5fddda7d.
Report an issue: GitHub.