Interface CustomFunctionBuilder
-
- All Known Implementing Classes:
CustomFunctionBuilderImpl
public interface CustomFunctionBuilderFluent builder to create aCustomFunction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CustomFunctionbuild()Returns the custom function to be registered inFeelCustomFunctionProvider.CustomFunctionBuilderenableVarargs()Enable variable argumentsCustomFunctionBuildersetFunction(Function<List<Object>,Object> function)CustomFunctionBuildersetParams(String... params)Define the parameters of the custom function.CustomFunctionBuildersetReturnValue(Object result)Define a custom function that only returns a value and has no further business logic (method body).
-
-
-
Method Detail
-
setParams
CustomFunctionBuilder setParams(String... params)
Define the parameters of the custom function.- Parameters:
params- of the custom function- Returns:
- the builder
-
enableVarargs
CustomFunctionBuilder enableVarargs()
Enable variable arguments- Returns:
- the builder
-
setReturnValue
CustomFunctionBuilder setReturnValue(Object result)
Define a custom function that only returns a value and has no further business logic (method body). It is not possible to use this method together withsetFunction(java.util.function.Function<java.util.List<java.lang.Object>, java.lang.Object>).- Parameters:
result- that should be returned by the custom function- Returns:
- the builder
-
setFunction
CustomFunctionBuilder setFunction(Function<List<Object>,Object> function)
Pass aFunctionwith aListof objects as argument and an object as return value. It is not possible to use this method together withsetReturnValue(java.lang.Object).- Parameters:
function- to be called- Returns:
- the builder
-
build
CustomFunction build()
Returns the custom function to be registered inFeelCustomFunctionProvider.- Returns:
- a custom function
- Throws:
org.camunda.bpm.dmn.feel.impl.FeelException- when bothsetFunction(java.util.function.Function<java.util.List<java.lang.Object>, java.lang.Object>)andsetReturnValue(java.lang.Object)were called
-
-