Marina wrote:
Hello,
I am working on a project that requires a rules engine to handle numerous rules for
approval chain determination. My main choice at the moment is JBoss Rules engine. One
issue came up though that I could not find a good answer in the documentation:
Is it possible to create rules programmatically via a public API? We already have a
(pretty complex) admin screen as part of our application where users can build conditions
and specify desired approval chains using the UI, integrated with all our back end stuff
(domain objects, permissions, common look&feel, etc.). It would be a huge overhead to
serialize these rules into DRL/XML files/streams and then have the rules engine parse them
again....
Best bet is code generation, using a template approach such as MVEL. I
would not recommend you programmatically create rules, it is too complex
for users. If you really must do this then I recommend you look at some
of the unit tests in drools-compiler - remember this is not a stable api
and can change.
JSR94 solves the problem of handling rules once they are read from
rule files, but there is nothing about creating and persisting rules, unless I missed it.
Don't use JSR94.
thanks,
Marina
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users