如何在ESQL :: IBM Message Broker中的LocalEnvironment树中获取值

时间:2014-11-20 08:19:13

标签: ibm-integration-bus extended-sql

我试图将WrittenDestination.Name设置为OutputLocalEnvironment.Variables.zipFileName。 但是,当我尝试运行并跟踪邮件时,zipFileName的值为null

这是我的ESQL代码。

CREATE COMPUTE MODULE TFM_ERecruit_compare
    CREATE FUNCTION Main() RETURNS BOOLEAN
    BEGIN
        SET OutputLocalEnvironment = InputLocalEnvironment;
        SET OutputLocalEnvironment.Variables.zipFileName = InputLocalEnvironment.WrittenDestination.Name;
        SET OutputLocalEnvironment.Variables.entryFileName = 'test.xml';
        SET OutputLocalEnvironment.Variables.srcPath = InputLocalEnvironment.WrittenDestination.Directory;
        SET OutputLocalEnvironment.Variables.logger_name = InputLocalEnvironment.Variables.logger_name;
        RETURN TRUE;
    END;
END MODULE;

我确定OutputLocalEnvironment.WrittenDestination.Name不是null,因为我已经跟踪过。

1 个答案:

答案 0 :(得分:0)

我找到了。我在File表达式中遗漏了InputLocalEnvironment.WrittenDestination.Name。它应该是InputLocalEnvironment.WrittenDestination.File.Name