Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

run

run(fileToExecute: String, fs: Dictionary<String>, readerInputs: Dictionary<ReaderInput> = {}, inputValues: Dictionary<Any> = {}, configuration: RuntimeExecutionConfiguration = {}): RunResult

Runs the input script under the provided context and executes the script in the current runtime.

Experimental: This function is an experimental feature that is subject to change or removal from future versions of DataWeave.

Parameters

Name Description

fileToExecute

Name of the file to execute.

fs

File system that contains the file to execute.

readerInput

Inputs to read and bind to the execution.

inputValues

Inputs to bind directly to the execution.

configuration

The runtime configuration.

Example

This example shows how run behaves with different inputs.

Source

Output