Proposed Solution:
Because the app code that performs step iii) is so convoluted and will need to be modified in order to support CEP, we want to pursue a more maintainable solution to provide the translation and abandon the mess that is already in the application. We feel that rewriting this code with the fluent API is just as dangerous as the present code. Additionally, the rules are far too variable to use Rule templating.
So, we propose to translate the client's custom rule assets and metadata into the Drools XML Language, parse the XML and dump out DRLs. We will likely need to use the existing intermediate POJOs for this. The most difficult piece in the puzzle by far is translating the LHS of rules, and of course this is the part that is broken currently in our system. We believe that it should be MUCH easier to translate the well formatted MathML representation of the LHS to the Drools XML schema using XSLT, than to translate it to PackageDescrs with Java code. There are also the additional benefits of validation and portability presented by XML. The downside here is that the XML language and tools are out of date, so we would need to develop these solutions first.
Both consultants on this project have been interested in contributing to the Drools project and we feel this could be the perfect entry point. We realize this is a complicated question and presenting it over email is limiting, so please feel free to contact me by phone.
Thank you,
---
Justin Holmes
Red Hat Consulting
410.599.8432 : mobile
http://www.redhat.com/consulting/