{"record":{"id":"141331deafd2c01c","repo":"flowable/flowable-engine","slug":"unable-to-resolve-expression-value-for-value-in","errorCode":null,"errorMessage":"Unable to resolve expression value for ${value} in ${planItemInstanceEntity}","messagePattern":"Unable to resolve expression value for (.+?) in (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/CasePageTaskActivityBehaviour.java","lineNumber":125,"sourceCode":"\n    @Override\n    public void onParentEnd(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String parentEndTransition, String exitEventType) {\n        // a case page is working differently from default plan items as it gets completed, if its parent is completed and is terminated otherwise\n        // delegate the completion on parent complete or an exit sentry having exit event type complete or force complete\n        if (PlanItemTransition.COMPLETE.equals(parentEndTransition) || EXIT_EVENT_TYPE_COMPLETE.equals(exitEventType) || EXIT_EVENT_TYPE_FORCE_COMPLETE.equals(exitEventType)) {\n            CommandContextUtil.getAgenda(commandContext).planCompletePlanItemInstanceOperation(planItemInstanceEntity);\n        } else {\n            CommandContextUtil.getAgenda(commandContext).planTerminatePlanItemInstanceOperation(planItemInstanceEntity, null, null);\n        }\n    }\n\n    protected String getExpressionValue(String value, PlanItemInstanceEntity planItemInstanceEntity, ExpressionManager expressionManager) {\n        Object expressionValue = expressionManager.createExpression(value).getValue(planItemInstanceEntity);\n        if (expressionValue != null) {\n            return expressionValue.toString();\n        }\n        \n        throw new FlowableException(\"Unable to resolve expression value for \" + value + \" in \" + planItemInstanceEntity);\n    }\n    \n    protected Collection<String> getExpressionListValue(String value, PlanItemInstanceEntity planItemInstanceEntity, ExpressionManager expressionManager) {\n        Object expressionValue = expressionManager.createExpression(value).getValue(planItemInstanceEntity);\n        Collection<String> candidates = CandidateUtil.extractCandidates(expressionValue);\n        return candidates;\n    }\n}\n","sourceCodeStart":107,"sourceCodeEnd":134,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/CasePageTaskActivityBehaviour.java#L107-L134","documentation":"CasePageTaskActivityBehaviour.getExpressionValue evaluates a configured expression for the page task and requires a non-null result to return as a String. When the expression resolves to null (variable unset, property missing, expression typo), it throws this error. It enforces that required task attributes actually resolve at runtime.","triggerScenarios":"Executing a CasePageTask plan item whose formKey/document/etc. attribute is an expression like ${myVar} and myVar is not set (no case variable, no task payload, or the variable is null).","commonSituations":"Variable name typo in the CMMN XML attribute; variable never initialized before the page task activates; expression evaluates against wrong scope; null form key supplied by caller or REST start.","solutions":["Ensure the referenced variable is set before the page task plan item becomes active (case variable, in-parameter mapping, or form data).","Check the expression text in the case model for typos or wrong property paths.","Provide a default in the expression, e.g. ${myVar != null ? myVar : 'default'} if the behavior accepts it.","Validate the start/incoming payload contains all required fields for the page task."],"exampleFix":"// before\ncaseInstanceBuilder.variable(\"formKey\", null); // page task ${formKey} resolves to null -> error\n// after\ncaseInstanceBuilder.variable(\"formKey\", \"my-page-form\");","handlingStrategy":"validation","validationCode":"Object v = caseInstance.getCaseVariables().get(\"formKey\");\nif (v == null) throw new IllegalArgumentException(\"formKey variable must be set before the page task activates\");","typeGuard":null,"tryCatchPattern":"try {\n    cmmnRuntimeService.startCaseInstance(builder);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"Unable to resolve expression value\")) {\n        // supply missing variable and retry\n    }\n}","preventionTips":["Set all variables referenced by page task expressions at case start","Use in-parameter mappings on the page task","Review case model expressions for typos","Validate start payloads against required task attributes"],"tags":["cmmn","expression","page-task","null-value"],"backgroundTag":"missing-required-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}