{"record":{"id":"298c300aae63ac9c","repo":"flowable/flowable-engine","slug":"call-activity-executionactivityid-is-not","errorCode":null,"errorMessage":"Call activity '\" + executionActivityId + \"' is not a Call Activity in the new model. It must be mapped explicitly for migration (or all its child activities)","messagePattern":"Call activity '\" \\+ executionActivityId \\+ \"' is not a Call Activity 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":704,"sourceCode":"                        }\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());\n                filteredExecutionsByActivityId.put(flowElementMultiInstanceParentId, miRootExecutions);\n                \n            } else {\n                LOGGER.debug(\"Checking execution(s) - activityId:'{}\", executionActivityId);\n                if (isActivityIdInProcessDefinitionModel(executionActivityId, newModel)) {\n                    // Cannot auto-map inside a MultiInstance container","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationManagerImpl.java#L686-L722","documentation":"Thrown when the element with the same id in the new model is not a CallActivity while the old model's element is one, and running children of this call activity are not fully mapped. Call activity semantics cannot be auto-migrated to an arbitrary other activity type.","triggerScenarios":"Migrating instances whose execution sits in a call activity with running unmapped children, where the new model replaced the call activity by a user task/service task (or any non-call-activity element) with the same id.","commonSituations":"Process refactor downgrading a subprocess invocation to an inline element or vice versa while reusing the id; copy-paste of activity ids across models; deleting the subprocess and inlining its logic.","solutions":["Add an explicit activity mapping for the call activity in the migration document","Rename the replacement activity in the new model so the id collision is avoided, then map explicitly","Keep the element a CallActivity in the target model","Terminate the running child process instances before migration so the strict check is bypassed"],"exampleFix":"// before\n// new model: <userTask id=\"callOrder\"/> replacing <callActivity id=\"callOrder\"/>\n// after\nmigrationBuilder.addActivityMapping(\"callOrder\", \"callOrder\"); // explicit mapping","handlingStrategy":"validation","validationCode":"FlowElement newEl = newModel.getFlowElement(\"callTask1\");\nif (oldEl instanceof CallActivity && !(newEl instanceof CallActivity)) {\n    // explicit mapping required, or avoid id reuse\n}","typeGuard":null,"tryCatchPattern":"try {\n    migrationBuilder.migrate(instanceId);\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"is not a Call Activity in the new model\")) {\n        // rebuild migration document with explicit mapping\n    }\n}","preventionTips":["Never reuse a call activity id for a different activity type","Use unique new ids when replacing call activities with inline logic","Diff model element types across versions in automated tests","Complete/terminate running children before structural refactors"],"tags":["flowable","migration","call-activity","activity-type"],"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"}