跳至主要内容
Administrator Guide
上次更新时间 :2023-06-23
参考信息:Workday Studio MVEL 表达式示例

参考信息:Workday Studio MVEL 表达式示例

可变
表达式示例
描述
context
context.getProperty('myProperty')
检索属性的值
myProperty
MediationContext
context.getProperty('someProperty').equals('someValue')
检索属性
someProperty
MediationContext
如果属性值设置为
someValue
da
da.toVar('eib_transform_output.txt', 'var1')
从集成事件中检索文件名为
“eib_transform_output.txt
”的文档,并添加名为“”的变量。
var1
da.getDocsMatching('label')
检索具有给定标签的文档。
ec
ec.getAttribute('attributeName')
检索属性名称。
ec.integrationMapLookup('map', 'key')
检索集成映射值。
env
env['cc.hostname']
检索
cc.hostname
环境属性设置为
-Dcc.hostname
请在“”行中选择“”。
env.containsKey('key')
如果环境属性包含给定的键,则显示为 true。
ftp
ftp.list('URL')
检索 URL 对应的文件列表。
intsys
intsys.getAttribute('username')
检索名为“”的集成属性。
username
intsys.isServiceEnabled('name')
如果存在具有指定名称的集成服务,则此选项显示为“真”。
lp
lp.getSimpleData('name')
检索具有给定名称的启动参数的值。
lp.exists('label') == true
如果存在具有给定标签的参数,则显示为真。
message
message.rootPartAsText
从“”中检索文本形式的消息根部分
MediationMessage
接口。
message.variables
检索
MediationContext
变量。
mtable
mtable['my_property'].set(0, 'Data_Column', 'my_test_data')
在报告中设置数据
mtable
mtable['my_property'].get(0, 'Data_Column')
从检索数据
mtable
parts
parts[0].getHeader('someHeader')
检索标头
someHeader
从根部件开始
parts[0].xpathB('/a/b')
实现
xpathB
方法来评估 XPath 布尔表达式。
props
props.myProperty
检索属性的值
myProperty
MediationContext
props['bean.property']
检索属性的值
bean.property
MediationContext
spring
spring.getBean('fred').name
检索
name
名为“”的 bean 的属性
Fred
spring.parent ApplicationContext
访问 Spingle 应用程序上下文。
util
props['is.last.record'] = util.isLastMessageInBatch()
检查中的当前消息是否
MediationContext
是拆分器组件将生成的最后一条消息。
<ns:Message_Summary>@{util.cleanString(props['is.message.summary'])}</ns:Message_Summary>
实现
cleanString(String)
函数,以确保组件组件生成格式正确的 XML。
vars
vars['myVariable'].length
检索变量的长度
myVariable
vars['myVariable'].mimeType
检索与变量关联的 MIME 类型
myVariable
xmldiff
xmldiff.isDifferent() == true
检查 2 个文档之间是否存在差异。
xmldiff.changes
检索 2 个文档之间的差异列表。