Home > Enterprise >  Context Issue in Esper 8.8 - Does not seem to be working
Context Issue in Esper 8.8 - Does not seem to be working

Time:07-02

I have been working on reviving a relatively old project that was on Esper v5.1. I upgraded to 8.8.0 and made all relevant changes. Overall, code base seems to be running well.

Where I need some advice is on context. I create context on start of application as follows (and that is great - no errors or warnings):

 create context AccountIdContext partition by accountId from AccountData;

Now, when I try to use that context in a query, I get the message

Context by name AccountIdContext could not be found...

and then I try to recreate the context along with query, as so,

 create context AccountIdContext partition by accountId from AccountData;
 context AccountIdContext select ...

I get the following message:

"A precondition is not satisfied: A context by name 'AccountIdContext' has already been created for module '(unnamed)'"

Cannot seem to get around it! Could use some guidance. BTW, this was not the case in 5.1 ESPER.

CodePudding user response:

Check the compiler path. The compiler path is what the compiler uses to resolve names like the context name, unless there is just one module that contains both the create-context and the associated statement. The documentation link is Compiler Path and also Access Modifiers which define who can see what names.

  • Related