{"record":{"id":"959fc4a68c374006","repo":"flowable/flowable-engine","slug":"unknown-property-used-in-expression-expressiont","errorCode":null,"errorMessage":"Unknown property used in expression: ${expressionText}","messagePattern":"Unknown property used in expression: (.+?)","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/el/JuelExpression.java","lineNumber":55,"sourceCode":"    protected String expressionText;\n    protected ValueExpression valueExpression;\n\n    public JuelExpression(ValueExpression valueExpression, String expressionText) {\n        this.valueExpression = valueExpression;\n        this.expressionText = expressionText;\n    }\n\n    @Override\n    public Object getValue(VariableContainer variableContainer) {\n        ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext((VariableScope) variableContainer);\n        try {\n            ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext);\n            Context.getProcessEngineConfiguration()\n                    .getDelegateInterceptor()\n                    .handleInvocation(invocation);\n            return invocation.getInvocationResult();\n        } catch (PropertyNotFoundException pnfe) {\n            throw new ActivitiException(\"Unknown property used in expression: \" + expressionText, pnfe);\n        } catch (MethodNotFoundException mnfe) {\n            throw new ActivitiException(\"Unknown method used in expression: \" + expressionText, mnfe);\n        } catch (ELException ele) {\n            throw new ActivitiException(\"Error while evaluating expression: \" + expressionText, ele);\n        } catch (Exception e) {\n            throw new ActivitiException(\"Error while evaluating expression: \" + expressionText, e);\n        }\n    }\n    \n    @Override\n    public void setValue(Object value, VariableContainer variableContainer) {\n        ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext((VariableScope) variableContainer);\n        try {\n            ExpressionSetInvocation invocation = new ExpressionSetInvocation(valueExpression, elContext, value);\n            Context.getProcessEngineConfiguration()\n                    .getDelegateInterceptor()\n                    .handleInvocation(invocation);\n        } catch (Exception e) {","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/el/JuelExpression.java#L37-L73","documentation":"JuelExpression.getValue evaluates a JUEL expression against an EL context. When the underlying EL resolver throws PropertyNotFoundException — the referenced bean/property does not exist — the engine wraps it in an ActivitiException with the expression text. It means an identifier in a ${...} expression could not be resolved.","triggerScenarios":"Evaluating an expression like ${myBean.myProperty} during getValue (e.g. via setValues of a field injection) where myBean or myProperty is not registered (no Spring bean, missing process variable, wrong case).","commonSituations":"Typos in variable/bean names in BPMN expressions, referencing a Spring bean that isn't in the application context, missing process variable at that execution point, or case-sensitive property names.","solutions":["Verify the identifier inside ${...} matches an existing process variable or registered bean exactly (check spelling and case).","If it is a Spring bean, confirm it is present in the application context and that the resolver is configured (processEngineConfiguration with Spring beans resolver).","Ensure the variable is set before the expression is evaluated (e.g. set it in an earlier service task or via execution.setVariable).","Use a null-safe construct like ${myVar != null ? myVar.x : 'default'} if the property may be absent."],"exampleFix":"// before\nString name = (String) execution.getVariable(\"usreName\"); // typo → ${usreName.name} fails\n// after\nString name = (String) execution.getVariable(\"userName\");","handlingStrategy":"validation","validationCode":"// Validate that referenced variables/beans exist before the service task executes:\nif (execution.getVariable(\"userName\") == null) {\n  throw new IllegalStateException(\"Process variable 'userName' must be set before expression evaluation\");\n}","typeGuard":"boolean resolvable(Object o) { return o != null; }","tryCatchPattern":"try {\n  Object v = juelExpression.getValue(container);\n} catch (ActivitiException e) {\n  if (e.getCause() instanceof PropertyNotFoundException) {\n    // fall back to default variable value\n    v = defaultValue;\n  } else { throw e; }\n}","preventionTips":["Lint BPMN expressions against known process variables and bean names in CI.","Initialize required variables at process start or before the referencing task.","Use null-safe EL forms (${x != null ? x : default}) for optional values.","Keep bean names and property names consistent (case-sensitive)."],"tags":["expression","el","missing-variable"],"backgroundTag":"resource-not-found","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"}