[rules-users] Can I solve the 'Zebra Puzzle' in drools?

2011-06-15 Thread Miles Wen
hello everybody,
I have some trouble in solving the 'Zebra
Puzzlehttp://en.wikipedia.org/wiki/Zebra_Puzzle'
using drools5.
I defined a class named 'House' to represent the data, and the corresponding
enums as well : Color.java, Nation.java, Pet.java, Drink.java,
Cigarette.java, here are those sources:

House.java:
public class House {

// 颜色
public Color color;
// 房子从左数的位置 1-5
public int position;
public Nation nation;
public Pet pet;
public Drink drink;
public Cigarette cigarette;
..

Color.java:

public enum Color {
red, yellow, blue, green, ivory
}

Nation.java:

public enum Nation {
englishman, spaniard, norwegian, ukrainian, japanese
}

Pet.java:

public enum Pet {
dog, fox, snails, horse, zebra
}

Drink.java:

public enum Drink {
orangeJuice, tea, coffee, milk, water
}

Cigarette.java:

public enum Cigarette {
kools, chesterfields, winston, luckyStrike, parliaments
}

And this is my drl file:

package com.sample

import com.sample.fh.*

rule 英国人住在红色的房子里
when
$h1:House(nation == Nation.englishman, color != Color.red)
$h2:House(color == Color.red)
then
System.out.println(英国人(englishman)住在红色(red)的房子里);
modify($h2){setColor($h1.color)};
modify($h1){setColor(Color.red)};
end

rule 西班牙人养了一条狗
when
$h1:House(nation == Nation.spaniard)
$h2:House(pet == Pet.dog, nation != Nation.spaniard)
then
System.out.println(西班牙人(spaniard)养了一条狗(dog));
modify($h2){setPet($h1.pet)};
modify($h1){setPet(Pet.dog)};
end

rule 挪威人住在左边的第一个房子里
when
$h1:House(position == 1, nation != Nation.norwegian)
$h2:House(nation == Nation.norwegian)
then
System.out.println(挪威人(norwegian)住在左边的第一个房子里);
modify($h2){setNation($h1.nation)};
modify($h1){setNation(Nation.norwegian)};
end

rule 黄房子里的人喜欢抽kools牌的香烟
when
$h1:House(color == Color.yellow, cigarette != Cigarette.kools)
$h2:House(cigarette == Cigarette.kools)
then
System.out.println(黄房子(yellow)里的人喜欢抽kools牌的香烟);
modify($h2){setCigarette($h1.cigarette)};
modify($h1){setCigarette(Cigarette.kools)};
end

rule 抽chesterfields牌香烟的人与养狐狸的人是邻居
when
$h1:House(cigarette == Cigarette.chesterfields, pet != Pet.fox)
$h2:House(pet == Pet.fox)
$h3:House(eval(position - $h2.position == 1) || eval(position -
$h2.position == -1))
eval($h1.position - $h2.position != 1  $h1.position - $h2.position
!= -1)
then
System.out.println(抽chesterfields牌香烟的人与养狐狸(fox)的人是邻居);
int tmp = $h3.position;
modify($h3){setPosition($h1.position)};
modify($h1){setPosition(tmp)};
end
rule 抽chesterfields牌香烟的人与养狐狸的人是同一人
when
$h1:House(cigarette == Cigarette.chesterfields, pet == Pet.fox)
$h2:House(eval(position - $h1.position == 1) || eval(position -
$h1.position == -1))
then
System.out.println(抽chesterfields牌香烟的人与养狐狸的人是同一人);
modify($h1){setPet($h2.pet)};
modify($h2){setPet(Pet.fox)};
end

rule 挪威人住在蓝色的房子旁边
when
$h1:House(nation == Nation.norwegian)
$h2:House(color == Color.blue)
$h3:House(eval(position - $h2.position == 1) || eval(position -
$h2.position == -1))
eval($h1.position - $h2.position != 1  $h1.position - $h2.position
!= -1)
then
System.out.println(挪威人(norwegian)住在蓝色(blue)的房子旁边);
modify($h1){setNation($h3.nation)};
modify($h3){setNation(Nation.norwegian)};
end

rule 抽winston牌香烟的人养了一只蜗牛
when
$h1:House(cigarette == Cigarette.winston)
$h2:House(pet == Pet.snails, cigarette != Cigarette.winston)
then
System.out.println(抽winston牌香烟的人养了一只蜗牛(Snails));
modify($h2){setPet($h1.pet)};
modify($h1){setPet(Pet.snails)};
end

rule 抽LuckyStrike牌香烟的人喜欢喝桔子汁
when
$h1:House(cigarette == Cigarette.luckyStrike)
$h2:House(drink == Drink.orangeJuice, cigarette !=
Cigarette.luckyStrike)
then
System.out.println(抽Lucky Strike牌香烟的人喜欢喝桔子汁(orange juice));
modify($h2){setDrink($h1.drink)};
modify($h1){setDrink(Drink.orangeJuice)};
end

rule 乌克兰人喜欢喝茶
when
$h1:House(nation == Nation.ukrainian)
$h2:House(drink == Drink.tea, nation != Nation.ukrainian)
then
System.out.println(乌克兰人(ukrainian)喜欢喝茶(tea));
modify($h2){setDrink($h1.drink)};
modify($h1){setDrink(Drink.tea)};
end

rule 日本人抽parliaments牌的烟
when
$h1:House(nation == Nation.japanese)
$h2:House(cigarette == Cigarette.parliaments, nation !=
Nation.japanese)
then
System.out.println(日本人(japanese)抽parliaments牌的烟);
modify($h2){setCigarette($h1.cigarette)};
modify($h1){setCigarette(Cigarette.parliaments)}
end

rule 抽kools牌的香烟的人与养马的人是邻居
when
$h1:House(cigarette == Cigarette.kools)
$h2:House(pet == Pet.horse)
$h3:House(eval(position - $h2.position == 1) || eval(position -

Re: [rules-users] drools-ant

2011-06-15 Thread Leonardo Gomes
Hi,

You can have a look at this thread for a maven alternative:
http://drools.46999.n3.nabble.com/maven-drools-plugin-to-compile-DRL-s-at-build-time-td725751.html

Cheers,
Leo.

2011/6/13 Abhay B. Chaware abhay.chaw...@kpitcummins.com

  How do I compile only rule (.drl) files into packages ?   I read that
 drools-ant can be used to compile rules, but not getting any information
 about using the drools-ant. How do I use drools-ant ?  Is that the only way
 to compile rules ? Any other options ?



 -abhay



 This message contains information that may be privileged or confidential
 and is the property of the KPIT Cummins Infosystems Ltd. It is intended only
 for the person to whom it is addressed. If you are not the intended
 recipient, you are not authorized to read, print, retain copy, disseminate,
 distribute, or use this message or any part thereof. If you receive this
 message in error, please notify the sender immediately and delete all copies
 of this message. KPIT Cummins Infosystems Ltd. does not accept any liability
 for virus infected mails.

 ___
 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


Re: [rules-users] Can I solve the 'Zebra Puzzle' in drools?

2011-06-15 Thread FrankVhh
Hi,

This is a puzzling one... but then again, I believe that is the idea.

I should have a very close look at it, but a loop always suggests that there
are rules that re-activate themselves or eachother.

For example:

rule 抽kools牌的香烟的人与养马的人是邻居
when
$h1:House(cigarette == Cigarette.kools)
$h2:House(pet == Pet.horse)
$h3:House(eval(position - $h2.position == 1) || eval(position -
$h2.position == -1))
eval($h1.position - $h2.position != 1  $h1.position - $h2.position
!= -1)
then
System.out.println(抽kools牌的香烟的人与养马(horse)的人是邻居);
modify($h1){setCigarette($h3.cigarette)};
modify($h3){setCigarette(Cigarette.kools)};
end

In this rule, $h3 and $h1 might be the same house OR $h1 and $h2 might be
the same house. I think you need to add extra constraints to make sure that
all 3 houses are different.

But still, I haven't had a thorough look at all the rules neither did I
refresh my knowledge of the zebrapuzzle, so I am not sure whether this is a
complete answer (if any).

Please let us know.

Regards,
Frank


--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Can-I-solve-the-Zebra-Puzzle-in-drools-tp3066485p3067138.html
Sent from the Drools: User forum mailing list archive at Nabble.com.

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


[rules-users] Guvnor 5.2.0 CR1 support Chinese?

2011-06-15 Thread cleverpig
hi,all friends!

I'm newbie at Drools.

When deploying Guvnor 5.2.0 CR1 from compiling source code that checked out
from git and trying to use the Chinese local (
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.html?locale=zh_CN),
all characters only display as english.

I check old issue(GUVNOR
901):https://issues.jboss.org/browse/GUVNOR-901,but they
are different.
Is there any way to do that?

Thank for any reply  help.

-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: cleverpig.name/dan/
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
Sina MicroBlog: t.sina.com.cn/cleverpig
OpenSource Project: github.com/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0 CR1 support Chinese?

2011-06-15 Thread cleverpig
I create a issue: https://issues.jboss.org/browse/GUVNOR-1480

On Wed, Jun 15, 2011 at 10:06 PM, cleverpig greatclever...@gmail.comwrote:

 hi,all friends!

 I'm newbie at Drools.

 When deploying Guvnor 5.2.0 CR1 from compiling source code that checked out
 from git and trying to use the Chinese local (
 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.html?locale=zh_CN),
 all characters only display as english.

 I check old issue(GUVNOR 901):
 https://issues.jboss.org/browse/GUVNOR-901,but they are different.
 Is there any way to do that?

 Thank for any reply  help.

 --
 cleverpig(Dan)
 Location: Beijing
 Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
 Zipcode: 100031
 MSN: great_liu...@hotmail.com
 QQ: 149291732
 Skype: cleverpigatmatrix
 Facebook ID:cleverpig
 Blog: cleverpig.name/dan/
 Tags: del.icio.us/cleverpig
 Twitter: twitter.com/cleverpig
 Sina MicroBlog: t.sina.com.cn/cleverpig
 OpenSource Project: github.com/cleverpig
 Organization: www.beijing-open-party.org
 Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294




-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: cleverpig.name/dan/
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
Sina MicroBlog: t.sina.com.cn/cleverpig
OpenSource Project: github.com/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] M1 Vs CR1

2011-06-15 Thread Saleem Lakhani
Hi guys,

 

Just wanted to know what is the difference b/w Drools 5.2 M1 and Drools
5.2 CR1?

 

Thanks,

saleem

 

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


Re: [rules-users] Can I solve the 'Zebra Puzzle' in drools?

2011-06-15 Thread Wolfgang Laun
This puzzle can be solved using forward chaining, i.e., by using Drools or
any similar RBS, but it isn't possible by implementing the givens as rules,
expecting that an increase in the filled-in values will result in a (the)
solution. Certainly, it is possible to write a rule such as

rule EnglishRed
when
$h: House( nationality == null  colour == Colour.RED ||
   nationality == Nationality.ENGLISHMAN  colour == null )
then
modify( $h ){
setNationality( Nationality.ENGLISHMAN ),
setColour( Colour.RED )
}
end

which adds red or Englishman to a House as soon as the other property is
present. But this approach comes to a standstill as soon as more
sophisticated mental processes are required in the manual solution
technique.

One approach I've tried successfully is to generate all permutations of
animals, colours, drinks, nationalities and smokes (120 each), insert them
as facts, and to write one big rule according to the givens. A similar
approach uses facts consisting of an attribute indication (animal,...
smoke), a value and a reference to a House, again starting with all possible
associations and using one rule to select the attribute combinations
satisfying the givens.

I'm not quite sure how the rules presented by Miles should work, but I don't
think that swapping values between House facts is going to work, even when
more defensive strategies against looping are employed.

-W







On 15 June 2011 14:47, FrankVhh frank.vanhoensho...@agserv.eu wrote:

 Hi,

 This is a puzzling one... but then again, I believe that is the idea.

 I should have a very close look at it, but a loop always suggests that
 there
 are rules that re-activate themselves or eachother.

 For example:

 rule 抽kools牌的香烟的人与养马的人是邻居
when
$h1:House(cigarette == Cigarette.kools)
$h2:House(pet == Pet.horse)
$h3:House(eval(position - $h2.position == 1) || eval(position -
 $h2.position == -1))
eval($h1.position - $h2.position != 1  $h1.position - $h2.position
 != -1)
then
System.out.println(抽kools牌的香烟的人与养马(horse)的人是邻居);
modify($h1){setCigarette($h3.cigarette)};
modify($h3){setCigarette(Cigarette.kools)};
 end

 In this rule, $h3 and $h1 might be the same house OR $h1 and $h2 might be
 the same house. I think you need to add extra constraints to make sure that
 all 3 houses are different.

 But still, I haven't had a thorough look at all the rules neither did I
 refresh my knowledge of the zebrapuzzle, so I am not sure whether this is a
 complete answer (if any).

 Please let us know.

 Regards,
 Frank


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/rules-users-Can-I-solve-the-Zebra-Puzzle-in-drools-tp3066485p3067138.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.

 ___
 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


Re: [rules-users] Can I solve the 'Zebra Puzzle' in drools?

2011-06-15 Thread FrankVhh
Hi,

Just a last quick reply before getting stuck in a traffic jam.

As said, I haven't had a real good look at the rules, but imo they might be
able to work when you feed the engine an initial solution. I.e. insert five
house objects into working memory with a random assignment of the
attributes. The engine could then re-arrange the objects until all
constraints are satisfied.

But again, I am not really certain about these statements, but it is an
interesting topic to think about...

Regards,
Frank 



Wolfgang Laun-2 wrote:
 
 This puzzle can be solved using forward chaining, i.e., by using Drools or
 any similar RBS, but it isn't possible by implementing the givens as
 rules,
 expecting that an increase in the filled-in values will result in a (the)
 solution. Certainly, it is possible to write a rule such as
 
 rule EnglishRed
 when
 $h: House( nationality == null  colour == Colour.RED ||
nationality == Nationality.ENGLISHMAN  colour == null )
 then
 modify( $h ){
 setNationality( Nationality.ENGLISHMAN ),
 setColour( Colour.RED )
 }
 end
 
 which adds red or Englishman to a House as soon as the other property
 is
 present. But this approach comes to a standstill as soon as more
 sophisticated mental processes are required in the manual solution
 technique.
 
 One approach I've tried successfully is to generate all permutations of
 animals, colours, drinks, nationalities and smokes (120 each), insert them
 as facts, and to write one big rule according to the givens. A similar
 approach uses facts consisting of an attribute indication (animal,...
 smoke), a value and a reference to a House, again starting with all
 possible
 associations and using one rule to select the attribute combinations
 satisfying the givens.
 
 I'm not quite sure how the rules presented by Miles should work, but I
 don't
 think that swapping values between House facts is going to work, even when
 more defensive strategies against looping are employed.
 
 -W
 
 
 
 
 
 
 
 On 15 June 2011 14:47, FrankVhh lt;frank.vanhoensho...@agserv.eugt;
 wrote:
 
 Hi,

 This is a puzzling one... but then again, I believe that is the idea.

 I should have a very close look at it, but a loop always suggests that
 there
 are rules that re-activate themselves or eachother.

 For example:

 rule 抽kools牌的香烟的人与养马的人是邻居
when
$h1:House(cigarette == Cigarette.kools)
$h2:House(pet == Pet.horse)
$h3:House(eval(position - $h2.position == 1) || eval(position -
 $h2.position == -1))
eval($h1.position - $h2.position != 1  $h1.position -
 $h2.position
 != -1)
then
System.out.println(抽kools牌的香烟的人与养马(horse)的人是邻居);
modify($h1){setCigarette($h3.cigarette)};
modify($h3){setCigarette(Cigarette.kools)};
 end

 In this rule, $h3 and $h1 might be the same house OR $h1 and $h2 might be
 the same house. I think you need to add extra constraints to make sure
 that
 all 3 houses are different.

 But still, I haven't had a thorough look at all the rules neither did I
 refresh my knowledge of the zebrapuzzle, so I am not sure whether this is
 a
 complete answer (if any).

 Please let us know.

 Regards,
 Frank


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/rules-users-Can-I-solve-the-Zebra-Puzzle-in-drools-tp3066485p3067138.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.

 ___
 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
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Can-I-solve-the-Zebra-Puzzle-in-drools-tp3066485p3067695.html
Sent from the Drools: User forum mailing list archive at Nabble.com.

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


Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage

2011-06-15 Thread lhorton
Does anyone have a working example of how to compile a decision table xls to
a package file (in code, not in guvnor), and then how to read that package
file in using knowledge agent applyChangeSet()?

My code above (that causes exception) is based on the Drools Expert
documentation sample code, but does not work.  

the spreadsheet is not the problem, because I can load it into guvnor and
build the package from guvnor, and the guvnor-created package loads ok with
the knowledge agent.  But if I stream out the package from my own code, the
resulting pkg file will not load using knowledge agent.  

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-KnowledgeAgent-exception-while-trying-to-deserialize-KnowledgeDefinitionsPackage-tp3064043p3068459.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to the set drools.dialect.mvel.strict usingDrools+Spring?

2011-06-15 Thread Nicolás Sanchez

Thx for the answer, but I have tried the line you recommended and it is not
working.
My rules tests used to work on drools 5.1.1 but now in drools 5.2.0.GR1 they
don't.

The error that appears when in run the test is this:

[Error: unable to resolve method using strict-mode: ...
[Near : {... actuator.writeOutput(kcontext, hashMap. }]

this actuator is global variable and writeOutput method is call in the RHS.

Nicolas,

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-How-to-the-set-drools-dialect-mvel-strict-using-Drools-Spring-tp3064468p3068581.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage

2011-06-15 Thread Wolfgang Laun
For the KnowledgeAgent, a resource of type PKG is a single KnowledgePackage
object; reading is done like this, according to KnoledgeAgentImpl

InputStream is = null;
KnowledgePackageImp kpkg = null;
try {
is = resource.getInputStream();
Object object = DroolsStreamUtils.streamIn( is );
if ( object instanceof KnowledgePackageImp ) {
kpkg = ((KnowledgePackageImp) object);
} else {
kpkg = new KnowledgePackageImp( (Package) object );
}
for ( Rule rule : kpkg.pkg.getRules() ) {
rule.setResource( resource );
}

} catch ( Exception ex ) {
 ...
} finally {
 ...
}
return kpkg;

-W

2011/6/14 Lisa Horton lhor...@abclegal.com

  Drools 5.1.1

 I create a package from a decision table:

 ObjectOutputStream out;

 try {

 out = new
 ObjectOutputStream(new FileOutputStream(“venue.pkg”));


 out.writeObject(knowledgeBase.getKnowledgePackages()); // knowledgeBase
 previously loaded from spreadsheet

 out.close();

 } catch (IOException ex) {


 logger.debug(ex.getMessage());

 }



 I can load this package directly into a knowledge base and run rules with
 no errors:

 ObjectInputStream in;

 CollectionKnowledgePackage packages =
 null;

 try {

 in = new
 ObjectInputStream(new FileInputStream(“venue.pkg”));

 packages =
 (CollectionKnowledgePackage) in.readObject();

 in.close();

 } catch (Exception ex) {


 logger.debug(ex.getMessage());

 }


 knowledgeBase.addKnowledgePackages(packages);



 HOWEVER if I try to load the same package using a knowledge agent:

 KnowledgeAgent kagent =
 KnowledgeAgentFactory.newKnowledgeAgent(TheAgent);


 kagent.applyChangeSet(ResourceFactory.newFileResource(“ChangeSet.xml”));



 The package does not load.  Any idea of the cause of these exceptions?



 [2011:06:165 10:06:159:info] ResourceChangeNotification created

 [2011:06:165 10:06:161:info] ResourceChangeScanner reconfigured with
 interval=60

 [2011:06:165 10:06:161:info] ResourceChangeScanner created with default
 interval=60

 [2011:06:165 10:06:162:debug] ResourceChangeNotification monitor added
 monitor=org.drools.io.impl.ResourceChangeScannerImpl@5c73a7ab

 [2011:06:165 10:06:163:debug] KnowledgeAgent building resource map

 [2011:06:165 10:06:163:info] KnowledegAgent has started listening for
 ChangeSet notifications

 [2011:06:165 10:06:163:info] KnowledgeAgent created, with configuration:

 monitorChangeSetEvents=true scanResources=true scanDirectories=true
 newInstance=true

 [2011:06:165 10:06:413:info] KnowledgeAgent applying ChangeSet

 [2011:06:165 10:06:415:debug] KnowledgeAgent notifier subscribing to
 resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']

 [2011:06:165 10:06:415:debug] ResourceChangeNotification subscribing
 listener=org.drools.agent.impl.KnowledgeAgentImpl@5fe0f2f6 to
 resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']

 [2011:06:165 10:06:416:debug] ResourceChangeScanner subcribing
 notifier=org.drools.io.impl.ResourceChangeNotifierImpl@296f25a7 to
 resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']

 [2011:06:165 10:06:416:debug] KnowledgeAgent rebuilding KnowledgeBase using
 ChangeSet

 [2011:06:165 10:06:556:exception]

 java.lang.RuntimeException: KnowledgeAgent exception while trying to
 deserialize KnowledgeDefinitionsPackage

 at
 org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:664)

 at
 org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:889)

 at
 org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:704)

 at
 org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:584)

 at
 org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)

 at
 org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:168)

 at
 com.abclegal.rules.RulesUtilities.createKnowledgeBaseUsingAgent(RulesUtilities.java:91)

 at
 com.abclegal.rules.RulesBenchmarks.benchmarkVenueSelection(RulesBenchmarks.java:39)

 at 

Re: [rules-users] How to the set drools.dialect.mvel.strict usingDrools+Spring?

2011-06-15 Thread Joe White
Can you paste the rule that is failing? I'll see if I can create a unit test in 
drools to see if we can reproduce it and open a Jira for it.

Joe

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Nicolás Sanchez
Sent: Wednesday, June 15, 2011 12:07 PM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] How to the set drools.dialect.mvel.strict 
usingDrools+Spring?


Thx for the answer, but I have tried the line you recommended and it is not
working.
My rules tests used to work on drools 5.1.1 but now in drools 5.2.0.GR1 they
don't.

The error that appears when in run the test is this:

[Error: unable to resolve method using strict-mode: ...
[Near : {... actuator.writeOutput(kcontext, hashMap. }]

this actuator is global variable and writeOutput method is call in the RHS.

Nicolas,

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-How-to-the-set-drools-dialect-mvel-strict-using-Drools-Spring-tp3064468p3068581.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
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


[rules-users] Volcano update

2011-06-15 Thread Kris Verlaenen
http://blog.athico.com/2011/06/argentina-june-workshop-friday.html
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] M1 Vs CR1

2011-06-15 Thread jkrupka
http://docs.jboss.org/drools/release/5.2.0.CR1/droolsjbpm-introduction-docs/html_single/index.html#d0e47
has the highlights

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-M1-Vs-CR1-tp3067640p3069532.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0 CR1 support Chinese?

2011-06-15 Thread Jervis Liu
Hi, the default fast build only compiles English. You need to do a full 
build using mvn clean install -Dfull.


Cheers,
Jervis

On 2011/6/15 22:09, cleverpig wrote:

I create a issue: https://issues.jboss.org/browse/GUVNOR-1480

On Wed, Jun 15, 2011 at 10:06 PM, cleverpig greatclever...@gmail.com 
mailto:greatclever...@gmail.com wrote:


hi,all friends!

I'm newbie at Drools.

When deploying Guvnor 5.2.0 CR1 from compiling source code that
checked out from git and trying to use the Chinese local

(http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/Guvnor.html?locale=zh_CN),
all characters only display as english.

I check old issue(GUVNOR
901):https://issues.jboss.org/browse/GUVNOR-901,but they are
different.
Is there any way to do that?

Thank for any reply  help.

-- 
cleverpig(Dan)

Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com mailto:great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: cleverpig.name/dan/ http://cleverpig.name/dan/
Tags: del.icio.us/cleverpig http://del.icio.us/cleverpig
Twitter: twitter.com/cleverpig http://twitter.com/cleverpig
Sina MicroBlog: t.sina.com.cn/cleverpig
http://t.sina.com.cn/cleverpig
OpenSource Project: github.com/cleverpig http://github.com/cleverpig
Organization: www.beijing-open-party.org
http://www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294




--
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com mailto:great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: cleverpig.name/dan/ http://cleverpig.name/dan/
Tags: del.icio.us/cleverpig http://del.icio.us/cleverpig
Twitter: twitter.com/cleverpig http://twitter.com/cleverpig
Sina MicroBlog: t.sina.com.cn/cleverpig http://t.sina.com.cn/cleverpig
OpenSource Project: github.com/cleverpig http://github.com/cleverpig
Organization: www.beijing-open-party.org 
http://www.beijing-open-party.org

Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294


___
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