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

# 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.11/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.11/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.11/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.11/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.11/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.11/dw-runtime-functions-finddataformatdescriptorbymime">findDataFormatDescriptorByMime</a></p></td><td><p>Returns the <code>DataFormatDescriptor</code> based on the <code>dw::module::Mime::MimeType</code> specified or <code>null</code> if there is no <code>DataFormatDescriptor</code> for the given <code>MimeType</code>.</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.11/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.11/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.11/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.11/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.11/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.11/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.11/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.11/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.11/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.11/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.11/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.11/dw-runtime-types)
