Custom Dataweave Function Using Custom Module In addition to using the built-in DataWeave function you can also create and use custom modules and mapping files. You write modules and mapping files in a DataWeave Language (.dwl) file and import into your Mule app through DataWeave scripts in Mule components. Both modules and mapping files…
Read MoreFilter In Dataweave Filter in dataweave used to return the matching values as per the expression applied. I will use the below input and filter the employee on as per there salary and age Input: Dataweave Expression: Output:
Read MoreOrderBy By using OrderBy Dataweave function you Reorders the elements of an input using criteria that acts on selected elements of that input. In this tutorial I will use the dataweave OrderBy function to sort the Employee as per the employee age Input Dataweave Expression Result You can see the result in ascending order…
Read MoreConvert String To Array In Dataweave 2.0 To convert string to array you can use SplitBy function of dataweave 2.0 Example 1: Input Hello World Dataweave 2.0 Expression Output Example 2: Input a.b.c.d Dataweave 2.0 Expression Output
Read MoreConvert Array To String In Dataweave 2.0 You can use joinBy Dataweave 2.0 function to convert array to string Example Input: [1,2,3,4,5] Dataweave Expression: Result:
Read MoreRead Properties In Mule 4 You can use p function of dataweave to retrieve the value of the properties defined in properties file which can be secure or unsecured. Let’s see how we can Read Properties In Mule 4 Example Sample.properties SecureSample.properties Dataweave code Result: More on add secure properties in mule application – Adding…
Read Moreperform null check in Dataweave isEmpty is a dataweave core function that can be used to perform null check In Mule 4. It works on Array,String and Object and gives the result accordingly Examples: Result Examples: Result isEmpty(object) it will return true if the object is empty else false Example: Result true
Read MoreMap function in Dataweave Map function in Dataweave is used to iterate over array and output the result in to an array Here is the below Example from which we want to extract the First name and Last name and append both string by space Input: We can write the below dataweave code to…
Read MoreInvoke Custom Java Class using Dataweave To Invoke Custom Java Class Using Dataweave, Let’s create a project in Anypoint studio. Create Java Class in Anypoint studio Set the variable value Drag and drop Transform message and write code to invoke java class in Dataweave Dataweave Deploy the project and test …
Read More