[rules-users] Importing Fact model in Eclipse
Kris Verlaenen
kris.verlaenen at cs.kuleuven.be
Thu Apr 8 14:26:14 EDT 2010
Ansgar,
If you are constructing a guided rule, you should define your imports etc. in a separate file, called drools.package in the same directory. When you used the wizard to create the guided rule, it should be there already. Add your imports there. If you then open the guided editor, the dropdown should contain the imported classes for you to use.
Kris
----- Original Message -----
From: Shailesh Hedaoo
To: rules-users at lists.jboss.org
Sent: Friday, April 02, 2010 11:13 PM
Subject: Re: [rules-users] Importing Fact model in Eclipse
i have the JAR in classpath. i also added the java domain project in the "project references".
but when i create a "guided rule", in the when condition of "guidedl rule" - it gives me a 'choose fact model' dropdown which is empty.
i read somewhere that i need to specify all globals or imports. But i wanst able to figure that out exactly.
looking forward to some more help :).
------------------------------------------------------------------------------
Date: Fri, 2 Apr 2010 22:59:18 +0200
From: ansgar.konermann at googlemail.com
To: rules-users at lists.jboss.org
Subject: Re: [rules-users] Importing Fact model in Eclipse
On 02.04.2010 22:48, Shailesh Hedaoo wrote:
Hi
I have created a Drools project and trying to create a guided rule in Eclipse 3.5 and Drools 5.0.x.
I have my own domain objects in another java project to be used by Drools project.
I want to use the java domain model as the "fact model" in my Drools project.
How is that done ? Do i have to go thru the web based "guvnor" first ?
All I m planing to have is a simple java project which has java classes of my domain model of POJOs and in my Drools project i want to use them as "fact model". How do i do it in eclipse IDE ?
Should suffice to add the fact model jar to the classpath of the project containing your rules source code. That's how we did it when still working with Eclipse (now switched to IDEA).
If you don't want to compile the jar beforehand, on the rules project's root folder, right-click "build path" -> "configure build path", select "Projects" tab, click "Add", check your fact model project and confirm everything.
Kind regards
Ansgar
------------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100408/744248d6/attachment.html
More information about the rules-users
mailing list