{"record":{"id":"1343901b1f77eadc","repo":"flowable/flowable-engine","slug":"out-parameter-target-expression-did-not-resolve","errorCode":null,"errorMessage":"Out parameter target expression {} did not resolve to a variable name, this is most likely a programmatic error","messagePattern":"Out parameter target expression (.+?) did not resolve to a variable name, this is most likely a programmatic error","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/ProcessTaskActivityBehavior.java","lineNumber":239,"sourceCode":"                                       CaseInstanceEntity caseInstance,\n                                       ProcessInstanceService processInstanceService) {\n\n        if (outParameters == null) {\n            return;\n        }\n\n        for (IOParameter outParameter : outParameters) {\n\n            String variableName = null;\n            if (StringUtils.isNotEmpty(outParameter.getTarget())) {\n                variableName = outParameter.getTarget();\n\n            } else if (StringUtils.isNotEmpty(outParameter.getTargetExpression())) {\n                Object variableNameValue = processInstanceService.resolveExpression(planItemInstance.getReferenceId(), outParameter.getTargetExpression());\n                if (variableNameValue != null) {\n                    variableName = variableNameValue.toString();\n                } else {\n                    LOGGER.warn(\"Out parameter target expression {} did not resolve to a variable name, this is most likely a programmatic error\",\n                            outParameter.getTargetExpression());\n                }\n\n            }\n\n            Object variableValue = null;\n            if (StringUtils.isNotEmpty(outParameter.getSourceExpression())) {\n                variableValue = processInstanceService.resolveExpression(planItemInstance.getReferenceId(), outParameter.getSourceExpression());\n\n            } else if (StringUtils.isNotEmpty(outParameter.getSource())) {\n                variableValue = processInstanceService.getVariable(planItemInstance.getReferenceId(), outParameter.getSource());\n\n            }\n\n            String conversionType = null;\n            if (StringUtils.isNotEmpty(outParameter.getTargetType())) {\n                conversionType = outParameter.getTargetType();\n            } else if (StringUtils.isNotEmpty(outParameter.getSourceType())) {","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/ProcessTaskActivityBehavior.java#L221-L257","documentation":"A warning (not an exception) logged by ProcessTaskActivityBehavior.handleOutParameters when an out-parameter's targetExpression evaluates to null in a CMMN process task. Since the expression is supposed to yield a variable NAME, a null result indicates a modeling/programming mistake; the out-parameter is skipped and the variable is not copied into the case.","triggerScenarios":"A process task's outParameter in the CMMN model has <sourceExpression>-style targetExpression whose evaluation against the plan item instance returns null when handleOutParameters runs during trigger().","commonSituations":"Expression typos referencing a non-existent process variable; expression returning null conditionally (e.g. ${myVar} where myVar is unset); copy-pasted expressions from in-parameters where semantics differ.","solutions":["Inspect the CMMN model's outParameter targetExpression for the plan item and fix the expression so it resolves to a non-null string.","Ensure the referenced process variable is actually set before the process task completes.","Use a literal target attribute instead of targetExpression when the variable name is static.","Add a default/fallback in the expression, e.g. ${empty(v) ? 'defaultVar' : v}."],"exampleFix":"// before (CMMN XML)\n<flowable:outParameter source=\"resultVar\" targetExpression=\"${notSetVar}\" />\n// after\n<flowable:outParameter source=\"resultVar\" target=\"resultVar\" />","handlingStrategy":"validation","validationCode":"// Ensure the expression resolves before modeling it as dynamic\nObject name = processEngine.getProcessEngineConfiguration()\n    .getExpressionManager().createExpression(\"${outcomeVar}\").getValue(execution);\nif (name == null) log.warn(\"targetExpression will resolve to null at runtime\");","typeGuard":null,"tryCatchPattern":"null","preventionTips":["Prefer the static target attribute over targetExpression when the variable name is fixed.","Initialize all variables referenced by target expressions before the process task completes.","Watch logs for this warning during integration tests of CMMN process tasks."],"tags":["cmmn","expression","out-parameter","null"],"backgroundTag":"invalid-argument-value","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"}