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

# Runtime Types (dw::Runtime)

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

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Type</th><th>Definition</th><th>Description</th></tr></thead><tbody><tr><td><p>DataFormatDescriptor</p></td><td><div><div><p><code>type DataFormatDescriptor = { name: String, binary: Boolean, defaultEncoding?: String, extensions: Array&lt;String&gt;, defaultMimeType: String, acceptedMimeTypes: Array&lt;String&gt;, readerProperties: Array&lt;DataFormatProperty&gt;, writerProperties: Array&lt;DataFormatProperty&gt; }</code></p></div></div></td><td><div><div><p>Description of a <code>DataFormat</code> that provides all metadata information.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>DataFormatProperty</p></td><td><div><div><p><code>type DataFormatProperty = { name: String, optional: Boolean, defaultValue?: Any, description: String, possibleValues: Array&lt;Any&gt; }</code></p></div></div></td><td><div><div><p>Type that describes a data format property. The fields include a <code>name</code>, <code>description</code>, array of possible values (<code>possibleValues</code>), an optional default value (<code>defaultValue</code>), and an <code>optional</code> flag that indicates whether the property is required or not.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>EvalSuccess</p></td><td><div><div><p><code>type EvalSuccess = { success: true, value: Any, logs: Array&lt;LogEntry&gt; }</code></p></div></div></td><td><div><div><p>Data type of the data that returns when an <code>eval</code> function executes successfully.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>ExecutionFailure</p></td><td><div><div><p><code>type ExecutionFailure = { success: false, message: String, kind: String, stack?: Array&lt;String&gt;, location: Location, logs: Array&lt;LogEntry&gt; }</code></p></div></div></td><td><div><div><p>Data type of the data that returns when a <code>run</code> or <code>eval</code> function fails.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>Location</p></td><td><div><div><p><code>type Location = { start?: Position, end?: Position, locationString: String, text?: String, sourceIdentifier?: String }</code></p></div></div></td><td><div><div><p>Type that represents the location of an expression in a DataWeave file.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>LogEntry</p></td><td><div><div><p><code>type LogEntry = { level: LogLevel, timestamp: String, message: String }</code></p></div></div></td><td><div><div><p>Type for a log entry, which consists of a <code>level</code> for a <code>LogLevel</code> value, a <code>timestamp</code>, and <code>message</code>.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>LogLevel</p></td><td><div><div><p><code>type LogLevel = "INFO" | "ERROR" | "WARN"</code></p></div></div></td><td><div><div><p>Identifies the different kinds of log levels (<code>INFO</code>, <code>ERROR</code>, or <code>WARN</code>).</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>LoggerService</p></td><td><div><div><p><code>type LoggerService = { initialize?: () -&gt; Object, log: (level: LogLevel, msg: String, context: Object) -&gt; Any, shutdown?: () -&gt; Boolean }</code></p></div></div></td><td><div><div><p>Service that handles all logging:</p></div><div><ul><li><p><code>initialize</code>: Function called when the execution starts. DataWeave sends the result to every <code>log</code> call through the <code>context</code> parameter, so that, for example, a logging header can be sent at initialization and recovered in each log.</p></li><li><p><code>log</code>: Function that is called on every log message.</p></li><li><p><code>shutdown</code>: Function called when the execution completes, which is a common time to flush any buffer or to log out gracefully.</p></li></ul></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>MimeType</p></td><td><div><div><p><code>type MimeType = String</code></p></div></div></td><td><div><div><p>A String representation of a MIME type.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>Position</p></td><td><div><div><p><code>type Position = { index: Number, line: Number, column: Number }</code></p></div></div></td><td><div><div><p>Type that represents a position in a file by its index and its line and column.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>ReaderInput</p></td><td><div><div><p><code>type ReaderInput = { value: Binary, encoding?: String, properties?: Dictionary&lt;SimpleType&gt;, mimeType: MimeType }</code></p></div></div></td><td><div><div><p>Input to the DataWeave reader created for the specified MIME type, which includes the Binary input and MIME type, as well as optional encoding and properties values.</p></div><div><ul><li><p><code>value</code>: The input, in Binary format.</p></li><li><p><code>encoding</code>: The encoding for the reader to use.</p></li><li><p><code>properties</code>: The reader properties used to parse the input.</p></li><li><p><code>mimeType</code>: The MIME type of the input.</p></li></ul></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>RunSuccess</p></td><td><div><div><p><code>type RunSuccess = { success: true, value: Binary, mimeType: MimeType, encoding?: String, logs: Array&lt;LogEntry&gt; }</code></p></div></div></td><td><div><div><p>Data type of the data that returns when a <code>run</code> function executes successfully.</p></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>RuntimeExecutionConfiguration</p></td><td><div><div><p><code>type RuntimeExecutionConfiguration = { timeOut?: Number, outputMimeType?: MimeType, writerProperties?: Dictionary&lt;SimpleType&gt;, onException?: "HANDLE" | "FAIL", securityManager?: SecurityManager, loggerService?: LoggerService, maxStackSize?: Number, onUnhandledTimeout?: (threadName: String, javaStackTrace: String, code: String) -&gt; Any }</code></p></div></div></td><td><div><div><p>Configuration of the runtime execution that has advanced parameters.</p></div><div><ul><li><p><code>timeOut</code>: Maximum amount of time the DataWeave script takes before timing out.</p></li><li><p><code>outputMimeType</code>: Default output MIME type if not specified in the DataWeave script.</p></li><li><p><code>writerProperties</code>: Writer properties to use with the specified the <code>outputMimeType</code> property.</p></li><li><p><code>onException</code> Specifies the behavior that occurs when the execution fails:</p><div><ul><li><p><code>HANDLE</code> (default value) returns <code>ExecutionFailure</code>.</p></li><li><p><code>FAIL</code> propagates an exception.</p></li></ul></div></li><li><p><code>securityManager</code>: Identifies the <code>SecurityManager</code> to use in this execution. This security manager is composed by the current <code>SecurityManager</code>.</p></li><li><p><code>loggerService</code>: The <code>LoggerService</code> to use in this execution.</p></li><li><p><code>maxStackSize</code>: The maximum stack size.</p></li><li><p><code>onUnhandledTimeout</code>: Callback that is called when the watchdog was not able to stop the execution after a timeout, which is useful for logging or reporting the problem. The callback is called with the following:</p><div><ul><li><p><code>threadName</code>: Name of the thread that hanged.</p></li><li><p><code>javaStackTrace</code>: Java stack trace where the hang occurred.</p></li><li><p><code>code</code>: The DataWeave code that caused the hang.</p></li></ul></div></li></ul></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>SecurityManager</p></td><td><div><div><p><code>type SecurityManager = (grant: String, args: Array&lt;Any&gt;) -&gt; Boolean</code></p></div></div></td><td><div><div><p>Function that is called when a privilege must be granted to the current execution.</p></div><div><ul><li><p><code>grant</code> is the name of the privilege, such as <code>Resource</code>.</p></li><li><p><code>args</code> provides a list of parameters that the function requesting the privilege calls.</p></li></ul></div><div><p><em>Experimental:</em> This type is an experimental feature that is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>TryResult</p></td><td><div><div><p><code>type TryResult = { success: Boolean, result?: T, error?: { kind: String, message: String, stack?: Array&lt;String&gt;, stackTrace?: String, location?: String } }</code></p></div></div></td><td><div><div><p>Object with a result or error message. If <code>success</code> is <code>false</code>, data type provides the <code>error</code>. If <code>true</code>, the data type provides the <code>result</code>.</p></div><div><p>Starting in Mule 4.4.0, if the stack is not present, the <code>stackTrace</code> field is available with the native Java stack trace.</p></div></div></td></tr></tbody></table>
