On 10/05/2011 09:07, Mark Proctor wrote: > On 10/05/2011 08:10, Veit Guna wrote: >> Hi. >> >> Any chance that this could be reviewed and maybe integrated into the >> release? >> >> https://jira.jboss.org/browse/JBRULES-2672 > I'm in two minds on this. Edson and I are thinking of changing the xml > parser to just be: > <Pattern object-type="xxxx"> > <expr>......</expr> > <expr>......</expr> > <expr>......</expr> > </Pattern> > > With any valid expression allwed in expr, i.e. any combinatino of ||, > &&, method calls, +, - etc. Which follows what we've done with free-form > drl. > Our current approach to normalising expressions in XMl isn't working too > well, and the more we extropolate that the worse it gets: > <dro:pattern object-type="String"> > <dro:and-constraint-connective> > <dro:field-constraint field-name="this"> > <dro:literal-restriction evaluator="!=" value="null"/> > </dro:field-constraint> > <dro:field-constraint field-name="this.toLowerCase"> > <dro:literal-restriction evaluator="==" value="true"/> > </dro:field-constraint> > </dro:and-constraint-connective> > <dro:from> > <dro:expression>fctv_17263.getHeaderValues("X-My-Header"); > </dro:expression> > </dro:from> > </dro:pattern> > > But I do recognise that you patch might give a lifeline to existing XML > users.... I should add that I ripped out most of the handler validation parent/peer stuff already. This was necessary to get the new compiler working, and <expr> actually already works, see DumperTest. <lhs> <forall> <pattern object-type="State"> <field-binding field-name="state" identifier="state" /> </pattern>
<pattern object-type="Person"> <expr> status == state </expr> <field-binding field-name="likes" identifier="likes" /> </pattern> </forall> </lhs> Mark > Mark > >> _______________________________________________ >> rules-dev mailing list >> rules-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-dev >> >> > > _______________________________________________ > rules-dev mailing list > rules-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-dev > > _______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev