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
3 answers

How to get information of attached file in mule?

I am trying to get information of attached file in mule application.I am using POSTMAN to POST a text file .But After HTTP receiver in mule application Inbound Attachment Names have size=0.How to resolve such scenario?
Anurag
  • 65
  • 2
  • 13
1
vote
2 answers

DateWeaver date field conversion not working - Mule

In DataWeaver documentation 10.8. Changing the Format of a Date https://developer.mulesoft.com/docs/dataweave#_date_time_operations Below is the transform %dw 1.0 %output application/json %type mydate = :string { format: "YYYY/MM/dd" } …
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
1 answer

How to handle For each condition in Data weaver: Mule

I'm getting struggle in looping the entries in data weaver. Below is the Input and the expected response. Not sure how to make loop(I need to get RecordEntry and each entry with 'IndividualEntry') . Input xml : Record entry tag in input xml is…
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
1 answer

DataWeaver Mule Document section 1.1.2 and 3.4 examples not working?

Going through the Dataweaver documentaion Link:https://developer.mulesoft.com/docs/dataweave#_attribute_selector_expressions Section 3.4 Key Present Trying out the example provide below . Input: Mariano
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
1 answer

Can we install both version Mule AnyPoint Studio July 2014 and June 2015 Release in same PC without any conflicts?

I have a small query generally. I'm working on the studio July 2015 release with 3.5.1 runTime for my client Project. However I'm willing to install AnyPoint June 2015 with runtime 3.7 release for my POC purpose. Does it conflict each by any chance…
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
3 answers

does mule server 3.4.2 get automatically restart in any chance?

Does mule server 3.4.2 get automatically restart in any chance? In my production server mule server restarted automatically.
Gopi
  • 105
  • 1
  • 7
  • 24
1
vote
2 answers

If else condition checking in Mule Expression component not storing out session Variable?

I'm trying to do simple if else condition in expression component. After expression component I have logger. My query here is I'm not able to see the test1 but can able to view temp value in logger component. Why? Same time, if I print test1 value…
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
0 answers

MULE ESB Server: RAML loading for prolonged time

I created a mule application and able to run/deploy it on my machine successfully. On running api-console is appearing in Anypoint-studio like this. Now when I deployed this application on mule ESB server and try to hit api-console for this…
Geek_Akash
  • 189
  • 1
  • 11
1
vote
1 answer

Can you use a Mule ESB Collection Splitter to on a HashMap?

Can you use a Collection Splitter to split a HashMap resulting in messages identified by the key and containing the value in the payload? For example, I have a Map>, and I would like to process each list differently based on…
Gary Sharpe
  • 2,369
  • 8
  • 30
  • 51
1
vote
2 answers

MULE: xpath expression not extracting values from payload

I've got a simple flow, it takes an XML messages, splits it into sub elements and now I am trying to get a value, but getting unexpected results. My XML looks like this:
JD Frias
  • 4,418
  • 3
  • 21
  • 24
1
vote
1 answer

How to access Mule flow variables in java code?

Browsing around, I found something that look like below: import org.mule.api.MuleMessage; import org.mule.api.transformer.TransformerException; import org.mule.transformer.AbstractMessageTransformer; import java.util.Scanner; public class javaTest…
Ajv2324
  • 422
  • 8
  • 24
1
vote
1 answer

Resolving mule app property referring to another property

I have multiple endpoints for different vendor's and we are differentiating it based on the userId for similar service operation and routing calls…
Rama Kesara
  • 94
  • 1
  • 7
1
vote
0 answers

Mule dotnet connector not recognizing Integer

I was doing a sample flow for studying dotnet connector in mule. I was able to execute a sample dll hello world method via mule. But one of my dll method is returning an integer value and it is not executing, showing an error "Failed to invoke…
Hali
  • 591
  • 2
  • 5
  • 20
1
vote
2 answers

Mule:Polling on multiple table of a database connector

Need to poll multiple tables of a database connector. When trying to apply separate poll on tables using composite source
NAZAR REHMAN
  • 179
  • 3
  • 19
1
vote
2 answers

Mule:Retrieving object store in an MEL in Mule 3.5

Having a requirement to test a object store whether it contains a key or not in a choice router
NAZAR REHMAN
  • 179
  • 3
  • 19