【发布时间】:2018-05-10 02:05:28
【问题描述】:
我正在尝试在更新属性处理器中编写 EL。以下是我的要求:
用户输入:IP 地址
存入属性:target.host.name.linux
我在 nifi.properties 中定义了另一组属性:
trigger.target.system.linux.name=10.44.245.33
trigger.target.system.linux.password=Passw0rd
我正在尝试将用户输入的值与属性文件中存在的属性值进行比较。如果它们匹配,我将在真实条件下分配trigger.target.system.linux.password 上面的变量,否则发布'不匹配'
以下是我尝试过但没有成功的一些EL:
${${target.host.name.linux:equals(${trigger.target.system.linux.name})}:ifElse(${trigger.target.system.linux.password},'no match')}
${${'target.host.name.linux':equals(${'trigger.target.system.linux.name'})}:ifElse(${'trigger.target.system.linux.password'},'no match')}
${${${target.host.name.linux}:equals(${trigger.target.system.linux.name})}:ifElse(${trigger.target.system.linux.password},'no match')}
有什么想法吗?
【问题讨论】:
标签: apache-nifi