是否可以在 payloadFactory 中介的 <args> 部分使用 $SYSTEM 前缀?

Is it possible to use the $SYSTEM prefix in the <args> section of payloadFactory mediator?

我使用 WSO2 EI v6.5.0。我想将系统环境变量中的外部 SOAP 服务的用户名和密码加载到 payloadFactory 调解器中。是否可以在节中使用 $SYSTEM 前缀?

尚不支持 $SYSTEM 前缀。但是你可以使用下面的语法来获取系统变量。

get-property('system', 'hello')

这个脚本调解器适用于我的情况:

<script description="get cereditorials" language="js">
<![CDATA[mc.setProperty("user", java.lang.System.getenv("ENV_USER"));
         mc.setProperty("pwrd", java.lang.System.getenv("ENV_PWRD"));]]>
</script>