cqframework / cql-execution

A JavaScript framework for executing CQL
Apache License 2.0
63 stars 31 forks source link

Custom MessageListener not used when a CQL Message is in a referenced library #324

Open birick1 opened 1 week ago

birick1 commented 1 week ago

Hi cql-execution team!

When implementing a MessageListener, the listener works as expected when Message(...) is in the primary CQL file. However, when Message() is in a referenced library, it does not work as expected.

For example, FHIRHelpers has several different Message() calls, but they will not trigger a call to an implemented MessageListener.

In debugging, a NullMessageListener would be instantiated for such library Message calls. I discussed with @cmoesel, who identified that this.messageListener should be added as a final parameter in the constructors here and here. I tried out this solution, and it appears to have resolved the issue.

I'd like to ask that this solution be considered and added.