{"record":{"id":"f865317241d17ad6","repo":"flowable/flowable-engine","slug":"call-activity-executionactivityid-has-a","errorCode":null,"errorMessage":"Call activity '\" + executionActivityId + \"' has a different called element in the new model. It must be mapped explicitly for migration (or all its child activities)","messagePattern":"Call activity '\" \\+ executionActivityId \\+ \"' has a different called element in the new model\\. It must be mapped explicitly for migration \\(or all its child activities\\)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationManagerImpl.java","lineNumber":698,"sourceCode":"                        List<ExecutionEntity> subProcessChildExecutions = executionEntityManager.findChildExecutionsByProcessInstanceId(callActivityExecution.getSubProcessInstance().getId());\n                        Set<String> childSubProcessExecutionActivityIds = subProcessChildExecutions.stream().map(Execution::getActivityId).collect(Collectors.toSet());\n                        childSubProcessExecutionActivityIds.removeAll(mappedSubProcessActivityIds);\n                        if (!childSubProcessExecutionActivityIds.isEmpty()) {\n                            runningChildrenNotFullyMapped = true;\n                            break;\n                        }\n                    }\n                }\n\n                if (!subProcessActivityMappingsByCallActivityIdAndFromActivityId.containsKey(executionActivityId) || runningChildrenNotFullyMapped) {\n                    //If there are running child activities not mapped, the call activity must be equally valid in the new model, the activityId in the new model must refer also to a callActivity with matching callElement\n                    FlowElement newModelFlowElement = newModel.getFlowElement(executionActivityId);\n                    if (newModelFlowElement == null) {\n                        throw new FlowableException(\"Call activity '\" + executionActivityId + \"' does not exist in the new model. It must be mapped explicitly for migration (or all its child activities)\");\n                    }\n                    if (newModelFlowElement instanceof CallActivity) {\n                        if (!referToSameCalledElement((CallActivity) currentModelFlowElement, (CallActivity) newModelFlowElement)) {\n                            throw new FlowableException(\"Call activity '\" + executionActivityId + \"' has a different called element in the new model. It must be mapped explicitly for migration (or all its child activities)\");\n                        }\n                        if (((CallActivity) currentModelFlowElement).hasMultiInstanceLoopCharacteristics() ^ ((CallActivity) newModelFlowElement).hasMultiInstanceLoopCharacteristics()) {\n                            throw new FlowableException(\"Call activity '\" + executionActivityId + \"' loop characteristics differs in new model. It must be mapped explicitly for migration (or all its child activities)\");\n                        }\n                    } else {\n                        throw new FlowableException(\"Call activity '\" + executionActivityId + \"' is not a Call Activity in the new model. It must be mapped explicitly for migration (or all its child activities)\");\n                    }\n                }\n            }\n\n            String flowElementMultiInstanceParentId = getFlowElementMultiInstanceParentId(currentModelFlowElement);\n            if (flowElementMultiInstanceParentId != null && mappedFromActivities.contains(flowElementMultiInstanceParentId)) {\n                // Add the parent MI execution activity Id to be explicitly mapped...\n                if (!executionActivityIdsToMapExplicitly.contains(flowElementMultiInstanceParentId)) {\n                    executionActivityIdsToMapExplicitly.add(flowElementMultiInstanceParentId);\n                }\n                // The root executions are the ones to migrate and are explicitly mapped\n                List<ExecutionEntity> miRootExecutions = (List<ExecutionEntity>) executionEntityManager.findInactiveExecutionsByActivityIdAndProcessInstanceId(flowElementMultiInstanceParentId, processInstanceExecution.getId());","sourceCodeStart":680,"sourceCodeEnd":716,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationManagerImpl.java#L680-L716","documentation":"Thrown when a call activity with running unmapped child instances exists in both models with the same id, but the called element (the target process definition key) differs between old and new models. Such a change would redirect running children to a different subprocess definition, which Flowable refuses without an explicit mapping.","triggerScenarios":"Migrating instances of a parent process where a call activity's calledElement attribute was changed in the new model version and no explicit activity mapping exists for that call activity.","commonSituations":"Refactoring the subprocess out or pointing the call activity to a new subprocess key; copy-pasted definition versions where calledElement drifted; renaming the subprocess without mapping.","solutions":["Add an explicit activity mapping for the call activity in the migration document","Keep the calledElement unchanged in the target model version","Terminate/complete running child process instances before migration, then map the activity","If children should follow the new called element, plan a separate migration of the child instances and map explicitly"],"exampleFix":"// before\n// new model: <callActivity id=\"callOrder\" calledElement=\"orderV2\"/> while old was orderV1, unmapped\n// after\nmigrationBuilder.addActivityMapping(\"callOrder\", \"callOrder\"); // explicit mapping allows the change","handlingStrategy":"validation","validationCode":"CallActivity oldCa = (CallActivity) oldModel.getFlowElement(\"callTask1\");\nFlowElement newEl = newModel.getFlowElement(\"callTask1\");\nif (newEl instanceof CallActivity && !((CallActivity) newEl).getCalledElement().equals(oldCa.getCalledElement())) {\n    // add explicit mapping or keep calledElement identical\n}","typeGuard":null,"tryCatchPattern":"try {\n    migrationBuilder.migrate(instanceId);\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"has a different called element\")) {\n        // map the call activity explicitly or revert the calledElement change\n    }\n}","preventionTips":["Treat calledElement as a stable contract across versions","Code-review any calledElement change for running instances","Map call activities explicitly when calledElement intentionally changes","Document subprocess key renames in release notes"],"tags":["flowable","migration","call-activity","called-element"],"backgroundTag":"incompatible-source-type","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}