{"record":{"id":"0e7dfd42aaa19164","repo":"flowable/flowable-engine","slug":"include-in-stage-overview-expression-does-not-reso-0e7dfd","errorCode":null,"errorMessage":"Include in stage overview expression does not resolve to a boolean value <includeInStageOverviewValue>: <stageValueObject> for <planItemInstanceEntity>","messagePattern":"Include in stage overview expression does not resolve to a boolean value <includeInStageOverviewValue>: <stageValueObject> for <planItemInstanceEntity>","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/DefaultCmmnHistoryManager.java","lineNumber":606,"sourceCode":"            String includeInStageOverviewValue = null;\n            if (planItemInstanceEntity.isStage()) {\n                if (planItemDefinition instanceof Stage stage) {\n                    includeInStageOverviewValue = stage.getIncludeInStageOverview();\n                }\n                \n            } else if (planItemDefinition instanceof Milestone milestone) {\n                includeInStageOverviewValue = milestone.getIncludeInStageOverview();\n            }\n            \n            if (StringUtils.isNotEmpty(includeInStageOverviewValue)) {\n                if (\"true\".equalsIgnoreCase(includeInStageOverviewValue)) {\n                    showInOverview = true;\n                \n                } else if (!\"false\".equalsIgnoreCase(includeInStageOverviewValue)) {\n                    Expression stageExpression = cmmnEngineConfiguration.getExpressionManager().createExpression(includeInStageOverviewValue);\n                    Object stageValueObject = stageExpression.getValue(planItemInstanceEntity);\n                    if (!(stageValueObject instanceof Boolean)) {\n                        throw new FlowableException(\"Include in stage overview expression does not resolve to a boolean value \" + \n                                        includeInStageOverviewValue + \": \" + stageValueObject + \" for \" + planItemInstanceEntity);\n                    }\n                    \n                    showInOverview = (Boolean) stageValueObject;\n                }\n            }\n        }\n        \n        return showInOverview;\n    }\n}\n","sourceCodeStart":588,"sourceCodeEnd":618,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/DefaultCmmnHistoryManager.java#L588-L618","documentation":"When recording history for a plan item in a stage, the cmmn:includeInStageOverview attribute may be an expression. DefaultCmmnHistoryManager evaluates it and requires a Boolean result; anything else (String, Integer, null object) makes overview inclusion undecidable, so it throws FlowableException naming the expression text, the evaluated value and the plan item instance.","triggerScenarios":"A CMMN model where includeInStageOverview is set to an expression like ${someVar} that evaluates to a non-boolean (e.g. a string 'yes', a number, or null because the variable is unset) when the plan item instance reaches history recording.","commonSituations":"Expression returning 'true' as a String instead of boolean true; referenced case variable not initialized; copying an attribute value like \"1\"/\"yes\" expecting implicit conversion; spelling mistake in the variable name yielding null.","solutions":["Change the expression/variable so it evaluates to a real Boolean (true/false), e.g. ${isValid} where isValid is a java.lang.Boolean","Quote-check: literal 'true'/'false' strings in the attribute are handled without evaluation; only expressions must return Boolean","Initialize or rename the case variable referenced by the expression so it is non-null and boolean-typed"],"exampleFix":"// before (CMMN XML / variable)\n<planItem ... cmmn:includeInStageOverview=\"${showInOverview}\"> // showInOverview = \"yes\" (String)\n// after\ncaseVariables.put(\"showInOverview\", Boolean.TRUE);\n<planItem ... cmmn:includeInStageOverview=\"${showInOverview}\">","handlingStrategy":"validation","validationCode":"Object v = caseVariables.get(\"showInOverview\"); if (!(v instanceof Boolean)) throw new IllegalStateException(\"showInOverview must be Boolean\");","typeGuard":null,"tryCatchPattern":"try { startCase(); } catch (FlowableException e) { if (e.getMessage().contains(\"Include in stage overview\")) { fixExpressionOrVariable(); } }","preventionTips":["Only bind Boolean-typed variables to includeInStageOverview expressions","Prefer literal 'true'/'false' attribute values over expressions when static","Test CMMN models with all referenced variables initialized"],"tags":["expression","type-mismatch","history","cmmn"],"backgroundTag":"type-mismatch","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"}