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

Mule ESB - How to load a config xml (custom) file in Mule flow

I am trying to find a way to load a custom xml file to a mule flow and may-be get it as a variable. For eg;
jvas
  • 440
  • 1
  • 7
  • 19
1
vote
1 answer

Escaping characters in Mule Expression Language

I am using Mule and Mule Expression Language to retrieve values form a properties file and change the contents of a connector address based on those values. Example: It would read test1 and test2 from the file and store in the variables ${user} and…
Grice
  • 1,345
  • 11
  • 24
1
vote
1 answer

How to Identify and print the inbound properties in mule

Hi i am working with mule and i want to know how to access incoming message inbound properties. I am trying to get Mule_Originating_Endpoint property but i am unable to print or set it in some…
Utsav
  • 1,593
  • 4
  • 22
  • 46
1
vote
1 answer

to fetch a specific value from resultset in Mule

I have a flow that calls a MS SQL stored procedure which returns a value. The output that i get from the DB is {resultset1=[{id=30}]} i would like to store the value of id to flow variable couldn't find a successful way to do this, Could somebody…
madhu
  • 87
  • 2
  • 12
1
vote
2 answers

How to get handle the Data using MEL if Select SQL returns Null

I have a minor issue in Mule .. I am using Select SQL query like the following :- Now from here I will get the values using MEL like #[message.payload[0].NAME]…
Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81
1
vote
1 answer

mule timestamp in GMT in (java class and not in xml coding)

The below code works fine within a mule xml transformer If I want to achieve the same thing in a Java class inside a…
Pavan JHNR
  • 49
  • 1
  • 11
1
vote
1 answer

Mule ESB: How to call a flow inside Datamapper( script)

I have datamapper, ( source: pojo and target:CSV), I need to call the other flow ( or groovy) inside datamapper. I stuck in passing the parameter to the flow. For example, I don't want entire payload has to go to flow for validation. I need to pass…
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
2 answers

Mule ESB: How to handle Exception in Mule Batch through MEL

I'm using batch in mule for the first time, not sure how to handle the exceptions for batch records. Records getting failed input phase, but not able to catch failure exception either in input phase logger and also in Batch step( Failure…
star
  • 1,493
  • 1
  • 28
  • 61
1
vote
1 answer

Jdbc Acknowledgment (ACK) in Mule

I like to update my database column deltaprocessstatus as 'I' after fetching the data from database. Below is my code
Mangoski
  • 2,058
  • 5
  • 25
  • 43
1
vote
2 answers

moveToDirectory FTP errors- Mule

Using Mule EE, I have the following project;
Jad
  • 479
  • 2
  • 10
  • 23
1
vote
1 answer

Calling flow from another project in Mule

I like to call a flow from another project in Mule. Is that possible. If its so please provide me the details how it can be achieved? Thanks in advance.
Mangoski
  • 2,058
  • 5
  • 25
  • 43
1
vote
1 answer

Regex in mule expressionlanguage

I would like to know the meaning of the regular expression used in mule expression language I have a choice component that uses the following expression regex('^[\\w\\s]+=.*',payload['Created_Package']) != null Could some one please explain the…
madhu
  • 87
  • 2
  • 12
1
vote
3 answers

Convert XML to JSON using Mule Custom Transformer

Hi I am working with Mule Studio and I want to create a Custom Transformer which will convert XML to Json using Google Gson Library. So in this case i have to add a Java Transformer component and i have to write a custom code for that. But the…
Utsav
  • 1,593
  • 4
  • 22
  • 46
1
vote
1 answer

Cannot get any Google connectors to work in Mule Studio?

I have tested Twitter and LinkedIn and I seem to be able to get these working eventually, but I just cannot find enough material to get the Google connectors to work. When using the Google Calendar connector I am trying to collect the token with -…
Ash
  • 8,583
  • 10
  • 39
  • 52