You can change that looking at the properties of the process. Clicking in the background of the designer.

2009/6/10 Tak-po Li <takpo.li@gmail.com>
 
I look at Guess.rf the xml file.  I notice the Package and Import locations are pointing to the old location.  After I change them to the new one by hand.  The code works.
 
How can I change the above in Eclipse GUI interface?
 
Thanks,
 
Tak
 


 
2009/6/10 Mauricio Salatino <salaboy@gmail.com>
java.lang.IllegalArgumentException: Unknown process ID: Number Guess


That exceptions means that you probably don't add the process definition to the current knowledgeBuilder.
To see these kind of problems you probably need to add something like this after KnowledgeBuilder add calls:

if ( kbuilder.hasErrors() ) {
System.err.println( builder.getErrors().toString() );
}





2009/6/10 Tak-po Li <takpo.li@gmail.com>
 
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@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@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@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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



_______________________________________________
rules-users mailing list
rules-users@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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



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




--
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -