Questions tagged [mule-el]

The Mule Expression Language (MEL) is the primary language used for formulating such expressions throughout Mule ESB.

Mule Expression Language (MEL) supports the work of message processors by providing a means of accessing, manipulating, and using information from the message and its environment. All features of MEL can be used in XML application configuration files, and a few require additional Java programming. All MEL features are available within the visual interface provided by Mule Studio.

A typical MEL expression combines one or more operands with zero or more operators in a Java-like syntax and returns the resulting value.

At the heart of MEL are property expressions of the form contextObject.property. These provide easy access to properties of the Mule message and its environment. For example, the expression message.payload represents the payload property of the message context object. Its value is the message payload.

Java method invocations and assignments are the other common MEL expressions.

In most cases, a MEL expression stands alone as the value of a configuration property of a message processor. Mule evaluates the expression at runtime, and the message processor uses the result.

The syntax of a MEL program largely follows Java, but MEL implements dynamic typing by performing type coercion at runtime. Semicolons follow each statement except the last, whether the statements are on one line or separate lines. Return statements are usually unnecessary, because a MEL program returns the value of the last MEL statement executed.

MEL operators and basic operands are conventional and predictable (for example, 2 + 2 == 4 returns true). Property expressions provide convenient access to information from the message and its environment (for example, server.fileSeparator returns "/" if the application is running on a Linux server, and "\" on a Windows server.).

392 questions
1
vote
0 answers

Mule 3.9.0 - java.util.ConcurrentModificationException: null

I am using Mule 3.9.0 CE While doing load testing with multiple thread on Mule Flow, I got this exception: java.util.ConcurrentModificationException: null All Mule flow and sub-flow Processing Strategies =…
1
vote
2 answers

Mule Parse Template Multiple elements

I have a set of orders and want to generate an html document with the orders, I want to use parse template for that but I do not know how this will work for multiple order items in the payload. I want to generate something like this: …
BreenDeen
  • 623
  • 1
  • 13
  • 42
1
vote
2 answers

Regarding Running Munit for Mule Flow

I am facing the below issue while running in Munit , I tried changing the workspace , installed plugins , but munit nothing seems to be working .The error of the screenshot is attached .Click on the blue link below to see the screenshot . Thanks…
Developer
  • 21
  • 1
  • 7
1
vote
1 answer

Access key value pair dynamically from ArrayList in mule

Here is my payload: [{User_Feedback=Satisfied with Amelia response, Record_Creation_Time=1505848950000, User_Name=Bora Karisma, Conversation_ID=10, ConverstaionStart_dt=1505848930000, Elapsed_Time=20, Status=Failed, idsid=kbora,…
SDE
  • 85
  • 1
  • 13
1
vote
1 answer

How to do mapping as arraylist of maps for below using dataweave mule

How to do mapping for below data. ParameterMap{[card=[15242424211], phone=[54545454545]]} This data is dynamic which is coming from http request as part queryparameters. I want to form query params in the form #[{'p1':'v1', 'p2':'v2'}]…
Gopi
  • 105
  • 1
  • 7
  • 24
1
vote
1 answer

Mule json-to-object-transformer and Dataweaver Transformer exception

I'm have an issue with a Mule Dataweave Transformer getting INFO 2017-08-10 15:05:52,787 [amqpReceiver.02] org.mule.api.processor.LoggerMessageProcessor: Authorisation Changed Event received. authorisation id: 1 INFO 2017-08-10 15:05:57,844…
Pete
  • 47
  • 1
  • 6
1
vote
4 answers

How to call MEL expression while invoking the key value with key from properties file in mule

I have properties as below path.order=/order path.address=/address Usually we will use ${path.order} to get the key value. I want to pass the type(order or address) dynamically to get the key value. Like below ${path.#[flowVars.type]} I tired with…
Gopi
  • 105
  • 1
  • 7
  • 24
1
vote
1 answer

Mulesoft Joining Arrays that occur one after another in a loop

I'm fairly new to mulesoft, kindly help me with this one. I'm having a http component in a for each loop, for the first iteration it gives a payload like: [ { "Value1": "xxxx", "Value2": "yyyy", "Value3": "zzzz" }, { "Value1": "qqqq", "Value2":…
johnny
  • 11
  • 1
1
vote
2 answers

JSON parsing for a particular element

Below xpath expression looks for AccountNo element anywhere in whole xml document. #[xpath3('//AccountNo').text] I am after similar expression to get AccountNo from a json request if present anywhere. Below are example xml request containing…
user3366906
  • 149
  • 2
  • 11
1
vote
2 answers

Mule ESB -- Introduce a Middleware to Publish and Consume SOAP

I just have started using Mule 3.8 CE version. My use case is to like this, Publish SOAP -- Hit any method from Published SOAP -- Receive data -- Pass this Data to consume SOAP -- Fetch Response -- Process response via Java -- Return this as…
Darpan Sanghavi
  • 1,443
  • 2
  • 17
  • 32
1
vote
2 answers

How to mask values in complex json structure using dataweave?

I want to mask the element in the json. descID element in the below json should be masked. Could you please suggest. { "status": "ok", "statusCode": "19x9s011", "statusDescription": "Service: XYZ IOP ; country: india ; Locale:en-US ;…
Sushma
  • 121
  • 4
  • 18
1
vote
3 answers

Mule Expression to get individual object from a Json Array

Want to extract each object from my json payload which looks like this: Need to pass each object from this map into splitter or collection splitter. I cannot use foreach scope here. [ { "Name": null, "Key": "4", "Header":…
user4338724
  • 91
  • 2
  • 7
1
vote
1 answer

Mule expression language unable to resolve method

I'm having an issue with this : package com.acme; Class CircuitBreakerUtil { public static boolean canAttempt(String breakerName) { return true; } } my spring declaration
Pat B
  • 1,915
  • 23
  • 40
1
vote
1 answer

Is MEL supported in ForEach scope to determine the batch size?

Using Mule, I need to loop a collection of records in a batch fashion (don't want to use the Batch scope). In the foreach element you have the way to specify the batch size to partition your collection. Being said that, if you specify a number it…
Victor Sosa
  • 388
  • 1
  • 14
1
vote
4 answers

Access Json element in Flow Variable - Mule 3.7

Can we access a json element inside flow variables in Mule? Eg: My flowVar value is { "Input1": { "Value1": "UNITED STATES" } } How can I access the element 'Value1' using MEL in mule? Thanks, ROA
ROA
  • 71
  • 1
  • 2
  • 8