public class ScriptingOperations extends Object
| Constructor and Description |
|---|
ScriptingOperations() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<Object,Void> |
execute(String engine,
String code,
Map<String,Object> parameters,
ExecutionMode executionMode)
Runs a script with provided code, according to the engine and passing parameters.
|
@Throws(value=ScriptingErrorTypeProvider.class) @Execution(value=CPU_INTENSIVE) public org.mule.runtime.extension.api.runtime.operation.Result<Object,Void> execute(@OfValues(value=EnginesValueProvider.class) String engine, @Text String code, @Optional @NullSafe @Content @Expression(value=REQUIRED) Map<String,Object> parameters, @Optional(defaultValue="AUTO") @Expression(value=SUPPORTED) ExecutionMode executionMode)
code - the script source code to be executedengine - name of the scripting engine for running this scriptparameters - variables provided to the script as bindingsexecutionMode - Determines whether the script should be automatically compiled or forced to be interpreted. When set to "AUTO" or not specified, the module analyzes the context to determine the appropriate mode. When set to "INTERPRETED", the module enforces interpretation mode.Copyright © 2023 MuleSoft, Inc.. All rights reserved.