Maybe you would be better off leveraging Guvnor for the Rules Editing. Then you would
just need to develop a hook that calls JAXB to take an XML Schema to a Pojo Object Model
within the Guvnor system.
Brad Davis
Red Hat Consulting
Email: bdavis(a)redhat.com | c: 980.226.7865 |
http://www.redhat.com
----- Original Message -----
From: "aliosha79" <alex_orl1079(a)yahoo.it>
To: rules-users(a)lists.jboss.org
Sent: Monday, February 27, 2012 1:30:41 PM
Subject: Re: [rules-users] Drools facts using POJO accessor methods error
my use case is:
XmlDocument ---> via JaxbUnmarshaller ---> POJO java Document
I m implementing a rule editor...
This ruleeditor analyzes the xmldocument and graphically allows me to build
rules by selecting the document xml tree node... of course i can just build
several rules in this way... but for the field which the project is located
in, it's sufficient.
Now in those xml documents there could be sequences of elements which are
turned into java list by Jaxb.
The problem is:
According to my xml nodes selection (ie the node is a list or not)... i have
to be able to write the exact rule.
In the rule structure i have to find the constant parts and the variable
ones.
For a normal node element a possible rule structure is:
when
$Class : MyClass( property == 123)
then
do somthing!
end
For a list instead:
when
$Class : MyClass ($list :listProperty)
...( this.ListItem.Quantity.Value ==123 ) from $list
then
do something!
end
So, i'm trying to find a common form with the minimum variable parts to be
changed and to obtain a well written rule for both cases.
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-facts-using-POJO-accessor-method...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users