[rules-users] Latest Build for 4.0?

2007-08-05 Thread Arjun Dhar
Hi,
 on the user forum, a post was sent to update from
http://labs.jboss.com/drools/downloads. (JAR Last updated 24th Jul 07)

I also took an update from:
http://repository.jboss.com/maven2/org/drools/ (JAR Last updated 31st Jul 07)

...or should I just simply take the latest build from maven ???

A little confused about the latest and/or most stable.

Thanks,
Arjun



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


Re: [rules-users] Latest Build for 4.0?

2007-08-05 Thread Fernando Meyer
These are the same artifacts, just the maven upload was a bit delayed  
comparing to downloads page.


Fernando Meyer http://fmeyer.org
[EMAIL PROTECTED]
PGP: 0xD804DDFB



On Aug 5, 2007, at 9:51 AM, Arjun Dhar wrote:


Hi,
 on the user forum, a post was sent to update from
http://labs.jboss.com/drools/downloads. (JAR Last updated 24th Jul 07)

I also took an update from:
http://repository.jboss.com/maven2/org/drools/ (JAR Last updated  
31st Jul 07)


...or should I just simply take the latest build from maven ???

A little confused about the latest and/or most stable.

Thanks,
Arjun



___
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] nested accessors with Sets

2007-08-05 Thread Fernando Meyer

Mark

Thanks for you help.
Regards

Fernando Meyer http://fmeyer.org
[EMAIL PROTECTED]
PGP: 0xD804DDFB



On Aug 4, 2007, at 4:00 PM, [EMAIL PROTECTED] wrote:


Edson,

I opened ticket # 1058 for this - http://jira.jboss.com/jira/browse/ 
JBRULES-1058


Thank you,
Mark

 -- Original message --
From: Edson Tirelli [EMAIL PROTECTED]

Mark,

Hmmm, something is going on with mvel integration... bellow  
must work.
There are work arounds (like using plain java code, or using  
multiple
patterns), but I think we need to fix that. Can you please include  
this info

in the ticket.

Thanks,

 []s
 Edson

2007/8/2, [EMAIL PROTECTED] [EMAIL PROTECTED]:


Edson,

Thank you for the response. I tried writing the in-line eval as  
suggested

but get this Exception:

org.drools.rule.InvalidRulePackage: Unable to determine the used
declarations : [Rule name=State, agendaGroup=MAIN, salience=0,
no-loop=false]
   at org.drools.rule.Package.checkValidity(Package.java:408)
   at org.drools.common.AbstractRuleBase.addPackage(
AbstractRuleBase.java:288)
   at [...]

This is my rule:

rule State
   dialect mvel
   when
   $ca:CandidateAssociation( eval ( !
nurseDetails.stateLicensures.contains( patientDetails.state ) ) )
   then
   retract( $ca );
end

I haven't yet but, plan to open an issue in JIRA as requested

Thanks for your help.
Mark






From: Edson Tirelli [EMAIL PROTECTED]
Date: August 2, 2007 6:48:58 PM GMT-03:00
To: Rules Users List rules-users@lists.jboss.org
Subject: Re: [rules-users] nested accessors with Sets



Mark,

Hmmm, something is going on with mvel integration... bellow  
must work.
There are work arounds (like using plain java code, or using  
multiple patterns), but I think we need to fix that. Can you please  
include this info in the ticket.


Thanks,

 []s
 Edson

2007/8/2, [EMAIL PROTECTED]  [EMAIL PROTECTED]:
Edson,

Thank you for the response. I tried writing the in-line eval as  
suggested but get this Exception:


org.drools.rule.InvalidRulePackage: Unable to determine the used  
declarations : [Rule name=State, agendaGroup=MAIN, salience=0, no- 
loop=false]

   at org.drools.rule.Package.checkValidity (Package.java:408)
   at org.drools.common.AbstractRuleBase.addPackage 
(AbstractRuleBase.java:288)

   at [...]

This is my rule:

rule State
   dialect mvel
   when
   $ca:CandidateAssociation( eval ( !  
nurseDetails.stateLicensures.contains( patientDetails.state ) ) )

   then
   retract( $ca );
end

I haven't yet but, plan to open an issue in JIRA as requested

Thanks for your help.
Mark


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


Re: [rules-users] Guided editor (BRL) rules in the drools-examples-brms dont work

2007-08-05 Thread Fernando Meyer

Hi Eduardo,

	Probably you missed some importing statement in your package  
configuration, check this please;


Regards

Fernando Meyer http://fmeyer.org
[EMAIL PROTECTED]
PGP: 0xD804DDFB



On Aug 4, 2007, at 4:49 PM, Edgardo wrote:

Hi list, I post my problem in the rules-dev list. The problem is  
execute the Driver is Crazy, Driver is too old and Driver  
special age Approved rules. I have the problem of the next section:



Edgardo wrote:
Yes, I did it, in the package configuration. I use the  
drools-4.0.0-brms version. The problem is at the moment to  
evaluate the next generate code of the rule:


then
Rejection fact0 = new Rejection();
fact0.setReason( Driver too old );
insert( fact0 );

If I use the Technical rule text editor, i dont have any problem.

Greetings from Chile :)

En Fri, 03 Aug 2007 19:06:05 -0400, Mark Proctor  
[EMAIL PROTECTED] escribió:



did you upload your model and import it?

Mark
Edgardo wrote:
Hi rules-dev list, (my english is very poor, sorry) I am  
interested in using the
BRMS of JBoss Rules, but when I use the guided editor, this  
rules dont
work, and in drools-examples-brms example, this dont work too,  
the error message (in the

Driver is Crazy rule)is:

RuleAgent(insuranceconfig) INFO (Fri Aug 03 16:05:58 CLT 2007):  
Adding

package called org.acme.insurance
org.mvel.CompileException: class or class reference not found:  
Rejection()

at
org.mvel.optimizers.impl.asm.ASMAccessorOptimizer.optimizeObjectCr 
eation(ASMAccessorOptimizer.java:1771) at
org.mvel.ast.NewObjectNode.getReducedValueAccelerated 
(NewObjectNode.java:49) at org.mvel.MVELRuntime.execute 
(MVELRuntime.java:87)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:98)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:93)

at
org.mvel.ast.TypedVarNode.getReducedValueAccelerated 
(TypedVarNode.java:36) at org.mvel.MVELRuntime.execute 
(MVELRuntime.java:87)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:98)

at org.mvel.MVEL.executeExpression(MVEL.java:202)
at org.drools.base.mvel.MVELConsequence.evaluate 
(MVELConsequence.java:32)
at org.drools.common.DefaultAgenda.fireActivation 
(DefaultAgenda.java:545)
at org.drools.common.DefaultAgenda.fireNextItem 
(DefaultAgenda.java:509)

at
org.drools.common.AbstractWorkingMemory.fireAllRules 
(AbstractWorkingMemory.java:430) at
org.drools.common.AbstractWorkingMemory.fireAllRules 
(AbstractWorkingMemory.java:392) at
org.acme.insurance.launcher.InsuranceBusiness.testDriverCrazy 
(InsuranceBusiness.java:93) at
org.acme.insurance.launcher.InsuranceBusiness.executeExample 
(InsuranceBusiness.java:19) at  
org.acme.insurance.launcher.MainClass.main(MainClass.java:13)
org.drools.spi.ConsequenceException: org.mvel.CompileException:  
class or

class reference not found: Rejection()
at org.drools.common.DefaultAgenda.fireActivation 
(DefaultAgenda.java:549)
at org.drools.common.DefaultAgenda.fireNextItem 
(DefaultAgenda.java:509)

at
org.drools.common.AbstractWorkingMemory.fireAllRules 
(AbstractWorkingMemory.java:430) at
org.drools.common.AbstractWorkingMemory.fireAllRules 
(AbstractWorkingMemory.java:392) at
org.acme.insurance.launcher.InsuranceBusiness.testDriverCrazy 
(InsuranceBusiness.java:93) at
org.acme.insurance.launcher.InsuranceBusiness.executeExample 
(InsuranceBusiness.java:19) at  
org.acme.insurance.launcher.MainClass.main(MainClass.java:13)
Caused by: org.mvel.CompileException: class or class reference  
not found:

Rejection()
at
org.mvel.optimizers.impl.asm.ASMAccessorOptimizer.optimizeObjectCr 
eation(ASMAccessorOptimizer.java:1771) at
org.mvel.ast.NewObjectNode.getReducedValueAccelerated 
(NewObjectNode.java:49) at org.mvel.MVELRuntime.execute 
(MVELRuntime.java:87)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:98)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:93)

at
org.mvel.ast.TypedVarNode.getReducedValueAccelerated 
(TypedVarNode.java:36) at org.mvel.MVELRuntime.execute 
(MVELRuntime.java:87)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:98)

at org.mvel.MVEL.executeExpression(MVEL.java:202)
at org.drools.base.mvel.MVELConsequence.evaluate 
(MVELConsequence.java:32)
at org.drools.common.DefaultAgenda.fireActivation 
(DefaultAgenda.java:545)

... 6 more

Thanks :), I am waiting for you response...



___
rules-dev mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/rules-dev






___
rules-dev mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/rules-dev




--
Edgardo Ibañez O.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




[rules-users] Simple Example / Tutorial

2007-08-05 Thread Robert Burdick
Hello All:

 

I'm still finding the samples that I've come across far too obtuse to easily
illustrate how JBoss Rules works.  I really need the worlds simplest working
example (no missing code files as in many of the examples) with a tutorial /
description that really explains what's going on.  You've all been through
this: can anyone share how they got going?

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


Re: [rules-users] Guided editor (BRL) rules in the drools-examples-brms dont work

2007-08-05 Thread Edgardo

Hi fernando, the package source code is:

package org.acme.insurance
import org.acme.insurance.Driver
import org.acme.insurance.Approve
import org.acme.insurance.Policy
import org.acme.insurance.Rejection

...

rule Driver is crazy
dialect mvel
when
		Driver( age = 2025 , locationRiskProfile == HIGH , name ==  
Fernando Meyer )

Policy( type == PROBLEMATIC )
then
Rejection fact0 = new Rejection();
fact0.setReason( Go away drunk );
insert( fact0 );
end

...

I import this from repository_export.xml in the resource folder, and for  
fire Driver is crazy rule, I append the next code to InsuranceBusiness  
class:


public void executeExample() throws Exception {
RuleBase ruleBase = loadRuleBase();

testUnsafeDriver(ruleBase);
testSafeMature(ruleBase);
testUnsafeAreaAndPriors(ruleBase);
testDriverIsCrazy(ruleBase);  //- This
}

/*** And this method ***/

private void testDriverCrazy(RuleBase ruleBase) {
StatefulSession session = ruleBase.newStatefulSession();

Driver driver = new Driver();
driver.setAge(new Integer(23));
driver.setLocationRiskProfile(HIGH);
driver.setName(Fernando Meyer);

Policy policy = new Policy();
policy.setType(PROBLEMATIC);
policy.setApproved(false);

session.insert(driver);
session.insert(policy);
session.fireAllRules();
}

In the example you dont fire the rules where I have the problems

Thanks and sorry again for my english

Greetings

En Sun, 05 Aug 2007 11:46:14 -0400, Fernando Meyer [EMAIL PROTECTED]  
escribió:



Hi Eduardo,

	Probably you missed some importing statement in your package  
configuration, check this please;


Regards

Fernando Meyer http://fmeyer.org
[EMAIL PROTECTED]
PGP: 0xD804DDFB



On Aug 4, 2007, at 4:49 PM, Edgardo wrote:

Hi list, I post my problem in the rules-dev list. The problem is  
execute the Driver is Crazy, Driver is too old and Driver special  
age Approved rules. I have the problem of the next section:



Edgardo wrote:
Yes, I did it, in the package configuration. I use the  
drools-4.0.0-brms version. The problem is at the moment to evaluate  
the next generate code of the rule:


then
Rejection fact0 = new Rejection();
fact0.setReason( Driver too old );
insert( fact0 );

If I use the Technical rule text editor, i dont have any problem.

Greetings from Chile :)

En Fri, 03 Aug 2007 19:06:05 -0400, Mark Proctor  
[EMAIL PROTECTED] escribió:



did you upload your model and import it?

Mark
Edgardo wrote:
Hi rules-dev list, (my english is very poor, sorry) I am interested  
in using the
BRMS of JBoss Rules, but when I use the guided editor, this rules  
dont
work, and in drools-examples-brms example, this dont work too, the  
error message (in the

Driver is Crazy rule)is:

RuleAgent(insuranceconfig) INFO (Fri Aug 03 16:05:58 CLT 2007):  
Adding

package called org.acme.insurance
org.mvel.CompileException: class or class reference not found:  
Rejection()

at
org.mvel.optimizers.impl.asm.ASMAccessorOptimizer.optimizeObjectCr 
eation(ASMAccessorOptimizer.java:1771) at
org.mvel.ast.NewObjectNode.getReducedValueAccelerated 
(NewObjectNode.java:49) at org.mvel.MVELRuntime.execute 
(MVELRuntime.java:87)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:98)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:93)

at
org.mvel.ast.TypedVarNode.getReducedValueAccelerated 
(TypedVarNode.java:36) at org.mvel.MVELRuntime.execute 
(MVELRuntime.java:87)
at org.mvel.CompiledExpression.getValue 
(CompiledExpression.java:98)

at org.mvel.MVEL.executeExpression(MVEL.java:202)
at org.drools.base.mvel.MVELConsequence.evaluate 
(MVELConsequence.java:32)
at org.drools.common.DefaultAgenda.fireActivation 
(DefaultAgenda.java:545)
at org.drools.common.DefaultAgenda.fireNextItem 
(DefaultAgenda.java:509)

at
org.drools.common.AbstractWorkingMemory.fireAllRules 
(AbstractWorkingMemory.java:430) at
org.drools.common.AbstractWorkingMemory.fireAllRules 
(AbstractWorkingMemory.java:392) at
org.acme.insurance.launcher.InsuranceBusiness.testDriverCrazy 
(InsuranceBusiness.java:93) at
org.acme.insurance.launcher.InsuranceBusiness.executeExample 
(InsuranceBusiness.java:19) at  
org.acme.insurance.launcher.MainClass.main(MainClass.java:13)
org.drools.spi.ConsequenceException: org.mvel.CompileException:  
class or

class reference not found: Rejection()
at org.drools.common.DefaultAgenda.fireActivation 
(DefaultAgenda.java:549)
at org.drools.common.DefaultAgenda.fireNextItem 
(DefaultAgenda.java:509)

at

Re: [rules-users] Simple Example / Tutorial

2007-08-05 Thread Dr. Gernot Starke

Robert,

1.) I did some illustration around a HelloWorld example on http:// 
rbs.gernotstarke.de/samples/samples/hellorules.html


There's no code to download - but the explanation might be helpful.

2.) An excellent explanation on the mechanisms of a production rule  
engine is given in the ruleworks user guide, look here:

http://www.ruleworks.co.uk/uguide/rwug1.html

It explains the recognize-match-act cycle (which is called  
differently in JBoss-Drools, but works VERY similar)


3.) Use a debugger to step through the simple Drools examples... use  
the DebugEventListener to get detailed info on rule

activation  execution...

enjoy,
Gernot

Am 05.08.2007 um 18:54 schrieb Robert Burdick:


Hello All:



I’m still finding the samples that I’ve come across far too obtuse  
to easily illustrate how JBoss Rules works.  I really need the  
worlds simplest working example (no missing code files as in many  
of the examples) with a tutorial / description that really explains  
what’s going on.  You’ve all been through this: can anyone share  
how they got going?


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


Dr. Gernot Starke
Doing IT Right

---
Willi-Lauf Allee 43, D-50858 Köln
[EMAIL PROTECTED],
 +49 (0) 177 - 728 2570
http://www.gernotstarke.de
Blog: http://it-and-more.blogspot.com

Das freie Portal für Software-Architekten:
http://www.arc42.de


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


[rules-users] Is there a method to return running jBoss Rules version

2007-08-05 Thread Chris Barham
Hi,
Is there a method in Jboss Rules that returns the current running versions
of the rule engine, and the compiler?

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