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
2
votes
1 answer

How to use Spring Rest Service with REST Component in Mule

Hi I am working with Mule Studio and I want to use Spring Rest Service with REST component in the Mule. So how can I access Spring REST features with REST Component I don't want to use Jersey way of creating REST service with Mule. I just want to…
Utsav
  • 1,593
  • 4
  • 22
  • 46
2
votes
1 answer

Pros and Cons of using Choice Router in Mule

Hi I am working with Mule. I have multiple flows. My selection for multiple flow is based on choice router. I just want to know the Pros and Cons of Using Choice Router . How maximum use of choice router will effect the performance. How choice…
Utsav
  • 1,593
  • 4
  • 22
  • 46
2
votes
2 answers

Cannot use && operator for when attribute in a choice component

When I define the following expression in Mule, Mule provides an error stating the following... ERROR 2014-05-19 11:48:51,189 [main] org.mule.module.launcher.application.DefaultMuleApplication: null org.xml.sax.SAXParseException: The entity name…
EdC
  • 194
  • 1
  • 15
2
votes
1 answer

mule extract xml element which is base64 string and dump to file

In mule, I have a c# class what was serialized with XmlSerializer (over in the microsoft world). The xml serialized class has an element called FileContents that I am trying to work on (xpath = '/Document/_originalfile/FileContents'). Basically,…
UnOjO2010
  • 45
  • 1
  • 8
2
votes
2 answers

How to route in Mule based on Incomming File Name

I have a requirement in mule to route based on file name ... I have a file endpoint where files will be placed and based on file name it will route to different flow ... my flow is :-
Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81
2
votes
1 answer

Mule - how to get the name of the file created in an outbound endpoint

I have a Mule application that is writing a file in an outbound endpoint, with the config below: Following this…
danw
  • 1,608
  • 4
  • 29
  • 48
2
votes
1 answer

Issue with Mule FileMessageReceiver - WARN issues

With the following file configuration, the application consistently provides a WARN issue. Please see below for an example of the logs. WARN 2014-04-15 18:46:59,285 [[processes].accountFlow1.stage1.02] org.mule.transport.file.FileMessageReceiver:…
EdC
  • 194
  • 1
  • 15
2
votes
2 answers

Extracting array from JSON in mule esb

I'm using Mule 3.4 CE and I have a JSON data coming through HTTP in the following format: { "People" : [ { "Details" : { "Name" : "John Smith", "Email" : "abc@mail.com" } }, { "Details" :…
Tech Matrix
  • 283
  • 2
  • 7
  • 13
2
votes
1 answer

MULE: How to use CDATA in MEL

Please help me on this error.I have captured original payload through session variable in mainflow.In case of error scenario's, I have another subflow, where i have used Message Property Transformer and XSLT transformer. So when i try to put …
star
  • 1,493
  • 1
  • 28
  • 61
2
votes
2 answers

Mule originalFilename is null

I am creating a process using Mule 3.4.1 which after processing a file it writes out the file with a specific filename. The input filename is: MMDDYYYY_sys_newhires.csv The processed filename is: MMDDYYYY_sys_newhires_NNN.csv The code that i am…
hdost
  • 883
  • 13
  • 22
1
vote
1 answer

Inputs on converting Mule 3 expression to a Mule 4 expression

We are migrating a Mule 3 application to Mule 4 using the Mule Migration Assistant (MMA). While migrating encountered below code which can not be migrated automatically. Any inputs on how to manually convert this to Mule 4? Please note: Need only…
1
vote
1 answer

Trouble converting SHA-256 hashing from Mule 3 to Mule 4

Does anyone know the Mule 4 (4.4.0) equivalent to the following Mule 3 (3.9.2) code? I'm stuck...
Doug
  • 13
  • 2
1
vote
1 answer

"Redirecting into HTML page"

I have a flow where I am trying to load a HTML page if successfully login or fails. Flow is working but while doing POST job on browser side it's not redirecting to the loginSuccessful.html or login/loginFailure.html.
Devendra
  • 219
  • 2
  • 22
1
vote
1 answer

Accessing Error Detail in Console

Using Mule 4.1 When an error is encountered in a flow something like the following is logged in the console. ******************************************************************************** Message : Cannot parse input XML because…
jradich1234
  • 1,410
  • 5
  • 24
  • 29
1
vote
2 answers

how to remove specific fields from map using dataweave mule

how to remove specific fields from map using dataweave input: { a:1, b:2, c:3, d:4 } I want to remove c and d fields(c and d values are dynamic) and display only output { a:1, b:2 } How can we do it in data weave
Gopi
  • 105
  • 1
  • 7
  • 24