Questions tagged [mulesoft]

This tag is not clearly aligned with a specific MuleSoft product. If the question is related to the Mule ESB or Mule Runtime product please use the mule-esb tag instead.

MuleSoft is a company name, not a product.

MuleSoft was acquired by Salesforce in 2018.

MuleSoft produces the Anypoint Platform, which consists of:

  • Anypoint Exchange
  • Anypoint Security
  • Anypoint Analytics
  • Anypoint Studio
  • Mule runtime engine
  • etc.
1619 questions
2
votes
1 answer

Auth issue while using IBM MQ using Mulesoft (Mule 4)

I am trying to create a poc application to use the IBM Mq connector in mule 4. I have created a queue manager on IBM Cloud and have the necessary details for connection. I have also created an application for which I have a username and an…
param trivedi
  • 161
  • 1
  • 2
  • 10
2
votes
2 answers

Transformation of JSON data in mule 4

I have a requirement wherein I have to convert JSON data from one format to other. I have to fetch corresponding values of JSON array and make them a key value pair. Below are the required details: Input: "Headers": { "Header": [ { …
Manvitha
  • 21
  • 3
2
votes
2 answers

how to groupBy and map at same transform on dataweave 2?

I have this dataweave 1.0 script that works well: %dw 1.0 %output application/java --- flowVars.worklogs groupBy $.author.accountId map { accountId: $.author.accountId[0], displayName: $.author.displayName[0], timeSpentMinutesMonth: (sum…
mhery
  • 2,097
  • 4
  • 26
  • 35
2
votes
2 answers

What are the uses of $ in dataweave?

I know the typical use case for $ and $$. But, I took a Dataweave course and it was used for something else and I think for this use case it was required for it to be enclosed in parens, i.e. ($). It flattend out the entire object (or something…
Dale
  • 1,289
  • 3
  • 16
  • 36
2
votes
1 answer

Extract field from array using DW 1.0 function

I have a session variable called varIP1 which has a value like below: (It's mime type is application/java) {abc={FedId=abc, Id=01FcLA, type=User, Profile={Id=02EmQA, type=Profile, Name=Analyst}}} I am interested in extracting the first Id (01FcLA)…
2
votes
2 answers

Renaming and Deleting attributes in same array using dataweave

My sample input payload is given below: { "entities": [ { "Id": "ab5fdd89e123", "target": { "Data": { "attributes": { "Name": [], "Address": [ { "value": { "AddType": [{"value":…
Triumph Spitfire
  • 663
  • 15
  • 38
2
votes
2 answers

System API in mulesoft

I have a requirement to persist some data in a table (single table). The data is coming from UI. Do i need to write just the system API and persist the data OR i need to write process and system API both? I don't see a use of process API in this…
Sanjay
  • 165
  • 1
  • 13
2
votes
1 answer

Mule 4/DW 2.0: Iterate array inside objects of arrays

Here is the sample input JSON: * [ { "animation_production_studios": [], "audio": [ "English", "Japanese" ], "videos": [ { "DASH": true, "aips": [ 400, 824, 1191 …
Mule4NY
  • 23
  • 1
  • 4
2
votes
2 answers

Where to exactly use parenthesis "()" in data weave language

I have a code like this {name: 'Data Weave'} mapObject {(upper $$ ) : $} which dynamically takes map object and upper cases key. below is the output { "NAME": "Data Weave" } When I remove parenthesis that are enclosed to "upper" keyword.…
kushma gonna
  • 236
  • 3
  • 19
2
votes
1 answer

In Dataweave 2 is there a (simple) way to convert String fields in a payload to Numbers (if numbers) and Booleans (if booleans)

My biggest obstacle is that I don't know what the input payload looks like. But I need to convert any numerical Strings to numbers and "true" / "false" to true / false. Do I need to recursively traverse the entire object / arrays of objects and…
Dale
  • 1,289
  • 3
  • 16
  • 36
2
votes
1 answer

In Mulesoft Dataweave 2.0 is there a way to test if an input string is XML or JSON format?

I have a String input to my API. It can be either XML or JSON and I need to use the Read function on it to parse it into JSON. What is the best way in MuleSoft 4 or Dataweave 2 to determine what format the String is in? Maybe I could write a…
Dale
  • 1,289
  • 3
  • 16
  • 36
2
votes
1 answer

How to represent this response using Dataweave?

I have a HTTP requester in my flow which calls AmericanFlightsAPI, its original GET response is like this: [{ "ID": 1, "code": "ER38sd", "price": 400.00, "departureDate": "2016/03/20", "origin": "MUA", "destination": "SFO", "emptySeats": 0, "plane":…
2
votes
2 answers

Filter Payload with Dataweave for a Set Variable component

For the Mulesoft 4.2 Set Variable component, I want to assign a simple String value pulled from a single specific record from an incoming JSON payload. In my case, taking just the value from the 'country' field from below example: [ { …
wmjohnson
  • 61
  • 5
2
votes
1 answer

I cannot get my head around XSLT 1.0 Muenchian grouping

I'm basically just trying to group the DCLDET segments by the container ID, so i can create an additional tag that would be I've read up on the Muenchian grouping but nothing I do…
Dorbs
  • 173
  • 3
  • 15
2
votes
2 answers

How to get read a JSON string from a file in Mule 4

I'm trying to create an MUnit test that mocks an HTTP request by setting the payload to a JSON object that I have saved in a file. In Mule 3 I would have just done getResource('fileName.json').asString() and that worked just fine. In Mule 4 though,…
Drew Ingram
  • 75
  • 1
  • 9