Class ScriptEngineRequest.Builder
java.lang.Object
org.flowable.common.engine.impl.scripting.ScriptEngineRequest.Builder
- Enclosing class:
ScriptEngineRequest
Builder for
ScriptEngineRequest.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VariableContainerprotected Stringprotected VariableContainerprotected Stringprotected booleanprotected ScriptTraceEnhancer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalResolver(Resolver additionalResolver) Adds additional resolver to the end of the list of resolvers.build()inputVariableContainer(VariableContainer variableContainer) The variable container that can be used to provide different dynamic variables for the script context.The script language for the script.scopeContainer(VariableContainer variableContainer) The scope variable container in which the script is being executed in.The script content for the given language.Automatically store variables from script evaluation context to the given variable container.traceEnhancer(ScriptTraceEnhancer enhancer) Configure anScriptTraceEnhancerwhich is called, when a ScriptTrace is created.
-
Field Details
-
language
-
script
-
scopeContainer
-
inputVariableContainer
-
additionalResolvers
-
storeScriptVariables
protected boolean storeScriptVariables -
traceEnhancer
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
script
The script content for the given language. -
language
The script language for the script. -
scopeContainer
The scope variable container in which the script is being executed in. Used to createResolvers for the script context. The variable container will be passed toResolverFactoryto create specialized Resolvers for the specific VariableContainer implementations.- See Also:
-
inputVariableContainer
The variable container that can be used to provide different dynamic variables for the script context. If not provided then thescopeContainerwill be used.e.g. if we have the following script
var sum = a + b. WheninputVariableContaineris defined the variablesaandbwill come from it. Otherwise, they will come from the variable container defined inscopeContainer(VariableContainer).The variable container will be passed to
ResolverFactoryto create specialized Resolvers for the specific VariableContainer implementations. -
storeScriptVariables
Automatically store variables from script evaluation context to the given variable container. Not recommended, to avoid variableContainer pollution. Better to put the script evaluation result object to the variableContainer, if required. -
additionalResolver
Adds additional resolver to the end of the list of resolvers. The order of the resolvers matter, as the first resolver returning containsKey = true will be used to resolve a variable during script execution. The resolvers take precedence over the resolvers created for thescopeContainer. Useful to provide context objects to the scripting environment. -
traceEnhancer
Configure anScriptTraceEnhancerwhich is called, when a ScriptTrace is created. Allows to provide additional context information for a script trace by allow to "tag" the script invocation with additional meta information. Script traces are produced in case of errors and/or when aScriptTraceListeneris configured. -
build
-