Hi,

First of all a big thank you for your responses.

Since I am replying after quite a few responses I am clubbing them in this mail.

The need that we have is to generate the XML (which is recognized by Drools) 
from a object structure. We have a UI where we capture the rules. Currently 
they (our own Object hierarchy representing the rules) are serialized using 
XStream. So one thought we had was to use XSL to convert this XML to the one 
being used by Drools. Velocity was also an option, but more comfortable with 
XSL currently :-). My only worry of using XSL was if later on in Drools the 
format is not acceptable (or modified) we need to change the XSL too.

Michael what you have suggested should work for us too (using 
decisiontables.model package). I will give it a shot. I also hope that the 
object structure in this package does not change frequently ;).

Regarding making it generic; I think we are still in nascent stage of 
understanding drools :-(. Once we gather enough knowledge then we can give it a 
try of making it generic :-).

Thanks.
Regards,
- Nimesh

-----Original Message-----
From: Michael Neale [mailto:[EMAIL PROTECTED]
Sent: Friday, December 02, 2005 7:24 AM
To: [email protected]; [EMAIL PROTECTED]
Subject: RE: [drools-dev] Object hierarchy to DRL file conversion


I didn't go as far as to use Velocity - but something like that could be
handy. I wanted to minimise dependencies initially. 

Note also that the DRL format in future will also have a non-xml format (XML
will be supported as well) so any tool should support artibrary output
(textual) format. 

If you want to work on something a little generic along these lines - such
that you can build up a syntax tree of DRL with POJOs, and then serialise it
to DRL in an appropriate format (ie support all SMFs, and XML, non xml
eventually etc) that would be IMMENSELY useful. Would give us a head start
in so many areas.

This is needed for a whole lot of front end tools, and stuff like rule
management and so on.

 Michael

-----Original Message-----
From: andrew mccormick (smileyy) [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 December 2005 10:12 AM
To: [email protected]
Subject: Re: [drools-dev] Object hierarchy to DRL file conversion

It sounds like a similar issue to one that I faced.  My solution was to use
Velocity templates to generate XML rule files that were then parsed into a
RuleBase.

On 12/1/05, Nimesh Muley <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> In our project we are trying to build a UI (web-based) on similar 
> lines of Quick Rules. In this regard I wanted to know whether there is 
> a conversion between an Object hierarchy to a DRL file (for Java). In 
> some earlier threads I saw that from DRL Java object hierarchy is 
> being built. If the reverse is also possible can someone guide me as to
how this can be done.
>
> We have our own Object hierarchy for the UI. So the thought process is 
> to convert this object hierarchy to the one acceptable to Drools and 
> then use the function to convert it to DRL file.
>
> Thanks.
> Regards,
> - Nimesh
>



--
[EMAIL PROTECTED] / [EMAIL PROTECTED]


MASTEK 
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCO

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
all computers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to