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
-1
votes
1 answer

Why can't I reach and test a mule flow?

I have to work with someone else's code. I downloaded the files and imported the project in Anypoint Studio. Set all the environment variables and updated the code from 4.2.2 runtime to 4.3.0. Updated all the dependencies and deployed it…
Nadeem
  • 77
  • 1
  • 12
-1
votes
1 answer

Reading an attribute based on a condition using dataweave 2.0 from JSON array

Im trying to read an array of json payload and based on one attribute i like to pick elements. That is, I get array of employee data, based on termination date, i need to get who left the company. Sample payload; { "Employees": { "Employee":…
Ratha
  • 9,434
  • 17
  • 85
  • 163
-1
votes
1 answer

Array in payload is string, need to coerce to array type (DataWeave)

I have a payload I'm receiving from debezium/kafka as "reasons": "[7,10,9]" with the array as a string. I need to filter the array to extract when the item is 10 or 11. Since the array is actually a string in the payload I need to coerce it to an…
Matt P
  • 147
  • 1
  • 6
-1
votes
1 answer

Update a Nested JSON object in MuleSoft DataWeave

Do I have a JSON object that looks like: {"application":{"desiredState":"STOPPED"}} I need to create this object at runtime in DataWeave based on the value of desiredState passed at runtime which could be STOPPED or STARTED. How can I do that in…
-1
votes
1 answer

Mulesoft Anypoint Studio will not let me connect to SQL Server database

I continue to get a error saying: Error trying to load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver : Cannot load class 'com.microsoft.sqlserver.jdbc.SQLServerDriver': Class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' has no package…
aquile hollins
  • 161
  • 1
  • 8
-1
votes
1 answer

Rename duplicate keys in objects by adding an incremental integer postfix

How can I map an array of objects with the same keys to subsequent keys with an incrementing integer as its postfix? Input: [ { "test1": {}, "test1": {} }, { "test2": {}, "test2": {} } ] The above…
SP-
  • 37
  • 6
-1
votes
1 answer

How to generate Global Error Handler Plugin in Mule 4

Mulesoft redesigned the whole error handling mechanism and components in Mule 4 (some key difference here). In Mule 3, there was a simple way to reuse a flow across multiple applications by putting into a separate mule-application and package that…
Jason
  • 1
-1
votes
1 answer

SFTP On New or Update throws error Pipe close

I'm using the "On New or Update" source of the Mule 4 SFTP Connector, to process files from an SFTP server directory. The process works fine, however while reading the last file the SFTP connector throws an error as shown below and the file remains…
james11
  • 55
  • 6
-1
votes
1 answer

how to append data after transform in dataweave

i have a array payload which contains one item and one object . i need to transform the object data then append those one item. i can use below code to transform the object which name is attributes , but how to append that single item like below…
maomifadacai
  • 357
  • 2
  • 4
  • 17
-1
votes
1 answer

Multiple conditions in the Choiceset

I am trying to check multiple fields on the Choiceset using the Logical AND OR but it is throwing error.Below is the expression I tried not isEmpty(vars.quoteLineItemId) AND (not isEmpty(payload.PhaseLevelItemNumber) OR not…
trx
  • 2,077
  • 9
  • 48
  • 97
-1
votes
3 answers

Check a field value in a array

I have a json which has a array structure like below { "Opportunity": { "Contacts": { "QuotePreparedBy": "Ben Romoli", "Contact": { "FirstName": "abc", "MiddleName": null, "LastName": "def", "Email":…
trx
  • 2,077
  • 9
  • 48
  • 97
-1
votes
1 answer

Is there any function that is used to decrease the date by year when the key has null value

FOllowing is the input that i have [{ "date": " " }, { "date": "2022-01-21" },{ "date": " " },{ "date": " " },{ "date": " " }] And the required output is as follows [ { "Date": "2022-01-21" }, { "Date": "2021-01-21" }, { "Date":…
Nidhi
  • 1
-1
votes
2 answers

Getting sum value in Dataweave

I need to get the total price of the order in Dataweave. P-001 Samsung 40Inch TV Samsung…
-1
votes
2 answers

Appending array elements in a JSON

Can anyone guide me on how to append the values of inside a json array element in dataweave 2.0. InputJSON: { "0": [ { "text": "Line0-1" }, { "text": "Line0-2" } ], "1": [ …
Mythri
  • 21
  • 8
-1
votes
2 answers

Compare fields in two arrays and replace values if certain condition matched

I need to compare two arrays and replace values if id field is matched between these arrays. Below are the two sample arrays: array1 = [ { "Id": "test1", "Date": "2021-11-05T12:53:00.000Z", "name": "data" }, …
Zak01
  • 7
  • 3