{"record":{"id":"ac12da73e30e6661","repo":"flowable/flowable-engine","slug":"expected-an-activity-behavior-in-flow-node-flown","errorCode":null,"errorMessage":"Expected an activity behavior in flow node ${flowNode.getId()} for ${execution}","messagePattern":"Expected an activity behavior in flow node (.+?) for (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/ContinueProcessOperation.java","lineNumber":235,"sourceCode":"        if (activityBehavior != null) {\n            executeActivityBehavior(activityBehavior, flowNode);\n            \n            if (execution.isMultiInstanceRoot() && !execution.isDeleted() && !execution.isEnded()) {\n                // Create any boundary events, sub process boundary events will be created from the activity behavior\n                List<ExecutionEntity> boundaryEventExecutions = null;\n                List<BoundaryEvent> boundaryEvents = null;\n                if (!inCompensation && flowNode instanceof Activity) { // Only activities can have boundary events\n                    boundaryEvents = ((Activity) flowNode).getBoundaryEvents();\n                    if (CollectionUtil.isNotEmpty(boundaryEvents)) {\n                        boundaryEventExecutions = createBoundaryEvents(boundaryEvents, execution);\n                    }\n                }\n                \n                executeBoundaryEvents(boundaryEventExecutions);\n            }\n            \n        } else {\n            throw new FlowableException(\"Expected an activity behavior in flow node \" + flowNode.getId() + \" for \" + execution);\n        }\n    }\n    \n    protected boolean hasMultiInstanceRootExecution(ExecutionEntity execution, FlowNode flowNode) {\n        ExecutionEntity currentExecution = execution.getParent();\n        while (currentExecution != null) {\n            if (currentExecution.isMultiInstanceRoot() && flowNode.getId().equals(currentExecution.getActivityId())) {\n                return true;\n            }\n            currentExecution = currentExecution.getParent();\n        }\n        return false;\n    }\n    \n    protected ExecutionEntity createMultiInstanceRootExecution(ExecutionEntity execution) {\n        ExecutionEntity parentExecution = execution.getParent();\n        FlowElement flowElement = execution.getCurrentFlowElement();\n        ","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/ContinueProcessOperation.java#L217-L253","documentation":"During a synchronous multi-instance continuation, ContinueProcessOperation requires the flow node to have an attached activity behavior that can be executed. If a FlowNode reaches this multi-instance path without behavior, the engine cannot continue and throws FlowableException with the node id and execution.","triggerScenarios":"continueThroughFlowNode -> executeMultiInstanceSynchronous on a multi-instance flow node whose behavior is null — usually a custom/unknown element type, a listener-swallowed parse error, or a model element unsupported by the deployed BpmnParseHandler set.","commonSituations":"Custom BPMN extensions/parse handlers missing on the classpath; process XML deployed with elements the engine version does not map to behaviors; corrupted parse after version upgrade.","solutions":["Check the node id in the message against the deployed model and confirm the element type is a supported Flowable task/node","Ensure all BpmnParseHandler/extension modules used at design time are on the runtime classpath","Redeploy the process definition after fixing the model or upgrading the engine","If multi-instance is unnecessary, remove the multiInstanceLoopCharacteristics"],"exampleFix":"// before (bpmn)\n<serviceTask id=\"step1\" flowable:multiInstanceLoopCharacteristics=\"...\" />\n<!-- no class/delegateExpression binding -->\n// after (bpmn)\n<serviceTask id=\"step1\" flowable:class=\"com.acme.Step1Delegate\"\n    flowable:multiInstanceLoopCharacteristics=\"...\" />","handlingStrategy":"try-catch","validationCode":"FlowNode node = (FlowNode) bpmnModel.getFlowElement(nodeId);\nif (node.getBehavior() == null) {\n    throw new IllegalStateException(\"Node \" + nodeId + \" has no activity behavior; check parse handlers\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    // continuation happens inside engine ops\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"Expected an activity behavior\")) {\n        log.error(\"Model/parse problem at node; check deployed BPMN and parse handlers\");\n    }\n    throw e;\n}","preventionTips":["Keep parse handler/custom extension modules in sync between design and runtime","Validate BPMN models on deployment (deployment validation enabled)","Test deployments with the same engine version used in production"],"tags":["java","flowable","bpmn","multi-instance","process-definition"],"backgroundTag":"internal-invariant-violation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}