Geoffrey The aim is to create a set of rules that can be used to validate trade documents at various stages of their life cycle. Starting with creation in a web app, through processing in a BPM layer. The trade is represented as a xml doc which is good as far as it goes, i.e. giving us good structure, but there is a forest of little rules that need to be applied to the trade doc. Both to individual elements and across element, such a the total of quantity attributes in one set of elements must equal the total of quantity attributes in an other set of elements By using Drools, which we successfully use to manage a very large number of simple but related objects to manage a large and complex single object such as a large xml doc, I feel we gain a lot from using the common technology. The main advantage I see here is that we can define a library of rules which we can use and combine to create a really powerful trade validation tool. Martyn
-----Original Message----- From: Geoffrey Wiseman [mailto:[EMAIL PROTECTED] Sent: 07 November 2005 15:10 To: [email protected] Subject: Re: [drools-user] Applying rules to an xml document On 11/7/05, Martyn Bedford <[EMAIL PROTECTED]> wrote: > > I would like to achieve the following > > Assert a single xml document to working memory and fire a rule base > against the doc, the rule base will consist of a number of rules that govern > the behaviour of different parts of the doc. > Interesting; I'm not entirely sure that I clearly understand what you're doing and what value you're trying to get from the rule engine here, which might somewhat help to pick an approach. Can anyone give me some pointers on how I should assert the doc to working > memory, i.e. is it a good idea to assert a single fact or break the xml > doc down into a number of separate facts; and how I target individual > elements of the doc, I would naturally lean towards using xpath to address > specific elements of the doc. > If you're looking to use something like XPath, then it seems as if supplying the entire document would make sense. However, then I begin to wonder if you're going to get a lot of value out of the rule engine that you won't get out of Java and XPath already. You may, if you have a lot of little rules to run on a large XML document, and/or need to change them regularly, but ... curious. Either way, I hope you report back on your experiences, this use of Drools would be novel to me at least. - Geoffrey Martyn > > <http://www.greenhatconsulting.com/><http://www.greenhatconsulting.com> > > *Martyn Bedford* > > *Head of Solutions Practice* > > *Green Hat* > 107-111 Fleet Street > London > EC4A 2AB > > Tel: +44 20 7936 9303 > Fax: +44 (0) 20 7936 9243 > Mobile: 0777 585 2584 > > *www.greenhatconsulting.com* <http://www.greenhatconsulting.com> > > <http://www.greenhatconsulting.com/emailfooter/index.html><http://www.gr eenhatconsulting.com/emailfooter/index.html><http://www.greenhatconsulti ng.com/emailfooter/index.html><http://www.greenhatconsulting.com/emailfo oter/index.html> > > Registered in England and Wales as company number 3395844 and having its > registered office at Lynton House, 7-12 Tavistock Square, London, WC1H 9LY. > The information in this internet E-mail is confidential and is intended > solely for the addressee. Unless you are the named addressee (or authorised > to receive it for the addressee) you may not copy or use it, or disclose it > to anyone else. Any views or opinions presented are solely those of the > author and do not necessarily represent those of Green Hat Consulting Ltd. > If you are not the intended recipient please contact > [EMAIL PROTECTED] > > -- Geoffrey Wiseman
