[rules-users] Call functions from other functions?

2007-06-29 Thread Ru

Hello rules-users,

Is it possible to call from functions other (same, if recursive) 
functions in jbossrules 3.0.6? in 4.0.0?


Thanks in advance.
Sincerely,
   Ru
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] question about DSL, nested values

2007-06-29 Thread Michael Neale

Hi Matt.

yeah mapping deep hierarchies in a way that anyone can understand is not
that easy. You can have helper methods on your objects to give you
functionality. eg if you don't care which address you are talking about,
then you could do something like:

Person (  , (hasAddress(blah)) )

assuming there is a hasAddress method on Person - which then iterates
through for you. Or you have a function to do it for you.

You can do things like

There is a Person
 - has an address of 'blah'

where -has an address of '{blah}'==(checkAddress(this, {blah}) )
that will use a function checkAddress, and apply it to the fact (which is
the Person). So you can span lines that way rather then coming up with
combinations.




On 6/26/07, Matt Geis [EMAIL PROTECTED] wrote:


Hi,
I'm encountering some conceptual issues trying to get something done with
JBossRules.

What I'd like to do is to create a DSL that allows our non-technical users
to have some very flexible options for accessing nested properties in an
object.

Ideally I'd like to allow them to

1.  Access certain cryptically named properties by easy-to-understand
aliases.
2.  Use boolean operators such as and/or
3.  Use comparators such as ==, , , etc.
4.  Use the above in nested clauses (see below).

For example, take a Person, which has the following properties...

String name
Date birthdate
Address[] addresses
Phone[] phones

Address has the following properties:
String street, city, state, zip;

Phone has...
String areaCode, exchange, line:

Most frequently, the rules will operate to find out if a given object
in a nested collection meets certain property criteria, and if so, to
identify the first object that does and call out that fact in the THEN
clause of the rule.

Here's a sample use case.  If the user has one or more phones with an area
code of 415, print San Francisco.

Pseudo-code...

rule
when
There is a person with a phone with area code equals '415'
then
   Output San Francisco
end

So, there is a person clearly equates to something like p:Person()...

but where I'm getting stuck is the rest of it.  I dont' want to come up
with ALL possible permutations of the object's properties, so having
something like p:Person(phone[0].areaCode == '415') is not an option.  Not
only does it fail to address ALL the phones, it's hard-coded.

I couldn't find any documentation on using the 'contains' operator for
anything other than Collections of Strings ($shop.cheeses contains
'stilton').  I could imagine something like...

in DRL: p:Person(phones contains phone.areaCode == '415')  (yes, very
pseudocode, I know)

Other thoughts I've had, but I have no experience with them, are whether
MVEL projections or accumulator functions would be of use.  I could see ways
where I could find out if a nested item met certain criteria (project all
area codes for phones into a collection, then see if that collection
'contains' the desired value, or use an accumulator function to examine all
objects and capture the index of the first one that matches).  Although that
might work (as I said, not sure here), I'm still not seeing how to do this
and still keep the end user flexibility I'm hoping for.

I'd like to have a list of names, like 'area code'  maps to 'areaCode' and
'street address' maps to 'street', and the user could plug them in on their
own, so they could just as easily also write (with no changes to the DSL)...

There is a person with an address with state equals 'MA'

I've thought about somehow using an eval() call, but I can't capture the
entire criteria string and pass it to a function in a global helper (the DSL
doesn't expand it, and just sends the String literal {criteria}
Even if that did work, I don't like the idea of circumventing the
declarative nature of the rules language.

I'd LOVE to be able to express this all in one rule, as it's business
users who will be working with the DSL.  If it were programmers, I'd
probably be ok with asking them to assert the Phone[], and have some other
rule act on that, but I don't think that will work for me.

On a side note, is there documentation or examples anywhere for getting
nested properties and using MVEL?

Any help and suggestions greatly appreciated.

Thanks,
Matt





Ready
for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.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] Design by Contract and Business Ruless

2007-06-29 Thread jv

Hi,   

I'm working in a project and I have the intention to express static
properties about the 
domain using Design by Contract and the Dynamic part using Rules (JBoss
Rules).

I want to know, what do you think about this?

Thanks
Javier
-- 
View this message in context: 
http://www.nabble.com/Design-by-Contract-and-Business-Ruless-tf3997252.html#a11352366
Sent from the drools - user 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] question about DSL, nested values

2007-06-29 Thread Edson Tirelli

  Another option is to use 'from'. I didn't tested that, but it should work
fine in trunk.

There is a Person
Whose address areaCode equals '415'

   Would be mapped to:

when
 p: Person()
 a: Address( areaCode == '415' ) from p.addresses
then
 ...
end

   Note that the kind of flexibility you are trying to achieve is not
simple by nature do to in a template engine (like DSL).

   Good luck and let us know plz how it goes.

   Regards,
Edson

2007/6/29, Michael Neale [EMAIL PROTECTED]:


Hi Matt.

yeah mapping deep hierarchies in a way that anyone can understand is not
that easy. You can have helper methods on your objects to give you
functionality. eg if you don't care which address you are talking about,
then you could do something like:

Person (  , (hasAddress(blah)) )

assuming there is a hasAddress method on Person - which then iterates
through for you. Or you have a function to do it for you.

You can do things like

There is a Person
  - has an address of 'blah'

where -has an address of '{blah}'==(checkAddress(this, {blah}) )
that will use a function checkAddress, and apply it to the fact (which is
the Person). So you can span lines that way rather then coming up with
combinations.




On 6/26/07, Matt Geis [EMAIL PROTECTED] wrote:

 Hi,
 I'm encountering some conceptual issues trying to get something done
 with JBossRules.

 What I'd like to do is to create a DSL that allows our non-technical
 users to have some very flexible options for accessing nested properties in
 an object.

 Ideally I'd like to allow them to

 1.  Access certain cryptically named properties by easy-to-understand
 aliases.
 2.  Use boolean operators such as and/or
 3.  Use comparators such as ==, , , etc.
 4.  Use the above in nested clauses (see below).

 For example, take a Person, which has the following properties...

 String name
 Date birthdate
 Address[] addresses
 Phone[] phones

 Address has the following properties:
 String street, city, state, zip;

 Phone has...
 String areaCode, exchange, line:

 Most frequently, the rules will operate to find out if a given object
 in a nested collection meets certain property criteria, and if so, to
 identify the first object that does and call out that fact in the THEN
 clause of the rule.

 Here's a sample use case.  If the user has one or more phones with an
 area code of 415, print San Francisco.

 Pseudo-code...

 rule
 when
 There is a person with a phone with area code equals '415'
 then
Output San Francisco
 end

 So, there is a person clearly equates to something like p:Person()...

 but where I'm getting stuck is the rest of it.  I dont' want to come up
 with ALL possible permutations of the object's properties, so having
 something like p:Person(phone[0].areaCode == '415') is not an
 option.  Not only does it fail to address ALL the phones, it's hard-coded.

 I couldn't find any documentation on using the 'contains' operator for
 anything other than Collections of Strings ($shop.cheeses contains
 'stilton').  I could imagine something like...

 in DRL: p:Person(phones contains phone.areaCode == '415')  (yes, very
 pseudocode, I know)

 Other thoughts I've had, but I have no experience with them, are whether
 MVEL projections or accumulator functions would be of use.  I could see ways
 where I could find out if a nested item met certain criteria (project all
 area codes for phones into a collection, then see if that collection
 'contains' the desired value, or use an accumulator function to examine all
 objects and capture the index of the first one that matches).  Although that
 might work (as I said, not sure here), I'm still not seeing how to do this
 and still keep the end user flexibility I'm hoping for.

 I'd like to have a list of names, like 'area code'  maps to 'areaCode'
 and 'street address' maps to 'street', and the user could plug them in on
 their own, so they could just as easily also write (with no changes to the
 DSL)...

 There is a person with an address with state equals 'MA'

 I've thought about somehow using an eval() call, but I can't capture the
 entire criteria string and pass it to a function in a global helper (the DSL
 doesn't expand it, and just sends the String literal {criteria}
 Even if that did work, I don't like the idea of circumventing the
 declarative nature of the rules language.

 I'd LOVE to be able to express this all in one rule, as it's business
 users who will be working with the DSL.  If it were programmers, I'd
 probably be ok with asking them to assert the Phone[], and have some other
 rule act on that, but I don't think that will work for me.

 On a side note, is there documentation or examples anywhere for getting
 nested properties and using MVEL?

 Any help and suggestions greatly appreciated.

 Thanks,
 Matt





 
Ready
 for the edge of your seat?
 Check out tonight's top picks on Yahoo! TV.
 

[rules-users] Compilation Issue in Rules

2007-06-29 Thread McShiv

I am getting the following error when I try to run the DSL and DRL file in
DROOLS 3.0.6. I checked the DSL and DRL file. The files doesn't have any
errors in it. 

ERROR: Unexpected token . in primary

Can anyone help me on this issue?

Thanks, 
McShiv.
-- 
View this message in context: 
http://www.nabble.com/Compilation-Issue-in-Rules-tf4001757.html#a11366482
Sent from the drools - user 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] Dynamic JavaBeans

2007-06-29 Thread Felipe Piccolini


Mark,

   I'v been trying to get the way to patch that, but I must confess  
that is way too complex for me now.. My best
guess is that when the update(retract/insert) is done, it just take  
the factHandle modified to rebuild the ReteRuleBase
so when the activations are setted in place this doesnt care about  
another fact update to fill the AgendaGroupImpl.


  I dont really know the best way to modify the code... I bow before  
u guys...


 Also tried your suggestion using something like : modify ( cheese )  
{ price = 25, quality = premium }


 But I get compilation erros saying that modify(myFact) is not  
defined... so I dont really know how to use
this MVEL functionality... got ur what is new in drools 4.0, search  
at examples and mailing-list, but cant get the right way

to make that work.

  If you could help me with any working example, or maybe a work- 
around... I sont wanna use a set of rules that must be writen in a
sequence mode using salience I need to write a lot of rules in an  
independent way.


Sorry for my english, and thank you very much.


On 28-06-2007, at 16:43, Mark Proctor wrote:

feel free to work on a patch for us and let us know what you come  
up with.


Mark
Felipe Piccolini wrote:

Mark,

   What about my previous mail where I report an issue with update  
using dynamic JavaBeans (using propertyListeners)?


The problem is that when the engine is fired again from an  
propertyListener the evaluations on conditions (seems to me)
dont take the new state of the Facts changed in the setAttribute  
call.


I will try using MVEL modify, but thats not the better solution,  
because the feature of propertyListerners inside javaBeans let

me write my rules in a cleaner way from BRMS/bussines editor.

Thanks.


On 28-06-2007, at 8:28, Mark Proctor wrote:

If it can be done cleanly I'm not averse to it. however there is  
something else...
In the new MVEL dialect you no longer need  
propertychangelisteners if you don't want to call update()


modify ( cheese ) { price = 25, quality = premium }

This will modify all the setters and notify the engine at the end  
of the block setter. Is that good enough for you?


Mark
Yuri de Wit wrote:

Mark,

btw, If this is a feature that makes sense from Drools pov I  
wouldnt

mind giving a shot at implementing it and contributing it back to
Drools.

-- yuri

On 6/28/07, Yuri de Wit [EMAIL PROTECTED] wrote:

Sure. The solution I am taking right now is dont use dynamic
properties, which is not optimal (depending on the problem  
property

changes not being batched defeats the purpose of dynamic beans).

The bottom line is that I was hoping that this feature would (1)
either already be taken care of in 4.0 or (2) become a feature  
request

for future releases.

-- yuri

On 6/28/07, Mark Proctor [EMAIL PROTECTED] wrote:
 No we don't do anything to batch property change listener  
results. But

 maybe you can do this yourself.
 instead of calling modify, add it to a transaction list (that  
you make
 available in the current context). Then at the end of the  
consequence

 you can iterate that list and call modify on each object. Or
 alternatively don't use dynamic properties.

 Mark
 Yuri de Wit wrote:
  I am not talking about assert, but modify. I have a dynamic  
fact
  already asserted but now I need to perform N changes on N  
different
  properties on the same object on the same consequence.  
Drools is going

  to traverse the RETE network N times once for each time the
  PropertiesListener is called (each setProperty called).
 
  -- yuri
 
  On 6/28/07, Mark Proctor [EMAIL PROTECTED] wrote:
  Why would doing the assert work at the end of the  
consequence be any

  quicker than doing it during the consequence?
 
  Mark
  Yuri de Wit wrote:
   I noticed that changes performed on facts asserted  
dynamically causes
   the fact to be modified right away and therefore  
triggering a RETE

   network traversal and rule schedulings.
  
   For apps with a large number of facts this could be a  
significant
   scalability problem. At least in my case, I would like  
to be able to
   use dynamic facts and perform any number of updates and  
have those
   updates commited to working memory only when the rule  
consequence is

   completed.
  
   Looking at the code, it seems that it would not be a  
major effort to
   collect the facts received by the  
ReteooWorkingMemory.propertyChange
   and perform the actual modifyObject() only when the  
consequence

   evaluation is actually completed.
  
   Does that makes sense? Or are there side effects I am  
not seeing? Is

   this a problem that 4.0 already resolves?
  
   thanks in advance,
  
   -- yuri
   ___
   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
  

[rules-users] Unexpected token . in primary - Rule Compilation Error

2007-06-29 Thread McShiv

com.package.FatalSystemException
at org.drools.rule.Package.checkValidity(Unknown Source)
at org.drools.reteoo.RuleBaseImpl.addPackage(Unknown Source)
at
com.sentry.underwriting.ruleexecutor.DroolsExecutor.executeRules(DroolsExecutor.java)
at
com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.callRulesExecutor(RulesExecutionProcessor.java:82)
at
com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.rulesExecutionprocess(RulesExecutionProcessor.java:65)
at
com.sentry.underwriting.ruleprocessor.RulesProcessor.processRules(RulesProcessor.java)
at
com.sentry.underwriting.test.UnderwritingDemo.main(UnderwritingDemo.java:21)
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error File
com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:
Unexpected token . in primary

... 7 more


I am using Drools 3.0.6 version.

I got the above message when the drl files are added to the RuleBase class. 

I debugged the code. The error was thrown when
ruleBase.addPackage(packageBuilder.getPackage()); line was called in the
DroolsExecutor class.

Can anyone please suggest me any sollution for this problem.

Thanks in addvance.

Thanks,
McShiv.
-- 
View this message in context: 
http://www.nabble.com/Unexpected-token-%22.%22-in-primary---Rule-Compilation-Error-tf4002948.html#a11369488
Sent from the drools - user 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] Unexpected token . in primary - Rule Compilation Error

2007-06-29 Thread Fernando Meyer

howdy,

is your package name right? please paste your rule code.

Fernando Meyer
[EMAIL PROTECTED]
GPG: 5A6D 3374 B055 A513 9A02  A03B 3DB3 7485 D804 DDFB


On Jun 29, 2007, at 10:16 PM, McShiv wrote:



com.package.FatalSystemException
at org.drools.rule.Package.checkValidity(Unknown Source)
at org.drools.reteoo.RuleBaseImpl.addPackage(Unknown Source)
at
com.sentry.underwriting.ruleexecutor.DroolsExecutor.executeRules 
(DroolsExecutor.java)

at
com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.callRules 
Executor(RulesExecutionProcessor.java:82)

at
com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.rulesExec 
utionprocess(RulesExecutionProcessor.java:65)

at
com.sentry.underwriting.ruleprocessor.RulesProcessor.processRules 
(RulesProcessor.java)

at
com.sentry.underwriting.test.UnderwritingDemo.main 
(UnderwritingDemo.java:21)
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation  
error File

com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:
Unexpected token . in primary

... 7 more


I am using Drools 3.0.6 version.

I got the above message when the drl files are added to the  
RuleBase class.


I debugged the code. The error was thrown when
ruleBase.addPackage(packageBuilder.getPackage()); line was called  
in the

DroolsExecutor class.

Can anyone please suggest me any sollution for this problem.

Thanks in addvance.

Thanks,
McShiv.
--
View this message in context: http://www.nabble.com/Unexpected- 
token-%22.%22-in-primary---Rule-Compilation-Error- 
tf4002948.html#a11369488

Sent from the drools - user 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] Unexpected token . in primary - Rule Compilation Error

2007-06-29 Thread McShiv

DRL Syntax
package com.policy;
expander SpeCodeSpeValProdPlan.dsl;
#list any import classes here.
import com.viking.common.transferbeans.CommonInformation;
import com.sentry.common.entitybeans.EntityBean;
import com.sentry.common.entitybeans.Selected;
import java.util.ArrayList;
import java.util.List;
#declare any global variables here

rule SpeCodeSpeValProdPlan11
salience 100 
 
 when
  The EntityBean Contains Selected List
 then
  Assert All The Selected 
end

rule SpeCodeSpeValProdPlan12
salience 50
 
 when
  The Question Code Is License And The Selected Value is Y
 then
  Remove The Product 09 And Plan CD
end

DSL Syntax: 

[when] The EntityBean Contains Selected List = entity : EntityBean();
eval(entity.getSelected() != null);
[then] Assert All The Selected = Object[] quoSelList = entity.getSelected();
for(int i = 0; i  quoSelList.length; i++){ Selected queSel =
(Selected)quoSelList[i]; assert(queSel); System.out.println(queSel); } 

[when] The Question Code Is {speCode1} And The Selected Value is
{speValue1} = common : CommonInformation(); Selected(stateSpecificCode ==
{speCode1}, stateSpecificValue == {speValue1});
[then] Remove The Product {prodCode1} And Plan {planCode1} =
if(common.getProd() == {prodCode1} || common.getPlan() ==
{planCode1}){System.out.println(Error);}


The Selected Class is an Object Array inside EntityBean Class.
CommonInformation is a seperate class. CommonInformation  EntityBean will
be available in Working Memory(asserted earlier in java class).

 I need to remove the Selected Classes in the Object array and assert into
the working memory. Thats what I am doing in the First Rule.

In the Second rule I check for some condition and print the error according
to the condition.
Thanks,
McShiv

Fernando Meyer Camargo wrote:
 
 howdy,
 
   is your package name right? please paste your rule code.
 
 Fernando Meyer
 [EMAIL PROTECTED]
 GPG: 5A6D 3374 B055 A513 9A02  A03B 3DB3 7485 D804 DDFB
 
 
 On Jun 29, 2007, at 10:16 PM, McShiv wrote:
 

 com.package.FatalSystemException
  at org.drools.rule.Package.checkValidity(Unknown Source)
  at org.drools.reteoo.RuleBaseImpl.addPackage(Unknown Source)
  at
 com.sentry.underwriting.ruleexecutor.DroolsExecutor.executeRules 
 (DroolsExecutor.java)
  at
 com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.callRules 
 Executor(RulesExecutionProcessor.java:82)
  at
 com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.rulesExec 
 utionprocess(RulesExecutionProcessor.java:65)
  at
 com.sentry.underwriting.ruleprocessor.RulesProcessor.processRules 
 (RulesProcessor.java)
  at
 com.sentry.underwriting.test.UnderwritingDemo.main 
 (UnderwritingDemo.java:21)
 Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation  
 error File
 com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:
 Unexpected token . in primary

  ... 7 more


 I am using Drools 3.0.6 version.

 I got the above message when the drl files are added to the  
 RuleBase class.

 I debugged the code. The error was thrown when
 ruleBase.addPackage(packageBuilder.getPackage()); line was called  
 in the
 DroolsExecutor class.

 Can anyone please suggest me any sollution for this problem.

 Thanks in addvance.

 Thanks,
 McShiv.
 -- 
 View this message in context: http://www.nabble.com/Unexpected- 
 token-%22.%22-in-primary---Rule-Compilation-Error- 
 tf4002948.html#a11369488
 Sent from the drools - user 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://www.nabble.com/Unexpected-token-%22.%22-in-primary---Rule-Compilation-Error-tf4002948.html#a11369670
Sent from the drools - user 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] Unexpected token . in primary - Rule Compilation Error

2007-06-29 Thread Michael Neale

hmm.. there is a problem with the action of the 2nd rule, so, converting it
to vanilla DRL:

rule SpeCodeSpeValProdPlan12
salience 50

when
 ...
then
 if(common.getProd() == {prodCode1} || common.getPlan() ==
{planCode1}){System.out.println(Error);}
end

That doesn't look quite right - you are doing == on strings - .equals would
be better). I would try that rule on its own, without a DSL - to see what is
causing it. Also - why are you doing the if on the RHS? I would get rid of
that if at all possible to save confusion later.

On 6/30/07, McShiv [EMAIL PROTECTED] wrote:



DRL Syntax
package com.policy;
expander SpeCodeSpeValProdPlan.dsl;
#list any import classes here.
import com.viking.common.transferbeans.CommonInformation;
import com.sentry.common.entitybeans.EntityBean;
import com.sentry.common.entitybeans.Selected;
import java.util.ArrayList;
import java.util.List;
#declare any global variables here

rule SpeCodeSpeValProdPlan11
salience 100

when
  The EntityBean Contains Selected List
then
  Assert All The Selected
end

rule SpeCodeSpeValProdPlan12
salience 50

when
  The Question Code Is License And The Selected Value is Y
then
  Remove The Product 09 And Plan CD
end

DSL Syntax:

[when] The EntityBean Contains Selected List = entity : EntityBean();
eval(entity.getSelected() != null);
[then] Assert All The Selected = Object[] quoSelList = entity.getSelected
();
for(int i = 0; i  quoSelList.length; i++){ Selected queSel =
(Selected)quoSelList[i]; assert(queSel); System.out.println(queSel); }

[when] The Question Code Is {speCode1} And The Selected Value is
{speValue1} = common : CommonInformation(); Selected(stateSpecificCode
==
{speCode1}, stateSpecificValue == {speValue1});
[then] Remove The Product {prodCode1} And Plan {planCode1} =
if(common.getProd() == {prodCode1} || common.getPlan() ==
{planCode1}){System.out.println(Error);}


The Selected Class is an Object Array inside EntityBean Class.
CommonInformation is a seperate class. CommonInformation  EntityBean will
be available in Working Memory(asserted earlier in java class).

I need to remove the Selected Classes in the Object array and assert into
the working memory. Thats what I am doing in the First Rule.

In the Second rule I check for some condition and print the error
according
to the condition.
Thanks,
McShiv

Fernando Meyer Camargo wrote:

 howdy,

   is your package name right? please paste your rule code.

 Fernando Meyer
 [EMAIL PROTECTED]
 GPG: 5A6D 3374 B055 A513 9A02  A03B 3DB3 7485 D804 DDFB


 On Jun 29, 2007, at 10:16 PM, McShiv wrote:


 com.package.FatalSystemException
  at org.drools.rule.Package.checkValidity(Unknown Source)
  at org.drools.reteoo.RuleBaseImpl.addPackage(Unknown Source)
  at
 com.sentry.underwriting.ruleexecutor.DroolsExecutor.executeRules
 (DroolsExecutor.java)
  at
 com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.callRules
 Executor(RulesExecutionProcessor.java:82)
  at
 com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.rulesExec
 utionprocess(RulesExecutionProcessor.java:65)
  at
 com.sentry.underwriting.ruleprocessor.RulesProcessor.processRules
 (RulesProcessor.java)
  at
 com.sentry.underwriting.test.UnderwritingDemo.main
 (UnderwritingDemo.java:21)
 Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation
 error File
 com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:
 Unexpected token . in primary

  ... 7 more


 I am using Drools 3.0.6 version.

 I got the above message when the drl files are added to the
 RuleBase class.

 I debugged the code. The error was thrown when
 ruleBase.addPackage(packageBuilder.getPackage()); line was called
 in the
 DroolsExecutor class.

 Can anyone please suggest me any sollution for this problem.

 Thanks in addvance.

 Thanks,
 McShiv.
 --
 View this message in context: http://www.nabble.com/Unexpected-
 token-%22.%22-in-primary---Rule-Compilation-Error-
 tf4002948.html#a11369488
 Sent from the drools - user 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://www.nabble.com/Unexpected-token-%22.%22-in-primary---Rule-Compilation-Error-tf4002948.html#a11369670
Sent from the drools - user 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