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

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Sun Apr 29 11:23:40 EDT 2007


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

Michael

I added the integration of the conversion to the BRXMLContentHandler and added the test case in ServiceImplementationTest. Look for the test named: testBinaryPackageCompileAndExecuteWithBRXML.

The only thing I'm not sure is how you differentiate Strings from other constants, like numbers in the model. For instance, in the test, I wanted to set the integer "age" field of the person object. As a way to differentiate the value from a regular String value, I made it a "formula", adding the "=" as the first character. Although, I'm not sure that this is the best way of doing it. Can you plz advise what you imagined for that?

Example:

This:

        ActionSetField action = new ActionSetField("p");
        ActionFieldValue value = new ActionFieldValue("age", "=42");
        action.addFieldValue( value );

Is converted to (in DRL):

       p.setAge( 42 );

Thanks.

> 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