Convert Java POJO to Drools DRL and vice versa

与世无争的帅哥 提交于 2019-12-05 18:42:10

I am not sure what are your Java POJOs? Are they representing Rules, Patterns, Constraints, etc?

If so, Drools has an internal canonical model for representing all types of knowledge assets [1]. We do not recommend using it directly though, as it is an internal API and subject to change.

Another option for you is to use the actual rule descriptor builder API [2] to generate your rules dynamically [3].

Finally, if you have a web based UI and you want to allow users to author your rules in there, you have the option to embed guvnor's rule editor into your own application [4].

Hope this helps.

[1] https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/descr

[2] https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api

[3] https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/lang/api/DescrBuilderTest.java

[4] http://www.plugtree.com/guvnor-embed-asset%E2%80%99s-editor-in-your-application/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!