Skip to content

Tag: drools

How do I give Drools access to dynamically loaded classes?

I am trying to use a ClassLoader to load classes from .class files at runtime and use them in Drools rules (Drools 7.52.0). I am using this custom ClassLoader which reads from a file and uses ClassLoader.defineClass() to load a class. It’s similar to a URLClassLoader: I can use the ClassLoader to load a class, construct an instance, and access

Sum with Integer object if not null

I do not know if it is possible in Java but I need a method to do a special “add function”. Let me explain, SHORT VERSION: Is it possible to add an int with an Integer object? I need a method to check if that integer object exists, and add 0 if the object is null, add the correct value