Contact Us 1-800-596-4880

evaluateCompatibilityFlag

evaluateCompatibilityFlag(flag: String): Boolean

Returns the value of the compatibility flag with the specified name.

Introduced in DataWeave version 2.5.0.

Parameters

Name Type Description

flag

String

The name of the compatibility flag to evaluate.

Example

This example gets the com.mulesoft.dw.xml_reader.honourMixedContentStructure compatibility flag value in the current DataWeave version.

Source

%dw 2.0
output application/json
---
{
  "com.mulesoft.dw.xml_reader.honourMixedContentStructure": evaluateCompatibilityFlag("com.mulesoft.dw.xml_reader.honourMixedContentStructure")
}

Output

{
  "com.mulesoft.dw.xml_reader.honourMixedContentStructure": true
}