How to reach a value in LocalEnvironment Tree in ESQL :: IBM Message Broker

2.8k views Asked by At

I'm trying to set WrittenDestination.Name to OutputLocalEnvironment.Variables.zipFileName . But when I try to run and track the message, value of zipFileName is null.

Here is my ESQL code.

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;

I'm sure that OutputLocalEnvironment.WrittenDestination.Name is not null because I have traced already.

1

There are 1 answers

0
NotA On

I found it. I missing File in InputLocalEnvironment.WrittenDestination.Name expression. It should be InputLocalEnvironment.WrittenDestination.File.Name.