Articles

Mulesoft DataWeave is a simple powerful tool to transform data inside a flow. Numerous core operators and functions are already present to perform various operations such as capitalize, camelize, upper, and lower.

For string operations, there are no core functions present to resolve a wildcard. I hope the DataWeave(DWL 1.0) function below helps you to perform a requirement where you want to resolve a wildcard using a set of parameters.

Source de l’article sur DZONE

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

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