---
schema_version: "1"
id: ea6d33440f27240f12af1f667321e3806437cc8b4f2f54059859103d5a23e48b
title: Runtime (dw::Runtime)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.6/dw-runtime.md
canonical_url: https://docs.mulesoft.com/dataweave/2.6/dw-runtime
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 500b05951e443ded0192253b001d0e3adff264f202959283c69a0f2db263dc5a
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
---
product: DataWeave
version: 2.6
---

# Runtime (dw::Runtime)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

This module contains functions for interacting with the DataWeave runtime, which executes the
language.

To use this module, you must import it to your DataWeave code, for example, by adding the line
`import * from dw::Runtime` to the header of your DataWeave script.

## Functions

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-dataformatsdescriptor">dataFormatsDescriptor</a></p></td><td><p>Returns an array of all <code>DataFormatDescriptor</code> values that are installed in the current instance of DataWeave.</p><p><em>Experimental:</em> This function is an experimental feature that is subject to change or removal from future versions.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-eval">eval</a></p></td><td><p>Evaluates a script with the specified context and returns the result of that evaluation.</p><p><em>Experimental:</em> This function is an experimental feature that is subject to change or removal from future versions.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-evalurl">evalUrl</a></p></td><td><p>Evaluates the script at the specified URL.</p><p><em>Experimental:</em> This function is an experimental feature that is subject to change or removal from future versions.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-fail">fail</a></p></td><td><p>Throws an exception with the specified message.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-failif">failIf</a></p></td><td><p>Produces an error with the specified message if the expression in the evaluator returns <code>true</code>. Otherwise, the function returns the value.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-location">location</a></p></td><td><p>Returns the location of a given value, or <code>null</code> if the location can’t be traced back to a DataWeave file.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-locationstring">locationString</a></p></td><td><p>Returns the location string of a given value.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-orelse">orElse</a></p></td><td><p>Returns the result of the <code>orElse</code> argument if the <code>previous</code> argument to <code>try</code> fails. Otherwise, the function returns the value of the <code>previous</code> argument.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-orelsetry">orElseTry</a></p></td><td><p>Function to use with <code>try</code> to chain multiple <code>try</code> requests.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-prop">prop</a></p></td><td><p>Returns the value of the property with the specified name or <code>null</code> if the property is not defined.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-props">props</a></p></td><td><p>Returns all the properties configured for the DataWeave runtime, which executes the language.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-run">run</a></p></td><td><p>Runs the input script under the provided context and executes the script in the current runtime.</p><p><em>Experimental:</em> This function is an experimental feature that is subject to change or removal from future versions.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-runurl">runUrl</a></p></td><td><p>Runs the script at the specified URL.</p><p><em>Experimental:</em> This function is an experimental feature that is subject to change or removal from future versions.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-try">try</a></p></td><td><p>Evaluates the delegate function and returns an object with <code>success: true</code> and <code>result</code> if the delegate function succeeds, or an object with <code>success: false</code> and <code>error</code> if the delegate function throws an exception.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-version">version</a></p></td><td><p>Returns the DataWeave version that is currently running.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-runtime-functions-wait">wait</a></p></td><td><p>Stops the execution for the specified timeout period (in milliseconds).</p></td></tr></tbody></table>

## Types

- [Runtime Types](https://docs.mulesoft.com/dataweave/2.6/dw-runtime-types)
