Yes,
How you do it depends on what you are wanting to do.
If you just want to use the newly created object from other rules then you should insert
it into the knowledge base.
If you just want to pass back your newly created object into your application then the
easiest way is to insert a global object into the knowledge base, you can then call
methods on this object to communicate from the rules into your application.
If you want to do both then the best way is to insert it into the knowledge base and then
use queries from your application to extract the facts you are interested in.
Reading
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/ht...
and looking at the samples and test cases in the drools codebase should help you get
further.
Thomas
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-
bounces(a)lists.jboss.org] On Behalf Of Kuttiraja
Sent: 17 May 2010 12:35
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Is it possible to access created Object inside RHS???
Hi,
I have some application using Drools.
Sample rule
rule "rule 1"
when
//some condition
then
Object a = new Object()
//Do Something with Object
end
is it possible to use this newly created object from the Application?
Thanks in advance
Kutti
--
View this message in context:
http://drools-java-rules-
engine.46999.n3.nabble.com/Is-it-possible-to-access-created-Object-inside...
tp823356p823356.html
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************