Questions tagged [mule4]

Version 4 of Mule, a lightweight enterprise service bus (ESB) and integration framework provided by MuleSoft

Mule is a lightweight enterprise service bus (ESB) and integration framework provided by MuleSoft. According to the documentation, Version 4 aims at simplifying the expression language and reducing management complexity. This way, it shall be possible to deliver applications faster than in earlier versions of the product.

1166 questions
4
votes
1 answer

How to compare and merge two JSON objects using Dataweave 2.0

I have a requirement where I need to compare 2 input json objects - obj1 and obj2. Both inputs can have same keys as well as additional key. In case of same keys in both inputs, the values should be fetched from obj2. In case a key is not available…
user7194270
  • 117
  • 2
  • 16
3
votes
1 answer

Why the "default" keyword acts like "try + catch / orElse" in some cases

I recently noticed an interesting behavior from the default keyword. It acts like try-catch or try-orElse in some situation. For example, if you try to execute the following script: %dw 2.0 output application/json --- ("ABC" as Number) default…
Harshank Bansal
  • 2,798
  • 2
  • 7
  • 22
3
votes
4 answers

Getting error "Unsupported class file major version 61" trying to start Mule 4.4 in Windows

When double-clicking on mule.bat I get the following error message. Error message: Caught: BUG! exception in phase 'semantic analysis' in source unit…
3
votes
3 answers

Error trying to remove a namespace from an XML in Mule 4

I see the error like "Trying to write END_DOCUMENT when document has no root" while I replace all the payload env and xmlns with "". It throws error : Message : "Trying to write END_DOCUMENT when document has no root (ie. trying to…
codey_08
  • 249
  • 1
  • 11
3
votes
3 answers

how to divide a String into defined parts using Dataweave in Mulesoft

I have a JSON object as below { "a" : "ABCDEFGHIJKL", "b" : "B" } here each field contains a string (all are of different sizes), I need to divide each field value (i.e string) by 4 and then make it a separate JSON object array and assigned it to…
Anurag Sharma
  • 780
  • 7
  • 31
3
votes
1 answer

How to assign value to a local variable in function in DataWeave

Hi i am getting an error saying Invalid input ' ', expected '}' for the do block. I am trying to create a concatenated String output fun getStreetAddress(address1 ,address2) = do { var addr1 = address1 var addr2 = address2 var finalAddress =…
VKP
  • 589
  • 1
  • 8
  • 34
3
votes
1 answer

Mule 4 : Dataweave 2.0 : is there any way we can have a filter condition in groupBy method that works similar to SQL GroupBY and Having?

Scenario : Given an input as below sampleArray , I will like to group all the students having a specific teacher. In DataWeave we have a method groupBy that allows us to group arrays specifying a string key. But here since…
Bibek Kr. Bazaz
  • 505
  • 10
  • 34
3
votes
1 answer

Anypoint Studio -- How to check call heirarchy of a flow

How can I check the call heirarchy of a flow ? How many flows are calling that particular flow ? for eg: if A-> B and C-> B so when I check the call heirarchy of flow B I should get Both A and C. Can we achieve this in anypoint studio ?
HMT
  • 2,093
  • 1
  • 19
  • 51
3
votes
1 answer

How to convert ManagedCursorStreamProvider to JSOn object in mule 4

How to convert ManagedCursorStreamProvider to Json object in mule. I have written a java method which takes the Json Object as input Request Payload: { a: "one", b : "two"} Invoke static arg0 : payload Java Function called using invoke…
HMT
  • 2,093
  • 1
  • 19
  • 51
3
votes
3 answers

Parallel For-Each vs Scatter Gather in mule

I have multiple records : { "item_id":1", key1: "data1" } { item_id:2 key1: "data1" } { item_id:2 key1: "data1" } { item_id:1 key1: "data1" } I do not want to process them sequentially.There can be more than 200 records. Should I process…
HMT
  • 2,093
  • 1
  • 19
  • 51
2
votes
1 answer

raw is not working incase of retrieving the value form a variable in dataweave 2 mule

I'm just trying to convert the numeric values to strings without losing their decimal values, including zeros. This can be done using the raw operator in DataWeave 2.0. In below I converted a 123.0 numeric value to a "123.0" string value. But when…
Integraty_dev
  • 500
  • 3
  • 18
2
votes
0 answers

Mule 4 debug how to maintain history of debug statements in studio

In Mule 4 anypoint studio when I am debugging an application , many a times I need to view the payload in json format , so while in debug view I go here : Evaluate Dataweave expression Here everytime I have to manually paste the below dataweave: %dw…
boomslaw
  • 31
  • 4
2
votes
1 answer

Mule Maven Plugin 3.8.0 not working as expected

When I am using mule-maven-plugin version 3.5.4 I am able to successfully build and run a project in anypoint studio but for the same project when I update the mule-maven-plugin version to 3.8.0 , it is raised an error, ${error.customerror.type} is…
Karthik
  • 2,181
  • 4
  • 10
  • 28
2
votes
1 answer

Mule 4 attributes.maskedRequestPath expected behaviour

The documentation says: Path computed from masking the listenerPath and taking the difference. Note that this is only calculated when the null otherwise. It seems this sentence is not complete so I am unsure of the expected value of…
Pierre
  • 51
  • 8
2
votes
1 answer

Unzip files in Mule 4

I have a requirement to unzip file. Currently this is done in Java code in Mule 3.x, but need to unzip file in Mule 4, how we can achieve this in Mule 4? Tried to use same Mule 3 Java code in Mule 4 but some of the methods/functions are not…
1
2 3
77 78