Mauricio,
I would like to take this example as the base to play around. That is what
I did:
1. Make a project "try" that generates the HellowWorld for me in Eclipse.
2. add directory "log"
3. Move file Guess.java to the Java/com/sample directory. Move Guess.drl
and Guss.rf to rule directory.
4. Change Package and Implort location from org/drools/examples to
com/sample in the above three files.
Eclipse shows compiler error pointing to ShoppingExample.*class. *
**
*I did the same to Shopping.java and Shopping.drl and the compiler error is
removed, and the following is the run time error messages:*
**
*
Exception in thread "main" java.lang.IllegalArgumentException: Unknown
process ID: Number Guess
at org.drools.common.AbstractWorkingMemory.startProcess(
AbstractWorkingMemory.java:1615)
at org.drools.common.AbstractWorkingMemory.startProcess(
AbstractWorkingMemory.java:1604)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(
StatefulKnowledgeSessionImpl.java:267)
at com.sample.NumberGuessExample.main(NumberGuessExample.java:38)
*
Could you please point me the right direction?
Thanks,
Tak
**
**
**
**
**
**
**
**
**
**
**
**
**
**
**
**
2009/6/10 Mauricio Salatino <salaboy(a)gmail.com>
This is only a reference to know in which class loader is the
resource...
The idea is to know that the resource (in this case: NumberGuess.drl and
NumberGuess.rf) is in the same class loader that the ShoppingExample.*
class*
2009/6/10 Tak-po Li <takpo.li(a)gmail.com>
>
> I am a newbie with Drools rules. I just download the examples. I notice
> in line19 of NumberGuessExample.java, there are two statement that
> referring to ShoppingExample.*class.*
>
> It seems this is different example. Could someone help me out?
>
> Thanks,
>
> Tak
>
>
>
> kbuilder.add( ResourceFactory.*newClassPathResource*(
> "NumberGuess.drl",
>
> ShoppingExample.
> *class* ),
>
> ResourceType.
> *DRL* );
>
> kbuilder.add( ResourceFactory.*newClassPathResource*(
> "NumberGuess.rf",
>
> ShoppingExample.
> *class* ),
>
> ResourceType.
> *DRF* );
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
-
http://salaboy.wordpress.com
-
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users