[rules-users] pulling data from external database

Fnu Mahalakshmi FMahalakshmi at nyx.com
Wed Jun 16 11:55:10 EDT 2010


Hi,
Yes. I need facts from the database. I will be query the database using a SOAP call. So I end up getting an XML input file as my fact input.
I am trying to use Smooks framework for this as suggested online. I downloaded the required JBoss Tool for it
But don't seem to be able to find much information on how to implement it.
I just got this snippet of code:
Smooks smooks = new Smooks("smooks-config.xml");
        DroolsSmooksConfiguration conf = new DroolsSmooksConfiguration("some name",null);
DroolsSmooksStatelessSession smooksSession = new DroolsSmooksStatelessSession (session,smooks, conf);

javax.xml.transform.Source xmlSource = new StreamSource(getClass().getResourceAsStream("name-of-data
-file.xml"))

smooksSession.executeFileter(xmlSource); 

Where do I get my smooks-config.xml file? And if I want to specify multiple input XML files can I just keep invoking this again for passing my input files?
javax.xml.transform.Source xmlSource = new StreamSource(getClass().getResourceAsStream("name-of-data
-file.xml"))

Please guide.Is there any better documentation for this? Or is there a better way to do this?

Thank you.
M


------------------------------

Message: 3
Date: Wed, 16 Jun 2010 11:05:30 -0400
From: David Sinclair <dsinclair at chariotsolutions.com>
Subject: Re: [rules-users] pulling data from external database
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<AANLkTinnulLHV1ivmWJeAR-Ay7a6d6GeLBnbdt62jLqE at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

There is no specific "way" of doing it with drools. You could use JDBC,
Spring, Hibernate, etc. The more important question is what data from a DB
do u need? Facts?

2010/6/16 Fnu Mahalakshmi <FMahalakshmi at nyx.com>

>  Hi,
>
>
>
> Could you point me towards some documentation which gives information on
> how I could pull data from my database with drools??
>
>  can I just do it by using JDBC (using this right now)? Is there any other
> way to it?
>
> Could not find it in the documentation online.
>
>
>
> Thank you
>
> M
>
> ------------------------------
>
> *Please consider the environment before printing this email.*
>
> *Visit our website at http://www.nyse.com
> *****************************************************************************
>
> Note: The information contained in this message and any attachment to it is
> privileged, confidential and protected from disclosure. If the reader of
> this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please notify the sender immediately by replying to
> the message, and please delete it from your system. Thank you. NYSE
> Euronext. *
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100616/f5438798/attachment.html 

------------------------------

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


End of rules-users Digest, Vol 43, Issue 97
*******************************************
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note:  The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system.  Thank you.  NYSE Euronext.





More information about the rules-users mailing list