Articles

DataWeave is a programming language designed for transforming data. It is the primary language of MuleSoft for data transformation and an expression language for components and connectors configuration.

Mulesoft released Dataweave 2.4.0 for Mule Version 4.4. The 2.4.0 version of DataWeave introduced many new features. In this post, we will see one of the newly introduced DataWeave modules.

Source de l’article sur DZONE

Hello Muleys,

You might have quite often encountered a situation where you need to have dynamic « keys » in a key-value pair.

Source de l’article sur DZONE

This article will help you practice your Dataweave skills in Mulesoft. Here we have to convert the input to a specific type of output. Let’s get started.

Input:

Source de l’article sur DZONE

Hey Guys

These are below 10 videos that help you to learn MuleSoft Development Hands-on!

Source de l’article sur DZONE

Implement a Counter in Dataweave

These days, I see quite a few posts that require using Counter in DataWeave. The problem faced is that users require a Sequence Number that is consistent throughout the different sections of data. Consider the below JSON:

JSON

xxxxxxxxxx
1

17

 

1

[{

2

"Item" : "ItemXYZ",

3

  "SequenceNo" : 1,

4

  "Parts": [

5

{ "Part" : "A1", "SequenceNo" : 2 }, { "Part" : "B1", "SequenceNo" : 3 },

6

{ "Part" : "A2", "SequenceNo" : 4 }, { "Part" : "B2", "SequenceNo" : 5 }

7

 ]

8

},

9

 {

10

"Item" : "ItemRTY",

11

  "SequenceNo" : 6,

12

  "Parts": [

13

{ "Part" : "A1", "SequenceNo" : 7 }, { "Part" : "B1", "SequenceNo" : 8 },

14

{ "Part" : "A2", "SequenceNo" : 9 }, { "Part" : "B2", "SequenceNo" : 10 }

15

 ]

16

}

17

]

Source de l’article sur DZONE

In this article, I will explain how to create a global function that can be access or reuse by other Transform Message Component within a Mule Application.

First, We need to create a Dataweave File (.dwl) and save it in src/main/resources/modules/. Now,we can define our global custom functions here by using the fun directive and global variable by using var directive. Also note thatthis dwl file should not contain an output directory, body expression, or the separator (—) between header and body sections.

Source de l’article sur DZONE