Class VariableGetOrDefaultExpressionFunction
java.lang.Object
org.flowable.common.engine.impl.el.function.AbstractFlowableVariableExpressionFunction
org.flowable.common.engine.impl.el.function.VariableGetOrDefaultExpressionFunction
- All Implemented Interfaces:
FlowableFunctionDelegate
,FlowableAstFunctionCreator
public class VariableGetOrDefaultExpressionFunction
extends AbstractFlowableVariableExpressionFunction
Returns the value of a variable, or a default if the value is null.
This avoids the
PropertyNotFoundException
that otherwise gets thrown when referencing a variable in JUEL.- Author:
- Joram Barrez
-
Field Summary
Fields inherited from class org.flowable.common.engine.impl.el.function.AbstractFlowableVariableExpressionFunction
functionName, functionNamesOptions, method, variableScopeName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
getOrDefault
(VariableContainer variableContainer, String variableName, Object value) Methods inherited from class org.flowable.common.engine.impl.el.function.AbstractFlowableVariableExpressionFunction
createFunction, createVariableNameNode, findMethod, functionMethod, getFunctionNames, getVariableValue, localName, localNames, prefix, prefixes, valuesAreNumbers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.flowable.common.engine.api.delegate.FlowableFunctionDelegate
functionMethod
-
Constructor Details
-
VariableGetOrDefaultExpressionFunction
public VariableGetOrDefaultExpressionFunction()
-
-
Method Details
-
getOrDefault
public static Object getOrDefault(VariableContainer variableContainer, String variableName, Object value)
-