Limitations of DataWeave in Apex

DataWeave in Apex has these limitations.
  • The DataWeave Java bridge, that is, the ability to bind to static Java methods is disabled. See Introduction to Mule 4. Features that interact with the environment such as the readURL and envVar functions are also disabled. These checks are done at script creation time instead of at runtime.
  • You must specify an encoding for binary input (Apex Blobs) to be coerced to strings: binaryVariable as String {encoding: 'utf8' }".
  • DataWeave is constrained to disallow the loading of additional libraries. Therefore, scripts must be self-contained.
  • DataWeave modules and importing other scripts aren’t supported. For example, import modules::MyMapping as per Using a Mapping File in a DataWeave Script isn’t supported.

    The feature supports built-in modules. See DataWeave Reference.

    Note

  • DataWeave in Apex doesn’t support these content types.
  • Apex classes must be at API version 53.0 or later to access DataWeave integration methods.
  • There’s a maximum of 50 DataWeave scripts per org.
  • The maximum body size of one DataWeave script is 100,000 (one hundred thousand) characters.

XML Entity Expansion isn’t supported, either currently or in the future, as a guard against denial of service attacks.

Note