flowable/flowable-engine · warning

Out parameter target expression

Error message

Out parameter target expression {} did not resolve to a variable name, this is most likely a programmatic error

What it means

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.

Solutions

  1. Inspect the CMMN model's outParameter targetExpression for the plan item and fix the expression so it resolves to a non-null string.
  2. Ensure the referenced process variable is actually set before the process task completes.
  3. Use a literal target attribute instead of targetExpression when the variable name is static.
  4. Add a default/fallback in the expression, e.g. ${empty(v) ? 'defaultVar' : v}.

Example fix

// before (CMMN XML)
<flowable:outParameter source="resultVar" targetExpression="${notSetVar}" />
// after
<flowable:outParameter source="resultVar" target="resultVar" />
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the expression resolves before modeling it as dynamic
Object name = processEngine.getProcessEngineConfiguration()
    .getExpressionManager().createExpression("${outcomeVar}").getValue(execution);
if (name == null) log.warn("targetExpression will resolve to null at runtime");

Try / catch

null

Prevention

When it happens

Trigger: 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().

Common situations: 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.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/1343901b1f77eadc. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/ProcessTaskActivityBehavior.java:239

                                       CaseInstanceEntity caseInstance,
                                       ProcessInstanceService processInstanceService) {

        if (outParameters == null) {
            return;
        }

        for (IOParameter outParameter : outParameters) {

            String variableName = null;
            if (StringUtils.isNotEmpty(outParameter.getTarget())) {
                variableName = outParameter.getTarget();

            } else if (StringUtils.isNotEmpty(outParameter.getTargetExpression())) {
                Object variableNameValue = processInstanceService.resolveExpression(planItemInstance.getReferenceId(), outParameter.getTargetExpression());
                if (variableNameValue != null) {
                    variableName = variableNameValue.toString();
                } else {
                    LOGGER.warn("Out parameter target expression {} did not resolve to a variable name, this is most likely a programmatic error",
                            outParameter.getTargetExpression());
                }

            }

            Object variableValue = null;
            if (StringUtils.isNotEmpty(outParameter.getSourceExpression())) {
                variableValue = processInstanceService.resolveExpression(planItemInstance.getReferenceId(), outParameter.getSourceExpression());

            } else if (StringUtils.isNotEmpty(outParameter.getSource())) {
                variableValue = processInstanceService.getVariable(planItemInstance.getReferenceId(), outParameter.getSource());

            }

            String conversionType = null;
            if (StringUtils.isNotEmpty(outParameter.getTargetType())) {
                conversionType = outParameter.getTargetType();
            } else if (StringUtils.isNotEmpty(outParameter.getSourceType())) {

View on GitHub (pinned to d6d39ce1c6)