3

Right now I have a spring-boot application that feeds rules and models from .drl files to the Drools KieBase. The facts are built and loaded dynamically, though.

I would like to also load the rules/models dynamically instead of reading them from .drl files e.g. receiving a JSON through HTTP with the model attributes.

So instead of having a person.drl:

package io.engine.models;

declare Person
    name : String
    age : Integer
end

I would receive something like this through HTTP

{
   "model": "Person",
   "schema": [{
        "attribute": "name",
        "type": "String"
    }, {
        "attribute": "age",
        "type": "Integer"
    }]
}

Are there any tools or a built-in Drools implementation to achieve this?

0 Answers0