flowable/flowable-engine · error · FlowableException

Call activity '" + executionActivityId + "' is not a Call…

Error message

Call activity '" + executionActivityId + "' is not a Call Activity in the new model. It must be mapped explicitly for migration (or all its child activities)

What it means

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.

Solutions

  1. Add an explicit activity mapping for the call activity in the migration document
  2. Rename the replacement activity in the new model so the id collision is avoided, then map explicitly
  3. Keep the element a CallActivity in the target model
  4. Terminate the running child process instances before migration so the strict check is bypassed

Example fix

// before
// new model: <userTask id="callOrder"/> replacing <callActivity id="callOrder"/>
// after
migrationBuilder.addActivityMapping("callOrder", "callOrder"); // explicit mapping
Defensive patterns

Strategy: validation

Validate before calling

FlowElement newEl = newModel.getFlowElement("callTask1");
if (oldEl instanceof CallActivity && !(newEl instanceof CallActivity)) {
    // explicit mapping required, or avoid id reuse
}

Try / catch

try {
    migrationBuilder.migrate(instanceId);
} catch (FlowableException e) {
    if (e.getMessage().contains("is not a Call Activity in the new model")) {
        // rebuild migration document with explicit mapping
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/298c300aae63ac9c. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationManagerImpl.java:704

                        }
                    }
                }

                if (!subProcessActivityMappingsByCallActivityIdAndFromActivityId.containsKey(executionActivityId) || runningChildrenNotFullyMapped) {
                    //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
                    FlowElement newModelFlowElement = newModel.getFlowElement(executionActivityId);
                    if (newModelFlowElement == null) {
                        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)");
                    }
                    if (newModelFlowElement instanceof CallActivity) {
                        if (!referToSameCalledElement((CallActivity) currentModelFlowElement, (CallActivity) newModelFlowElement)) {
                            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)");
                        }
                        if (((CallActivity) currentModelFlowElement).hasMultiInstanceLoopCharacteristics() ^ ((CallActivity) newModelFlowElement).hasMultiInstanceLoopCharacteristics()) {
                            throw new FlowableException("Call activity '" + executionActivityId + "' loop characteristics differs in new model. It must be mapped explicitly for migration (or all its child activities)");
                        }
                    } else {
                        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)");
                    }
                }
            }

            String flowElementMultiInstanceParentId = getFlowElementMultiInstanceParentId(currentModelFlowElement);
            if (flowElementMultiInstanceParentId != null && mappedFromActivities.contains(flowElementMultiInstanceParentId)) {
                // Add the parent MI execution activity Id to be explicitly mapped...
                if (!executionActivityIdsToMapExplicitly.contains(flowElementMultiInstanceParentId)) {
                    executionActivityIdsToMapExplicitly.add(flowElementMultiInstanceParentId);
                }
                // The root executions are the ones to migrate and are explicitly mapped
                List<ExecutionEntity> miRootExecutions = (List<ExecutionEntity>) executionEntityManager.findInactiveExecutionsByActivityIdAndProcessInstanceId(flowElementMultiInstanceParentId, processInstanceExecution.getId());
                filteredExecutionsByActivityId.put(flowElementMultiInstanceParentId, miRootExecutions);
                
            } else {
                LOGGER.debug("Checking execution(s) - activityId:'{}", executionActivityId);
                if (isActivityIdInProcessDefinitionModel(executionActivityId, newModel)) {
                    // Cannot auto-map inside a MultiInstance container

View on GitHub (pinned to d6d39ce1c6)