[jboss-jira] [JBoss JIRA] Commented: (JBRULES-647) RuleModel to populate Descr for rendering to DRL

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Thu Apr 26 17:27:30 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBRULES-647?page=comments#action_12360642 ] 
            
Edson Tirelli commented on JBRULES-647:
---------------------------------------

     Was talking to Fernando today about the ROM -> Descr conversion and we came to a conclusion. Besides all we talked about supporting directly ROM->Descr without serializing to DRL, if a rule is "contaminated" by a single DSL sentence, the whole rule MUST be expanded to a DRL and use the parser to convert it to a descriptor. That is because someone could write in the BRMS (mixing DSL and DRL sentences) something like:

rule xyz
when
    Cheese() // drl sentence
    - whose type is "brie" // dsl sentence
then
    // RHS
end

   In the above case, the DSL sentence is a constraint (type == "brie") that needs to be added to the Cheese() pattern. So, once contaminated by a DSL sentence, the direct conversion can't be done.
   Once we understand that we need to have a ROM -> DRL dumper for cases where the ROM is contaminated, the question that rises is "what good does us to have a ROM->Descr converter? does the performance gain of not using the parser justifies the disadvantage of code complexity and maintanance of another 'converter'?".

   I know I pushed for direct ROM->Descr conversion, but I didn't know about the DSL/DRL sentence mixing possibility. I would say now that we should simply:

1. drop the BRXMLtoDescrConverter
2. make BRLPersistence an interface and rename the current implementation to something like XMLBRLPersistence.
3. implement a DRLBRLPersistence to dump ROM to DRL format
4. create a new BRXMLtoDescrConverter that is simply a helper, higher level API that does ROM->DRL->Descr conversion using above class + drl parser.

   What do you think?

> RuleModel to populate Descr for rendering to DRL
> ------------------------------------------------
>
>                 Key: JBRULES-647
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-647
>             Project: JBoss Rules
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>            Reporter: Michael Neale
>         Assigned To: Edson Tirelli
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list