Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
79 views

I'm using MuleSoft to send data to a Salesforce custom object. My object has a field named Shift_End_Time__c, and its data type is Time. My source system provides this time as a string in UTC format, ...
Kunal Awasthi's user avatar
1 vote
1 answer
108 views

I am working in Mule 4 using DataWeave 2.0 and trying to transform a multipart/form-data payload that contains a CSV file. Here is a simplified example of my input payload (multipart): ----------------...
Sunny85's user avatar
  • 77
0 votes
1 answer
119 views

Using input payload of { "Date": "2025-09-09T18:03:06.830" } I'm trying to get an output of "2025-09-09T18:03:06.830Z" I've tried this DataWeave %dw 2.0 output ...
ndtorre's user avatar
  • 31
3 votes
2 answers
243 views

I will be receiving a .dat file which contains multiple pdf files encoded as base64 string which will be separated by a new line or some character. Initial approach is read -> payload splitBy “\n” -...
veejay's user avatar
  • 115
0 votes
1 answer
52 views

I have some functions written in Scala that I would like to add to Dataweave in Anypoint Studio so that I can use them natively in Transform connectors. Is it possible to extend Dataweave's core like ...
Christopher Macks's user avatar
0 votes
1 answer
91 views

I am using the MuleSoft Transform Message component to initialize variables testIP and testDomain. It works well when the payload is not empty, but throws an exception when the payload is null or ...
stewchicken's user avatar
0 votes
2 answers
53 views

I need to get all elements which has key ending with TXI, to a single array using simple 1 or 2 lines. Tried various ways using mapObject(), However it doesn't work with the nested structure. Also ...
Pramodya Mendis's user avatar
-1 votes
1 answer
76 views

Using Mule 4.5.0, I need to read in a large text file (~1GB-2GB) line by line (/n) and generate individual mule messages of each line. Using dataweave and the foreach scope I was able to stream the ...
William's user avatar
  • 97
2 votes
2 answers
67 views

Using dataweave with import * from dw::core::Strings I have converted a JSON payload into a plain text string. I am able to use the Java functions replaceAll, match, etc. with a regex pattern to find ...
CactusCake's user avatar
  • 1,011
-2 votes
2 answers
82 views

Source Data : Here is the CSV Data (4 Records): EMP_ID,DEPT_ID,OPRT_UNIT_CODE,PROD_CODE,NODE_CODE,ALLOC_PCT 123456,00700,0101,000,00700-0101,5 123456,00700,0101,000,00700-0101-000,5 123456,02150,0101,...
Mahari's user avatar
  • 13
1 vote
1 answer
91 views

I'm trying to access a property in HTTP Request connector URI Params, But it doesn't seem to be working Here's the way I generally access ${property_name} in all the places, but it's not resolving the ...
John's user avatar
  • 1
0 votes
1 answer
51 views

How can I merge the following two lists ids and attributes based on the matching did field and for each matched pair increment the iterid values For example I have two lists below. size of the list ...
John's user avatar
  • 1
1 vote
1 answer
96 views

I'm trying to cleanup a raw data that has embedded \r\n or \n in csv lines.Line terminator is \r\n. trying to translate utf-8 punctuation marks to normal ascii punctuation marks. cleaning up any ...
ramesh.metta's user avatar
0 votes
1 answer
136 views

I have my input as json, where I have to derive the quantity based on one field shippingNode. Mapping: data/availableQuantity/supplyQuantity The conditions are as below If shippingNode is starting ...
MyDream's user avatar
  • 45
-1 votes
1 answer
85 views

I was struggling to get a DWL script going, given the following JSON data from Okta's API. Search for only "signOnMode" JSON array items that equal to "SAML_2_0", and ignore/skip &...
Jordan M's user avatar
1 vote
1 answer
92 views

I need to remove everything thing starting with "[@" and ending with "]" in the given XML. The text that falls in-between these sqaure brackers should also be removed. I tried the ...
Zak01's user avatar
  • 33
0 votes
1 answer
57 views

I need to add namespace and prefix(ns0) to the root tag of an existing XML. I tried doing it with the piece of code below. However the output has removed all the existing attributes that were already ...
Zak01's user avatar
  • 33
0 votes
1 answer
106 views

I have a JSON payload that I need to convert into an XML. However that JSON payload has many fields starting with '@' which are supposed to be the XML attributes. So when I converted those into XML ...
Zak01's user avatar
  • 33
1 vote
1 answer
87 views

The first key should remain as is, and the rest should be added as below output. The slash "/" is required at the end. This is just an example, the DataWeave script needs to be dynamic. ...
Mule-Newbie's user avatar
1 vote
1 answer
213 views

I'm trying to use the DataWeave update operator to either modify or delete a nested node in a JSON payload. The node's path will be passed dynamically and will change, so it can't be hardcoded. The ...
Tony's user avatar
  • 2,774
1 vote
1 answer
112 views

I want to do a selection on an item based on a (yaml) property in Dataweave. I have this code: %dw 2.0 var testWithProperty = p('incoming.var') // incoming.var refers to the value "resultSet&...
Ben's user avatar
  • 772
0 votes
1 answer
77 views

[ "{ "Context" : [ { "PeriodOfServiceId" : "30000020", "PersonName" : "LANA, LANA", "PersonNumber" : "259", &...
Elizabeth Goldy Antony's user avatar
0 votes
1 answer
255 views

I want to modify error.errotType to something else. How can I do that? I do not see any option to update error object in Mule 4. Also why in 'raise-exception', type field can not be set dynamically i....
Vatsal Mehta's user avatar
0 votes
1 answer
101 views

I have an XML where I want to find a particular attribute 'type' shiprefnum under ReferenceNums->Reference and replace the value to 124215133_AB_00010. Input XML: <?xml version='1.0' encoding='...
user12277274's user avatar
1 vote
1 answer
107 views

I am working with MuleSoft DataWeave 2.0 to process an XML payload. I need to extract the second <wd:ID> element where the attribute wd:type equals "Learning_Course_ID". Here is a ...
Rhoda_Mumo's user avatar
0 votes
2 answers
180 views

Date: |2000-03-29| this is what I am trying but getting an error: type LocalDateFormat = LocalDateTime { format: "yyyy-MM-dd'T'HH:mm:ss" } fun myDate(myDateString: DateTime) = ( if(...
robbins's user avatar
  • 33
0 votes
1 answer
111 views

In the example below, When I create variable in Transform, I sometimes use application/java and some times use application/json . It seems that the target system using this variable doesn't care ...
stewchicken's user avatar
0 votes
1 answer
167 views

I have a DataWeave script that is working wonderfully. I'm using it inside of an Apex Class. Again, works great. Here is it: %dw 2.0 input csvData application/csv input fieldMappings application/json ...
caleb's user avatar
  • 141
0 votes
1 answer
91 views

I have a Dataweave script based on an example from Mulesoft https://docs.mulesoft.com/dataweave/latest/dataweave-cookbook-map-based-on-an-external-definition I am trying to map the contents of a CSV ...
caleb's user avatar
  • 141
0 votes
1 answer
243 views

I have a payload in XML format, and I need to convert it to JSON. The XML contains many key-value pairs and also a lot of attributes, and I need those attributes to be included in the JSON as well. &...
Anonim's user avatar
  • 93
0 votes
1 answer
111 views

Am trying to parse an input XML payload and transform and generate a response XML. Here is my input XML <?xml version='1.0' encoding='UTF-8'?> <EmployeesInfo> <EmployeeDetails> ...
boomslaw's user avatar
0 votes
1 answer
106 views

I have defined a DataWeave function that takes a string as input and can handle null input as well. However, when I call it with null input, I encounter a syntax error. Could anyone tell me why? ...
stewchicken's user avatar
0 votes
1 answer
90 views

I need a dataweave function which extract fix string to convert it into ISO Date String format fun convertToISO(dateString: String): String = if (dateString == null) "" ...
stewchicken's user avatar
0 votes
1 answer
94 views

I Have a issue in my code and I dont know how to solved, I explaint the situation, I have two arrays of objects; The Payload we need to do a loop and if it math with an item in the array named ...
Jesus Abraham Felix González's user avatar
0 votes
4 answers
158 views

Given an array shown below array: { "documentToSigner": [ { "documentName": "ESRA For aa aa", "typeCd": "...
veejay's user avatar
  • 115
1 vote
3 answers
104 views

I have a array as shown below which is an output of the filter condition. It has fields like documentItemName1,documentItemName2,documentItemName3 at the min it can have on and max of 3. It's like for ...
veejay's user avatar
  • 115
-1 votes
1 answer
135 views

can anyony help me with what is the expeted input string that would be accepted by the regex in this method? Message = input is a string fun getId(Message) = (Message match /betalning_maltid_\{id:([0-...
John Q. Public's user avatar
0 votes
1 answer
151 views

I need to sort JSON data which can contain array as well as objects sample data : { "results": [ { "empCode": "abcd", "age&...
GettingStarted With123's user avatar
0 votes
1 answer
171 views

I converted an XML snippet to JSON using the writeAttributes=true property. XML: <family surname="Simpsons"> <father age="42">Homer</father> <mother age=&...
Tony's user avatar
  • 2,774
0 votes
0 answers
113 views

My IDE (Anypoint studio ) complains with the flow code and throw error message as below But actually code is working, mvn build is also working. Does anyone have idea to get rid of this annoying error ...
stewchicken's user avatar
1 vote
2 answers
176 views

I need to print a portion of the String variable value to the Mule console using Mule <logger>. I am not sure if it is possible to use substring function within the logger. However, when I tried ...
user25247044's user avatar
0 votes
1 answer
152 views

I try to explain you, I have an Array of Objects: Input: [ { "number": "000001", "price": 14.99, "qty": 18, "line": "3" }, { "...
Jesus Abraham Felix González's user avatar
0 votes
2 answers
87 views

In MuleSoft, convert the amount value into USD format like $3,567.00, but send the list of amount values to the Excel sheet as number so that Excel can calculate the total using the SUM() function I ...
deepuKumar's user avatar
0 votes
0 answers
111 views

In MuleSoft, How to convert excel(mime: application/xlsx) data into byte[] format Please suggest the logic, as Binary {class: “byte[]”} it’s not working for xlsx data
deepuKumar's user avatar
0 votes
1 answer
185 views

Need to remove namespace from XML by keeping everything else as is including the attributes. I tried using replace and update but it does not seem to work. Below is the sample XML where I need to ...
Zak01's user avatar
  • 33
0 votes
1 answer
94 views

Sorting an array is correct, but result is not correct with a nested array. I tried with a simple array, output is correctly sorted. %dw 2.0 output application/json import indexOf from dw::core::...
Ben's user avatar
  • 3
0 votes
1 answer
388 views

I am trying to convert a date in string format in UTC timezone into Australia/Sydney timezone. It seems to work for one value, but not the other, so I am a little confused %dw 2.0 import * from dw::...
boomslaw's user avatar
0 votes
0 answers
50 views

I have an app which is failing with out of memory issue and created a hprof file during load. Heap Dump Histogram I have tried to analyse the hprof using jhat and got below histogram view from it. I ...
Prasad Pokala's user avatar
-2 votes
2 answers
134 views

I have the following input JSON { "listPrice": "1245678.98" } I need to format this to the following format { "listPrice": "1 245 678,99" } Currently i'm ...
SH4444KO's user avatar
  • 191
-2 votes
2 answers
99 views

I am not able to use the below mentioned password from property file in mule4. I am trying like ${db.password} and database connectivity is failing but hardcoded value is working fine. Is it because ...
Devendra's user avatar
  • 225

1
2 3 4 5
40