8,098 questions
0
votes
1
answer
52
views
Mulesoft batch processing takes so long
I have a flow that uses a batch process to synchronize data into two target systems after receiving data from a source.
The batch contains two steps, and each step is encapsulated inside a try scope ...
1
vote
1
answer
108
views
How to extract and clean JSON payload inside CSV field from multipart data in MuleSoft DataWeave 2.0
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):
----------------...
0
votes
2
answers
100
views
Failing to create Mule Maven projects from command line
I am trying to create mule project for Mule Community edition. I cannot use studio for this particular use case. I was trying the following steps
mvn archetype:generate \
-DarchetypeGroupId=org....
3
votes
2
answers
243
views
Process .DAT files which contains PDF
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” -...
0
votes
1
answer
91
views
Using MuleSoft Transform message initialize variables when payload is null
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 ...
0
votes
2
answers
53
views
How to get all elements with key ending with TXI to an array
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 ...
-1
votes
1
answer
76
views
How to stream lines of text from large file using Mule 4.5.0 Kernel
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 ...
0
votes
1
answer
133
views
Unable to read DB using Mulesoft SELECT connector
I'm trying to read a Table data in MYSQL DB using Mulesoft SELECT connector, but it's failing with the following error below
java.lang.RuntimeException: Attempted to send invalid data through http ...
0
votes
1
answer
51
views
How to merge two lists based on a matching string and assign incremental numbers to each object using Mulesoft DataWeave
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 ...
0
votes
0
answers
121
views
How to safely pass a value containing slashes (/) in a URI parameter to a Mule application?
I'm building an API in MuleSoft (Mule 4) using RAML and APIkit. I need to pass a query parameter that contains forward slashes (/) in its value.
example :
https://{{host}}:{{port}}/api/v1/school/S/AZ/...
0
votes
1
answer
184
views
Mulesoft CICD Pipeline Deployment Failing on "Publish Release to Exchange" step - Possible Maven Issue
We have an older Mulesoft application deployed to cloudhub. A username / password needed updated in a config file so I pulled the app from github and changed the user/pass. Then checked the code ...
0
votes
1
answer
58
views
Maven Still trying to point to default central respository
So i'm currently trying to build an older project and i'm facing an issue with dependencies.
Specifically, org/mule/tools/maven/mule-app-maven-plugin
The problem, is that this dependency is only ...
1
vote
2
answers
65
views
Tell Maven to look at alternative location for tools.jar
I am trying to get a Maven build to work properly. I am on a VM workstation that has a jdk15 install.
I can only add files to my user directory.
The mule-app-maven-plugin-1.1.pom has a few issues that ...
-1
votes
1
answer
691
views
Test connection failed: Got status code:500 when trying to resolve a Mule Runtime operation. Reason: 'Internal Server Error [closed]
Mule runtime Version: 4.9.0
JDK: 17.0.12
I am using Anypoint studio version 7.21 and not able to connect to the Oracle SQL database through the insert connector.
I have tested the database ...
0
votes
1
answer
142
views
Is there a way to grab the JSON response message of a POST Request in Mulesoft?
I am working on building a Mulesoft application that GETs a bunch of information from one API endpoint, transforms it and makes a POST to another endpoint. However, when I try to make a POST that has ...
0
votes
1
answer
136
views
Should I go with if-else or match-case in the below scenario?
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 ...
1
vote
1
answer
92
views
Remove data inside the arrays of an XML
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 ...
0
votes
1
answer
57
views
XML attributes being lost after adding namespace prefix to an existing XML
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 ...
0
votes
1
answer
106
views
JSON conversion to XML using attributes and namespaces
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 ...
0
votes
1
answer
76
views
Mule 4 sfdc connector - force reconnection or even lazy loading of connection is it possible?
Here are the details of connector:
<salesforce:sfdc-config name="MySFDC_Connector" fetchAllApexRestMetadata="true" readTimeout="30">
<salesforce:jwt-...
0
votes
0
answers
121
views
How to connect to Azure Event Hub Emualtor
I dont' know how to connect to Azure Event Hub Emulator
Azure event hub emulator: link
What I tried:
Use the official connector: https://docs.mulesoft.com/azure-event-hubs-connector/latest/azure-...
0
votes
1
answer
99
views
Mulesoft Http request fails but Php Curl works fine
Here is my curl code - it works fine:
$url="XXXXXX";
$key="XXXXXX";
$data='[{"producerNumber":"0500555"}]';
$relativeUrl = '/producer/npn';
$...
0
votes
1
answer
77
views
Mule 4 convert a string with an Array of enclosed Json Objects into individual Json objects
[
"{ "Context" : [ { "PeriodOfServiceId" : "30000020", "PersonName" : "LANA, LANA", "PersonNumber" : "259", &...
0
votes
1
answer
255
views
not able to modify errorType from error object in mule 4
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....
0
votes
0
answers
37
views
AMQP queue headers disappearing after the message is published
in a circuit breaker context, we are trying to publish rabbit messages in a "headers" exchange.
We're using the AMQP publish connector (version 1.7.4) in mule 4.4.0, and we're trying to ...
1
vote
1
answer
107
views
How to retrieve the second XML element with a specific attribute value in DataWeave 2.0
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 ...
-1
votes
1
answer
93
views
Dataweave - What does ? mean in the following expression
I have a payload as follows:
{
"relatedParty": [
{
"id": "001",
"Role": "Account"
},
{
"id": "006",...
0
votes
2
answers
83
views
Mule 4 - 1GB file data transformation
My requirement is to read a file with .json extension from an SFTP server and perform some dataweave transformations on it.
The issue is the file is very large, at times between 1 and 2GB. The format ...
3
votes
1
answer
261
views
Error: Deployed Mule Project Requires a Different Runtime
When I compiled my Mule project and deployed it to mule-standalone-4.5.0, I got the following error:
org.mule.runtime.api.exception.MuleRuntimeException: The artifact
bridge-1.0.0-mule-application ...
0
votes
1
answer
111
views
Variable Output Type in Transform
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
...
0
votes
0
answers
159
views
Mule Runtime fail to start in Windows 11 with Java 17
When trying to start mule runtime am getting the following error. What is causing this and how it can be fixed ?
D:\muletemp\mule-enterprise-standalone-4.8.1\bin>mule.bat
MULE_HOME is set to D:\...
0
votes
0
answers
168
views
MuleSoft 4.6.9 - Stored Procedure in Oracle with XMLTYPE - javax.xml.parsers.ParserConfigurationException
When I try to update the Runtime version from 4.4.0 to 4.6.9 and Mule Maven Plugin (MMP) from 3.5.4 to 4.3.0 the execution of the application shows: javax.xml.parsers.ParserConfigurationException
...
0
votes
1
answer
1k
views
Export Mule Project - Cannot invoke org.eclipse.aether.RepositorySystem.newLocalRepositoryManager
When I do the export of a project this error happens:
Cannot invoke "org.eclipse.aether.RepositorySystem.newLocalRepositoryManager(org.eclipse.aether.RepositorySystemSession, org.eclipse.aether....
0
votes
1
answer
243
views
Convert XML to JSON with Attributes and Text as Keys Without __text
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.
&...
0
votes
1
answer
111
views
Trying to parse XML payload but getting an error : You called the function 'Descendants Selector ..' with these arguments: 1: String ("")
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>
...
0
votes
1
answer
106
views
Call a function with NULL input
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? ...
0
votes
1
answer
90
views
Function issue using if else and try catch
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)
""
...
0
votes
1
answer
94
views
How to keep the updates applied in a payload iterating in a map
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 ...
0
votes
4
answers
158
views
How to write a function filter an object from incoming array using dataweave?
Given an array shown below
array:
{
"documentToSigner": [
{
"documentName": "ESRA For aa aa",
"typeCd": "...
0
votes
0
answers
109
views
Filtering IBM MQ Messages on a custom property using MuleSoft IBM MQ Connector
How can I filter messages from an IBM MQ based on a custom property or attribute using IBM MQ Mule connector?
The use case is that the back end system posts several messages on the Queue which may ...
0
votes
0
answers
544
views
MUnit test recorder is not working properly
Test recorder image I am facing multiple issues with the MUnit Test Recorder in Anypoint Studio while working on a Mule 4.6.7 project with Maven configuration (mule.maven.plugin.version 4.1.2, munit....
0
votes
1
answer
775
views
Cannot invoke "Object.getClass()" because "c" is null error for mule flow
I try to run my mule apps under runtime 4.6.7 from anypoint studio IDE.
It failed by starting and throws the error (Cannot invoke "Object.getClass()" because "c" is null)for my ...
1
vote
3
answers
104
views
How to create an array based on keys after the filter condition?
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 ...
-1
votes
1
answer
135
views
Mule function that using match with a regex what kind of string does the function accept?
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-...
0
votes
1
answer
239
views
Anypoint cli v4 - how to deploy an application and ensure it continues to use Object store v2?
I am working on a Mule 4 api that needs to use Object store v2 . This api is being deployed to Cloudhub 2.0 .
whenever the application is deployed / redeployed the checkbox use objectStore v2 is ...
0
votes
1
answer
143
views
Sending to multiple recipients MuleSoft Email SMTP
I have been trying to send to multiple recipients but to no avail.
Currently I define a transform to split then join the recipient string then pass it to the email connector, but it fails saying
Error ...
0
votes
1
answer
151
views
How to sort json data in Mule 4 Dataweave
I need to sort JSON data which can contain array as well as objects
sample data :
{
"results": [
{
"empCode": "abcd",
"age&...
0
votes
2
answers
80
views
How to Migrate SOAP Project from Mule 3.9 to 4.5?
We're upgrading from Mule 3.9.0 to Mule 4.5.0 (Community Edition). We have a few Mule connectors that act as bridges between our application and some third party on the Internet using SOAP. Here is an ...
0
votes
1
answer
207
views
How to use a Mule payload to structure an HTML for email body purpose?
We have a payload as below:
{
"API1": "UP",
"API2": "DOWN",
"API3": "UP"
}
We need to structure this in HTML and read(using parse ...
2
votes
1
answer
1k
views
define cause for Error in Mock When (MUnit)
I tried to define Error with typeID and cause for Mock When in MUnit
If I put cause as below shown, I got Exception as below, according to Excpetion.
I assume Cause Input is expectiong Expression ...