Drools rule language from Java API

The platform I use requires the Drools Rules Language (DRL), but for me it is more convenient to create rules in the Java API.

Is there a way to create rules in the Java API and then convert / migrate it to a DRL?

Thanks for the reply.

+5
source share
1 answer

Drools has a free API for creating rules, as Jeffrey mentioned, but it is not in the public API. You can use it, and it has been stable for several years, but you should know that over time changes can occur due to the fact that functions are added to the engine.

The API is used by the Drools parser itself. Here are a few unit tests you can use as examples:

https://github.com/droolsjbpm/drools/blob/6.3.x/drools-compiler/src/test/java/org/drools/compiler/lang/api/DescrBuilderTest.java#L451-L465

+4
source

All Articles