Github user kl0u commented on the issue: https://github.com/apache/flink/pull/4172 Hi @wuchong . I am not an expert in Janino and how it works but I do not think you need Janino's classloader at any point. Using the `open()` of the `CEPOperator` you just need to compile the code of the `IterativeCondition` whenever we have a `IterativeConditionWrapper`. In the code snippet you sent before, line 30 should change to take the user classloader from the runtime context. If I remember correctly it is `getRuntimeContext().getUserClassLoader()`. This will allow Janino to do its magic using the user classloader. After compiling the class, you can set the `newCondition` field of the `StateTransitions` to an object of the compiled class. After this, whenever you have a checkpoint or whenever you serialize/deserialize the condition, given that this will be a regular IterativeCondition, Flink will know how to do it. I am also including @twalthr and @fhueske on this to comment, as they have more experience with this. In addition, if you have a prototype that does all this but fails at some step with an error, you can send a link and we can try to check it out.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---