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

Validator.matchesRegex in Mule blows up with basic pattern

I am receiving a date in message as a string. the following regular expression will confirm it is in at least the format I know I can handle: ^[0-9]{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])$ but when I provide this regex to the…
Nathan Tregillus
  • 6,006
  • 3
  • 52
  • 91
2
votes
0 answers

Session Variable not available in FlowRef Lookup Table

I am using a Message Enricher to call a web services and return what a part number is for the external data source. I am saving that payload into a Session Variable. I am then using a Lookup Table from within a Datamapper to send the current…
2
votes
1 answer

Compressing Files (gz) in Mule with file Naming convention not working as expected

I'm reading a file from File Component, example file name as TestCustomer.xml. I need to compress the file ( ZIP format) and place it on file component with the name TestCustomer.zip. While extracting the file only, it should reflects as…
star
  • 1,493
  • 1
  • 28
  • 61
2
votes
2 answers

Mule: Invoking a flow multiple times with different parameters

I have this code to refactor which contains multiple flows all doing the same tasks. Planning to modify it as a generic flow executed in an iterative way with different start parameters. How can i achieve this in mule. ex:
NAZAR REHMAN
  • 179
  • 3
  • 19
2
votes
3 answers

How to perform string operation on JSON MEL in mule esb

I want to perform some string operation on MEL I have following expression in MEL OUTPUT IS 19901026000000 I want to extract 1st 4 digit then 6,7 digit . How can I do this…
user3855589
  • 1,113
  • 2
  • 15
  • 43
2
votes
3 answers

How do you compare strings in a mule expression when one string is loaded via a property file?

I have the following mule expression in a choice component: ... Do something The environment property is loaded via a property file,…
Gary Sharpe
  • 2,369
  • 8
  • 30
  • 51
2
votes
2 answers

Log File Not Found - Mule Server Installation

I am installing Mule Server (Version 3.6.1) on Windows Server R2. I have already set the JAVA_HOME to proper location. On running startup.bat, it encounter following error: File not found - MULE-ENTERPRISE-3.6.1\LOGS\MULE_EE.LOG Any help? Update…
Hali
  • 591
  • 2
  • 5
  • 20
2
votes
3 answers

Connecting MS SQL Server with mule

I am working in a mule application and I am new in mule application development. In my application, how can I connect to MS Sql server. I have tried Database connector but it is not having Connection configuration for SQL Server. Thanks.
Hali
  • 591
  • 2
  • 5
  • 20
2
votes
2 answers

Mule ESB: why AMQP is shutting down in-between the flow with error message (Received shutdown signal for consumer tag)

I'm using AMQP connector,and my queues are present in cluster envt. I'm not sure why this message is populated always. But this is not affecting any success running flow. But it is trying to try connections always. I'm using Amqp transport jar:…
star
  • 1,493
  • 1
  • 28
  • 61
2
votes
2 answers

MULE ESB: Saving result from Sql query in Session Variable

I have created a sample mule application that fetches one row from my database. It fetches USER_NAME and USER_ID from the Database. when I convert the result to JSON or XML I get the output as [{"USER_ID":"U001","USER_NAME":"Dharmin"}] Now i want…
2
votes
1 answer

How to apply on message.OutboundAttachment in Mule

I have a base64Binary encoded file(eg:pdf,img,doc). In Mule I'm setting this encoded data as an outBoundAttachment to eventually send it as attachments using SMTP. How to decode or apply decoding transformer only to the outbound attachment and send…
shrinathM
  • 362
  • 3
  • 22
2
votes
1 answer

Mule ESB: How to use rules in DataMapper for condition checking

Please help me. I'm using datamapper to convert xml to csv. PF my xml below. If ID = 1, then i need to map schoolRating , and also ID=2 then need to map schoolRating with other filed in csv. Though this xml i created schema.
star
  • 1,493
  • 1
  • 28
  • 61
2
votes
2 answers

How to access the values from properties file from Groovy script in Mule 3.5

As we can access values from properties file using ${}, anywhere inside the mule flow,how can we access these values from a groovy script?
shrinathM
  • 362
  • 3
  • 22
2
votes
2 answers

MULE_JDBC_UDATE_COUNT is returning Null value even after deleting data from Database

I have a Mule flow in which I have a Database delete operation :-
Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81
2
votes
1 answer

How to extract all the JSON value in Mule ind insert to DB

I have a REST service in my Mule flow :-
Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81
1 2
3
26 27