Skip to main content
Administrator Guide
Last Updated: 2023-06-23
Reference: Sample Studio MVEL Expressions

Reference: Sample Studio MVEL Expressions

Variable
Sample Expression
Description
context
context.getProperty('myProperty')
Retrieves the value of the property
myProperty
from the
MediationContext
.
context.getProperty('someProperty').equals('someValue')
Retrieves the property
someProperty
from the
MediationContext
if the property value is set to
someValue
.
da
da.toVar('eib_transform_output.txt', 'var1')
Retrieves a document from an integration event with filename
eib_transform_output.txt
and adds a variable named
var1
.
da.getDocsMatching('label')
Retrieves a document with the given label.
ec
ec.getAttribute('attributeName')
Retrieves an attribute name.
ec.integrationMapLookup('map', 'key')
Retrieves an integration map value.
env
env['cc.hostname']
Retrieves the
cc.hostname
environment property set as
-Dcc.hostname
on the command line.
env.containsKey('key')
Displays as true if environment properties contain the given key.
ftp
ftp.list('URL')
Retrieves a list of files for a URL.
intsys
intsys.getAttribute('username')
Retrieves an integration attribute named
username
.
intsys.isServiceEnabled('name')
Displays as true if an integration service with the given name exists.
lp
lp.getSimpleData('name')
Retrieves the value of a launch parameter with the given name.
lp.exists('label') == true
Displays as true if a parameter with the given label exists.
message
message.rootPartAsText
Retrieves the root part of a message as text from the
MediationMessage
interface.
message.variables
Retrieves
MediationContext
variables.
mtable
mtable['my_property'].set(0, 'Data_Column', 'my_test_data')
Sets data in an
mtable
.
mtable['my_property'].get(0, 'Data_Column')
Retrieves data from an
mtable
.
parts
parts[0].getHeader('someHeader')
Retrieves the header
someHeader
from the root part.
parts[0].xpathB('/a/b')
Implements the
xpathB
method to evaluate an XPath Boolean expression.
props
props.myProperty
Retrieves the value of the property
myProperty
from the
MediationContext
.
props['bean.property']
Retrieves the value of the property
bean.property
from the
MediationContext
.
spring
spring.getBean('fred').name
Retrieves the
name
attribute of the bean called
Fred
in the Spring context.
spring.parent ApplicationContext
Accesses the Spring application context.
util
props['is.last.record'] = util.isLastMessageInBatch()
Checks whether the current message in the
MediationContext
is the last message that the splitter component will generate.
<ns:Message_Summary>@{util.cleanString(props['is.message.summary'])}</ns:Message_Summary>
Implements the
cleanString(String)
function to ensure that an assembly component produces well-formed XML.
vars
vars['myVariable'].length
Retrieves the length of the variable
myVariable
.
vars['myVariable'].mimeType
Retrieves the MIME type associated with the variable
myVariable
.
xmldiff
xmldiff.isDifferent() == true
Checks whether there are differences between 2 documents.
xmldiff.changes
Retrieves a list of differences between 2 documents.