{"record":{"id":"a86831fe563fe4c0","repo":"flowable/flowable-engine","slug":"skipexpressionenabledvariable-variable-does-not","errorCode":null,"errorMessage":"${skipExpressionEnabledVariable} variable does not resolve to a boolean. ${isSkipExpressionEnabled}","messagePattern":"(.+?) variable does not resolve to a boolean\\. (.+?)","errorType":"exception","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/SkipExpressionUtil.java","lineNumber":37,"sourceCode":"public class SkipExpressionUtil {\n\n    public static boolean isSkipExpressionEnabled(DelegateExecution execution, Expression skipExpression) {\n\n        if (skipExpression == null) {\n            return false;\n        }\n\n        final String skipExpressionEnabledVariable = \"_ACTIVITI_SKIP_EXPRESSION_ENABLED\";\n        Object isSkipExpressionEnabled = execution.getVariable(skipExpressionEnabledVariable);\n\n        if (isSkipExpressionEnabled == null) {\n            return false;\n\n        } else if (isSkipExpressionEnabled instanceof Boolean) {\n            return ((Boolean) isSkipExpressionEnabled).booleanValue();\n\n        } else {\n            throw new ActivitiIllegalArgumentException(skipExpressionEnabledVariable + \" variable does not resolve to a boolean. \" + isSkipExpressionEnabled);\n        }\n    }\n\n    public static boolean shouldSkipFlowElement(DelegateExecution execution, Expression skipExpression) {\n        Object value = skipExpression.getValue(execution);\n\n        if (value instanceof Boolean) {\n            return ((Boolean) value).booleanValue();\n\n        } else {\n            throw new ActivitiIllegalArgumentException(\"Skip expression does not resolve to a boolean: \" + skipExpression.getExpressionText());\n        }\n    }\n}\n","sourceCodeStart":19,"sourceCodeEnd":52,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/SkipExpressionUtil.java#L19-L52","documentation":"Thrown as ActivitiIllegalArgumentException from SkipExpressionUtil.isSkipExpressionEnabled when the variable named by skipExpressionEnabledVariable exists in the execution but does not resolve to a Boolean. The engine uses this variable as the master switch for skip expressions and requires a true/false value.","triggerScenarios":"A DelegateExecution contains a variable whose value is a non-boolean (String, Integer, etc.) under the key stored in skipExpressionEnabledVariable (by default \"_ACTIVITI_SKIP_EXPRESSION_ENABLED\"), and SkipExpressionUtil.isSkipExpressionEnabled is called during execution of a job/activity with a skipExpression.","commonSituations":"Setting the skip-enabled variable via an expression or form field that yields a String \"true\" instead of Boolean true; passing the variable through a REST call where it gets serialized as a string; script tasks writing the variable with quotes; version differences where the variable was previously loosely coerced.","solutions":["Set the variable as a real Boolean: execution.setVariable(\"_ACTIVITI_SKIP_EXPRESSION_ENABLED\", Boolean.TRUE).","If the value comes from a String, convert it before storing: Boolean.parseBoolean(value).","Check the process/form/REST payload that writes the variable and ensure the type is boolean.","Inspect the variable value in the error message — it prints the offending object — and fix its type at the source."],"exampleFix":"// before: string value\nexecution.setVariable(\"_ACTIVITI_SKIP_EXPRESSION_ENABLED\", \"true\");\n\n// after: real boolean\nexecution.setVariable(\"_ACTIVITI_SKIP_EXPRESSION_ENABLED\", Boolean.parseBoolean(\"true\"));","handlingStrategy":"type-guard","validationCode":"Object v = execution.getVariable(\"_ACTIVITI_SKIP_EXPRESSION_ENABLED\");\nif (v != null && !(v instanceof Boolean)) {\n    throw new IllegalStateException(\"Skip-enabled variable must be Boolean, got \" + v.getClass());\n}","typeGuard":"boolean isBooleanVariable(DelegateExecution execution, String name) {\n    Object v = execution.getVariable(name);\n    return v == null || v instanceof Boolean;\n}","tryCatchPattern":"try {\n    runtimeService.setVariable(executionId, \"_ACTIVITI_SKIP_EXPRESSION_ENABLED\", skipEnabled);\n} catch (ActivitiIllegalArgumentException e) {\n    logger.error(\"Skip-enabled variable must be a Boolean, value={}\", skipEnabled, e);\n    throw e;\n}","preventionTips":["Always write the skip-enabled variable as Boolean.TRUE/Boolean.FALSE, never Strings.","Parse string inputs with Boolean.parseBoolean before storing as process variables.","Watch for REST/form payloads that serialize booleans as strings.","Use a constant for the variable name to avoid typos."],"tags":["bpmn","skip-expression","type-mismatch","process-variables"],"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"}