[rules-users] Regarding Package .Pkg

2007-10-03 Thread Drool_Beginner

Dear All,
Where I can get more information about .pkg, Since I have got  information
that  .drl file get converted in to pkg(Package), which is  writing  .drl
information into Stream.
Please send me some information as our requirement is some what to take
benifit from .pkg.
Thanks in Advance
Regards,
Abhishek
-- 
View this message in context: 
http://www.nabble.com/Regarding-Package-.Pkg-tf4560333.html#a13014401
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] Regarding Package .Pkg

2007-10-03 Thread Anstis, Michael \(M.\)
I think you might misunderstand.
 
A DRL file contains text defining rules. Each DRL file is assigned a package
name (much like Java).
 
The DRL file is loaded, parsed (PackageBuilder) and converted into a Package
instance. Packages are added to RuleBases from which WorkingMemory can be
obtained for rule execution.
 
There is no pkg file - the Java Package can be converted into a stream
using Java's ObjectOutputStream.
 
Have a look at 1.6. The Drools Rule Engine - 1.6.1. Overview in the
excellent documentation.


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner
Sent: 03 October 2007 08:53
To: rules-users@lists.jboss.org
Subject: [rules-users] Regarding Package .Pkg


Dear All, Where I can get more information about .pkg, Since I have got
information that .drl file get converted in to pkg(Package), which is
writing .drl information into Stream. Please send me some information as our
requirement is some what to take benifit from .pkg. Thanks in Advance
Regards, Abhishek 

  _  

View this message in context: Regarding
http://www.nabble.com/Regarding-Package-.Pkg-tf4560333.html#a13014401
Package .Pkg
Sent from the drools - user mailing
http://www.nabble.com/drools---user-f11823.html list archive at
Nabble.com.




smime.p7s
Description: S/MIME cryptographic signature
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Using java.util.List in rules

2007-10-03 Thread Bhattacharya, Sougata

If I want to test for all ith element, 

Like this 

 

rule Test
  
when
e : Especialista(retratoUser.lstCarac.get(i).codCarac != 0)
then 
System.out.println (test);
  
end

 

what should I do







From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli
Sent: Wednesday, October 03, 2007 6:10 AM
To: Rules Users List
Subject: Re: [rules-users] Using java.util.List in rules

 


   You can't explicitly call methods in the field name. Use MVEL special 
notation for lists:

e : Especialista(retratoUser.lstCarac[0].codCarac != 0)

[]s
Edson
 

2007/10/2, Anderson Pazza Mello [EMAIL PROTECTED]:

Hi everyone,

I'm trying to use a java.util.List like this:

rule Test
  
when
e : Especialista(retratoUser.lstCarac.get(0).codCarac != 0)
then 
System.out.println (test);
  
end

The property lstCarac is a java.util.ListCaracteristica. I'm getting this 
error :

org.drools.rule.InvalidRulePackage: [18,44]: unknown:18:44 Unexpected token 
'0'[18,46]: unknown:18:46 Unexpected token '.' 
at org.drools.rule.Package.checkValidity(Package.java:419)

Someone knows what i have to do to fix the problem??


-- 
Anderson Pazza Mello
Tecnologia em Informática - UFPR 
___
rules-users mailing list
rules-users@lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/rules-users




-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. 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.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Help me

2007-10-03 Thread prateek.katiyar

Hi 
 
I hava a rule file as:
 
?xml version=1.0 encoding=UTF-8?

package name=rules

xmlns=http://drools.org/drools-4.0;

xmlns:xs=http://www.w3.org/2001/XMLSchema-instance;

xs:schemaLocation=http://drools.org/drools-4.0 drools-4.0.xsd

import name=com.wipro.rfq.report.bean.Validator.RFQBean /

global identifier=rfq type=com.wipro.rfq.report.bean.Validator.RFQBean /

import name=com.wipro.loan.validation.bean.Final.LoanApplicationBean /

global identifier=loanApplication 
type=com.wipro.loan.validation.bean.Final.LoanApplicationBean /

rule name=Check_NotNullof_rfqId 

rule-attribute name=agenda-group value=Check/

rule-attribute name=auto-focus value=true/

lhs

eval(rfq.getM_rfqId() ==null) || (rfq.getM_rfqId().trim().equals())/eval

/lhs

rhs

System.out.println(The value of m_rfqId is null.);

/rhs

/rule 

rule name=Check_NotNullof_partId 

rule-attribute name=agenda-group value=Check/

rule-attribute name=auto-focus value=true/

lhs

eval(rfq.getM_partId() ==null) || 
(rfq.getM_partId().trim().equals())/eval

/lhs

rhs

System.out.println(The value of m_partId is null.);

/rhs

/rule 

rule name=validate_FullName

rule-attribute name=agenda-group value=validate-bean/

rule-attribute name=auto-focus value=true/

lhs

evaltrue/eval

/lhs

rhs

System.out.println(full name is null from xml);

/rhs

/rule

/package

As for the first two rules i declared the agenda group as Check.

Now i want to know that how will i write the code in my java program to 
activate this agenda group instead of MAIN.

I have already tried with the following option:

Agenda agenda=workingMemory.getAgenda();

AgendaGroup Check=agenda.getAgendaGroup(Check);

workingMemory.setFocus(Check);

workingMemory.fireAllRules();

But after this when i wrote System.out.println(The focussed agenda group is 
+workingMemory.getFocus());

Then the output was The focussed agenda group is AgendaGroup 'MAIN'

So now could you please help me.

 
With Regards
Prateek 
 
 
 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Package.clear() doesn't clear RuleFlows

2007-10-03 Thread ekke

Mark,
...just downloaded build832-rev15510-20071002-0845

but same as before:
the RuleFlow is still there after clear()
also after removeRuleFlow()

started eclipse -clean, verified that there are only jars from the snapshot

regards

ekke

Mark Proctor wrote:
 
 ekke wrote:
 there's no comment in JavaDoc, but I think a clear() on a Package
 should clear all Rules and all RuleFlows.

 but: after clear() the Rules went away, but the RuleFlows are still
 there.

 I tested the behaviour with
 getPackage().getRules().length;
 getPackage().getRuleFlows().size();

 getRules().length was Zero as expected
 getRuleFlows().size() was 1 as before the clean

 then I tried
 .removeRuleFlow(myID);

 but its still there.

 should I open a JIRA ?
   
 This is now fixed in trunk.
 ekke
   
 
 ___
 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/Package.clear%28%29-doesn%27t-clear-RuleFlows-tf4528722.html#a13014873
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] RE: Regarding Package .Pkg

2007-10-03 Thread Drool_Beginner

Thanks Anstis, 
for your clarification. Is there a way that I can directly manipulate
directly this PackageBuilder from my JAVA code . Instead of updating drl
file. 
Thanks  Regards,
Abhi..

Anstis, Michael (M.) wrote:
 
 I think you might misunderstand.
  
 A DRL file contains text defining rules. Each DRL file is assigned a
 package
 name (much like Java).
  
 The DRL file is loaded, parsed (PackageBuilder) and converted into a
 Package
 instance. Packages are added to RuleBases from which WorkingMemory can be
 obtained for rule execution.
  
 There is no pkg file - the Java Package can be converted into a stream
 using Java's ObjectOutputStream.
  
 Have a look at 1.6. The Drools Rule Engine - 1.6.1. Overview in the
 excellent documentation.
 
 
   _  
 
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner
 Sent: 03 October 2007 08:53
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Regarding Package .Pkg
 
 
 Dear All, Where I can get more information about .pkg, Since I have got
 information that .drl file get converted in to pkg(Package), which is
 writing .drl information into Stream. Please send me some information as
 our
 requirement is some what to take benifit from .pkg. Thanks in Advance
 Regards, Abhishek 
 
   _  
 
 View this message in context: Regarding
 http://www.nabble.com/Regarding-Package-.Pkg-tf4560333.html#a13014401
 Package .Pkg
 Sent from the drools - user mailing
 http://www.nabble.com/drools---user-f11823.html list archive at
 Nabble.com.
 
 
 
  
 ___
 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/Regarding-Package-.Pkg-tf4560333.html#a13015081
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] Help me

2007-10-03 Thread Anstis, Michael \(M.\)
Taken from the documentation:-

1.6.5.2. Agenda Groups


Agenda groups are a way to partition rules (activations, actually) on the
agenda. At any one time, only one group has focus which means that the
activations for rules in that group will only take effect - you can also
have rules auto focus which means the focus for its agenda group is taken
when that rules conditions are true.

They are sometimes known as modules in CLIPS terminology. Agenda groups
are a handy way to create a flow between grouped rules. You can switch the
group which has focus either from within the rule engine, or from the API.
If you rules have a clear need for multiple phases or sequences of
processing, consider using agenda-groups for this purpose.

Each time setFocus(...) is called it pushes that Agenda Group onto a stack,
when the focus group is empty it is popped off and the next one of the stack
evaluates. An Agenda Group can appear in multiple locations on the stack.
The default Agenda Group is MAIN, all rules which do not specify an Agenda
Group are placed there, it is also always the first group on the Stack and
given focus as default.

I would therefore assume that after all activations in the Check Agenda
Group executed, the MAIN Agenda Group received focus and remaining
activations processed.


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 03 October 2007 09:42
To: rules-users@lists.jboss.org
Subject: [rules-users] Help me



Hi 
 
I hava a rule file as:
 
?xml version=1.0 encoding=UTF-8?

package name=rules

xmlns=http://drools.org/drools-4.0;

xmlns:xs=http://www.w3.org/2001/XMLSchema-instance;

xs:schemaLocation=http://drools.org/drools-4.0 drools-4.0.xsd



import name=com.wipro.rfq.report.bean.Validator.RFQBean /

global identifier=rfq type=com.wipro.rfq.report.bean.Validator.RFQBean
/

import name=com.wipro.loan.validation.bean.Final.LoanApplicationBean /

global identifier=loanApplication
type=com.wipro.loan.validation.bean.Final.LoanApplicationBean /





rule name=Check_NotNullof_rfqId 

rule-attribute name=agenda-group value=Check/

rule-attribute name=auto-focus value=true/

lhs

eval(rfq.getM_rfqId() ==null) ||
(rfq.getM_rfqId().trim().equals())/eval

/lhs

rhs

System.out.println(The value of m_rfqId is null.);

/rhs

/rule 





rule name=Check_NotNullof_partId 

rule-attribute name=agenda-group value=Check/

rule-attribute name=auto-focus value=true/

lhs

eval(rfq.getM_partId() ==null) ||
(rfq.getM_partId().trim().equals())/eval

/lhs

rhs

System.out.println(The value of m_partId is null.);

/rhs

/rule 



rule name=validate_FullName

rule-attribute name=agenda-group value=validate-bean/

rule-attribute name=auto-focus value=true/

lhs

evaltrue/eval

/lhs

rhs

System.out.println(full name is null from xml);

/rhs

/rule





/package

As for the first two rules i declared the agenda group as Check.

Now i want to know that how will i write the code in my java program to
activate this agenda group instead of MAIN.

I have already tried with the following option:

Agenda agenda=workingMemory.getAgenda();

AgendaGroup Check=agenda.getAgendaGroup(Check);

workingMemory.setFocus(Check);

workingMemory.fireAllRules();

But after this when i wrote System.out.println(The focussed agenda group is
+workingMemory.getFocus());

Then the output was The focussed agenda group is AgendaGroup 'MAIN'

So now could you please help me.

 
With Regards
Prateek 
 
 
 

The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not
the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this
message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com




smime.p7s
Description: S/MIME cryptographic signature
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] RE: Regarding Package .Pkg

2007-10-03 Thread Anstis, Michael \(M.\)
Do you mean, once you've loaded a DRL file into a Package object you want to
modify rule definitions?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner
Sent: 03 October 2007 09:58
To: rules-users@lists.jboss.org
Subject: [rules-users] RE: Regarding Package .Pkg


Thanks Anstis, 
for your clarification. Is there a way that I can directly manipulate
directly this PackageBuilder from my JAVA code . Instead of updating drl
file. 
Thanks  Regards,
Abhi..

Anstis, Michael (M.) wrote:
 
 I think you might misunderstand.
  
 A DRL file contains text defining rules. Each DRL file is assigned a
 package
 name (much like Java).
  
 The DRL file is loaded, parsed (PackageBuilder) and converted into a
 Package
 instance. Packages are added to RuleBases from which WorkingMemory can be
 obtained for rule execution.
  
 There is no pkg file - the Java Package can be converted into a stream
 using Java's ObjectOutputStream.
  
 Have a look at 1.6. The Drools Rule Engine - 1.6.1. Overview in the
 excellent documentation.
 
 
   _  
 
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner
 Sent: 03 October 2007 08:53
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Regarding Package .Pkg
 
 
 Dear All, Where I can get more information about .pkg, Since I have got
 information that .drl file get converted in to pkg(Package), which is
 writing .drl information into Stream. Please send me some information as
 our
 requirement is some what to take benifit from .pkg. Thanks in Advance
 Regards, Abhishek 
 
   _  
 
 View this message in context: Regarding
 http://www.nabble.com/Regarding-Package-.Pkg-tf4560333.html#a13014401
 Package .Pkg
 Sent from the drools - user mailing
 http://www.nabble.com/drools---user-f11823.html list archive at
 Nabble.com.
 
 
 
  
 ___
 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/Regarding-Package-.Pkg-tf4560333.html#a13015081
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


smime.p7s
Description: S/MIME cryptographic signature
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Arrays help

2007-10-03 Thread Bhattacharya, Sougata

Hi All,

  I have a object graph like this

LineItem has array of Parameter and each Parameter has array of
NameValue and Namevalue object has name and value.

Now I have LineItem object in working memory, how to test the value of
each value of NameValue object.

 

LineItem--getParameters() returns Parameter[]

Parameter-getNameValueArray() return NameValue[]

Each NameValue has name and value attribute

Any help?

 

Ta

Sougata



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. 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.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
There are a number of ways...
 
Java dialect [requires LineItem, Parameter and NameValue to be asserted into
working memory]
 
rule a - requires object model change for parent property
when
$l : LineItem( )
$p : Parameter ( parent == $l )
$n : NameValue( parent == $p )
then
...
end
 
rule b
when
$n : NameValue( )
$p : Parameter ( nameValues contains $n )
$l : LineItem( parameters contains $p )
then
...
end
 
MVEL dialect
 
rule c
dialect mvel
when
$n :
my-mvel-syntax-lets-me-down-but-I-know-you-can-traverse-object-graphs-using-
it
then
...
end
 



  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bhattacharya,
Sougata
Sent: 03 October 2007 12:37
To: Rules Users List
Subject: [rules-users] Arrays help



Hi All,

  I have a object graph like this

LineItem has array of Parameter and each Parameter has array of  NameValue
and Namevalue object has name and value.

Now I have LineItem object in working memory, how to test the value of each
value of NameValue object.

 

LineItem--getParameters() returns Parameter[]

Parameter-getNameValueArray() return NameValue[]

Each NameValue has name and value attribute

Any help?

 

Ta

Sougata

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. 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.





smime.p7s
Description: S/MIME cryptographic signature
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] RE: RE: Regarding Package .Pkg

2007-10-03 Thread Mark Proctor

Drool_Beginner wrote:

Yes, instead I don't want to write any DRL file. I want to create Rule
directliy in  PackageBuilder  object , instantiate it and run the rule
through it. 
If it is not possible then I want to create drl file once and later on I

have to modify PackageBuilder from my Java code or program code.
is there any information regarding it is available.
Thanks  with Regards
Abhi..

  
You cannot change a rule once its created, but you can add the rule 
again which will over-write the old version. If you don't want to use 
drl you can build your AST, via the descr objects directly, however this 
is not for the faint hearted its considered very experience developer 
stuff. Personally I would use a templating language to generate your 
drls, based from what ever objects you have that are codifying your rules.

Anstis, Michael (M.) wrote:
  

Do you mean, once you've loaded a DRL file into a Package object you want
to
modify rule definitions?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner
Sent: 03 October 2007 09:58
To: rules-users@lists.jboss.org
Subject: [rules-users] RE: Regarding Package .Pkg


Thanks Anstis, 
for your clarification. Is there a way that I can directly manipulate

directly this PackageBuilder from my JAVA code . Instead of updating drl
file. 
Thanks  Regards,

Abhi..

Anstis, Michael (M.) wrote:


I think you might misunderstand.
 
A DRL file contains text defining rules. Each DRL file is assigned a

package
name (much like Java).
 
The DRL file is loaded, parsed (PackageBuilder) and converted into a

Package
instance. Packages are added to RuleBases from which WorkingMemory can be
obtained for rule execution.
 
There is no pkg file - the Java Package can be converted into a stream

using Java's ObjectOutputStream.
 
Have a look at 1.6. The Drools Rule Engine - 1.6.1. Overview in the

excellent documentation.


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner
Sent: 03 October 2007 08:53
To: rules-users@lists.jboss.org
Subject: [rules-users] Regarding Package .Pkg


Dear All, Where I can get more information about .pkg, Since I have got
information that .drl file get converted in to pkg(Package), which is
writing .drl information into Stream. Please send me some information as
our
requirement is some what to take benifit from .pkg. Thanks in Advance
Regards, Abhishek 

  _  


View this message in context: Regarding
http://www.nabble.com/Regarding-Package-.Pkg-tf4560333.html#a13014401
Package .Pkg
Sent from the drools - user mailing
http://www.nabble.com/drools---user-f11823.html list archive at
Nabble.com.



 
___

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/Regarding-Package-.Pkg-tf4560333.html#a13015081
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





  


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


RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
I forgot to mention, this assumes you want to maintain the relationships. If
you're not interested in these but merely want to process all NameValue
objects then a simple rule works fine:-
 
rule don't worry about preserving relationships
when
$n : NameValue ( )
then
...
end
 
Simply assert all NameValue objects.


  _  

From: Anstis, Michael (M.) 
Sent: 03 October 2007 12:48
To: 'Rules Users List'
Subject: RE: [rules-users] Arrays help


There are a number of ways...
 
Java dialect [requires LineItem, Parameter and NameValue to be asserted into
working memory]
 
rule a - requires object model change for parent property
when
$l : LineItem( )
$p : Parameter ( parent == $l )
$n : NameValue( parent == $p )
then
...
end
 

rule b
when


$n : NameValue( )
$p : Parameter ( nameValues contains $n )
$l : LineItem( parameters contains $p )
then
...
end
 
MVEL dialect
 
rule c
dialect mvel
when
$n :
my-mvel-syntax-lets-me-down-but-I-know-you-can-traverse-object-graphs-using-
it
then
...
end
 



  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bhattacharya,
Sougata
Sent: 03 October 2007 12:37
To: Rules Users List
Subject: [rules-users] Arrays help



Hi All,

  I have a object graph like this

LineItem has array of Parameter and each Parameter has array of  NameValue
and Namevalue object has name and value.

Now I have LineItem object in working memory, how to test the value of each
value of NameValue object.

 

LineItem--getParameters() returns Parameter[]

Parameter-getNameValueArray() return NameValue[]

Each NameValue has name and value attribute

Any help?

 

Ta

Sougata

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. 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.





smime.p7s
Description: S/MIME cryptographic signature
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Arrays help

2007-10-03 Thread Bhattacharya, Sougata

Yes that's the simple one, but I can't send the NameValue, I will send
only the LineItem

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anstis,
Michael (M.)
Sent: Wednesday, October 03, 2007 5:36 PM
To: Rules Users List
Subject: RE: [rules-users] Arrays help

 

I forgot to mention, this assumes you want to maintain the
relationships. If you're not interested in these but merely want to
process all NameValue objects then a simple rule works fine:-

 

rule don't worry about preserving relationships

when

$n : NameValue ( )

then

...

end

 

Simply assert all NameValue objects.

 





From: Anstis, Michael (M.) 
Sent: 03 October 2007 12:48
To: 'Rules Users List'
Subject: RE: [rules-users] Arrays help

There are a number of ways...

 

Java dialect [requires LineItem, Parameter and NameValue to be
asserted into working memory]

 

rule a - requires object model change for parent property

when

$l : LineItem( )

$p : Parameter ( parent == $l )

$n : NameValue( parent == $p )

then

...

end

 

rule b

when

$n : NameValue( )

$p : Parameter ( nameValues contains $n )

$l : LineItem( parameters contains $p )

then

...

end

 

MVEL dialect

 

rule c

dialect mvel

when

$n :
my-mvel-syntax-lets-me-down-but-I-know-you-can-traverse-object-graphs-us
ing-it

then

...

end

 

 





From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bhattacharya,
Sougata
Sent: 03 October 2007 12:37
To: Rules Users List
Subject: [rules-users] Arrays help

Hi All,

  I have a object graph like this

LineItem has array of Parameter and each Parameter has
array of  NameValue and Namevalue object has name and value.

Now I have LineItem object in working memory, how to
test the value of each value of NameValue object.

 

LineItem--getParameters() returns Parameter[]

Parameter-getNameValueArray() return NameValue[]

Each NameValue has name and value attribute

Any help?

 

Ta

Sougata

This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. 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.

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. 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.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] serialize RuleBase... precompiling rules

2007-10-03 Thread Manukyan, Sergey

Folks,

Using 4.0.1.

Can I serialize RuleBase object in order to load later precompiled
rules?

So far I was able to do that but when inserting facts into stateful
session based on that rulebase exception is thrown:
java.lang.NoClassDefFoundError: XXXShadowProxy

What is the correct way of precompiling rules? I couldn't find any
description of how to do it in documentation...

Thanks,

-Sergey


**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.

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


Re: [rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
Michael,

Those detail lines are in working memory for sure.  In fact the query it
self only works on working memory objects.

As far as I know you can not place the results of a queryResult in the LHS.

Ron

On 10/3/07, Anstis, Michael (M.) [EMAIL PROTECTED] wrote:

  Can you not get a reference to a DetailLine in the LHS?

 If you have not inserted DetailLine objects into working memory how can
 you expect to retract them?

 If you have inserted DetailLine's into working memory what does query
 Open RTV Lines return, can it be joined into the LHS? (or split into two
 rules)?

  --
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Ronald R. DiFrango
 *Sent:* 03 October 2007 14:01
 *To:* Rules Users List
 *Subject:* [rules-users] Retract in a function

 All,

 I have the following function that I call from all of my rules.  When I
 execute this function, I need to retract that object from working memory.
 The problem is that when I insert the comment line below I get a compiler
 error saying that I can only issue a retract on fact handles.

 Here is an example of my rule plus the function:

 rule QTY Percentage tolerance - Approval
 salience -25
 no-loop  true
 when
 rtvHeader : RtvHeader( totalAmount : totalAmount, status not in (
 StatusConstants.MATCHED, StatusConstants.APPROVAL) )
 repaymentCode : RepaymentCode( code == QTY, matchApprv == Y,
 tolDollar ==0, tolPercent != 0, tolPercent : tolPercent )
 qtyOutput : QTYOutput( sumRTVQty : sumRTVQty , sumCmAndRnr :
 sumCmAndRnr )
 eval( qtyPercentage(qtyOutput, totalAmount, tolPercent) )
 then
 System.out.println(QTY Percentage tolerance - No Approval);
 rtvHeader.setStatus(StatusConstants.APPROVAL );
 openRTVLines(drools.getWorkingMemory(), 
 drools.getWorkingMemory().getQueryResults(
 Open RTV Lines ), StatusConstants.MATCHED_WITHIN_TOLERANCE);
 end

 function void openRTVLines(WorkingMemory workingMemory, QueryResults
 results, String status)
 {
 System.out.println( We have  + results.size() +  Open RTV Lines );
 for ( Iterator it = results.iterator(); it.hasNext(); ) {
 QueryResult result = ( QueryResult ) it.next ();
 DetailLine line = ( DetailLine ) result.get( line );
 line.setStatus(status);

 // I need to add this in
 // workingMemory.retract(line);
 }
 }

 Thanks in advance,

 Ron



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


Re: [rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
I got it, the following works:

function void openRTVLines(WorkingMemory workingMemory, QueryResults
results, String status)
{
System.out.println( We have  + results.size() +  Open RTV Lines );
for ( Iterator it = results.iterator(); it.hasNext(); ) {
QueryResult result = ( QueryResult ) it.next();
DetailLine line = ( DetailLine ) result.get( line );
line.setStatus(status);

// Now retract those objects from Working Memory
FactHandle handle = workingMemory.getFactHandle(line);
System.out.println(handle :  + handle);
workingMemory.modifyRetract(handle);
}
}

On 10/3/07, Ronald R. DiFrango [EMAIL PROTECTED] wrote:

 I have now tried the following and it did not seem to have the intended
 result of removing the detail line from working memory:

 function void openRTVLines(WorkingMemory workingMemory, QueryResults
 results, String status)
 {
 System.out.println( We have  + results.size() +  Open RTV Lines );
 for ( Iterator it = results.iterator(); it.hasNext(); ) {
 QueryResult result = ( QueryResult ) it.next ();
 DetailLine line = ( DetailLine ) result.get( line );
 line.setStatus(status);

 // Now retract those objects from Working Memory
 FactHandle[] handles = result.getFactHandles();
 System.out.println(handles.length :  + handles.length);
 for(int i = 0; i  handles.length; i++)
 {
 System.out.println(Retracting : );
 workingMemory.retract(handles[i]);
 }
 }
 }

 Any other thoughts out there?

 On 10/3/07, Ronald R. DiFrango  [EMAIL PROTECTED] wrote:
 
  Michael,
 
  Those detail lines are in working memory for sure.  In fact the query it
  self only works on working memory objects.
 
  As far as I know you can not place the results of a queryResult in the
  LHS.
 
  Ron
 
  On 10/3/07, Anstis, Michael (M.)  [EMAIL PROTECTED] wrote:
  
Can you not get a reference to a DetailLine in the LHS?
  
   If you have not inserted DetailLine objects into working memory how
   can you expect to retract them?
  
   If you have inserted DetailLine's into working memory what does query
   Open RTV Lines return, can it be joined into the LHS? (or split into two
   rules)?
  
--
   *From:* [EMAIL PROTECTED] [mailto:
   [EMAIL PROTECTED] *On Behalf Of *Ronald R. DiFrango
   *Sent:* 03 October 2007 14:01
   *To:* Rules Users List
   *Subject:* [rules-users] Retract in a function
  
   All,
  
   I have the following function that I call from all of my rules.  When
   I execute this function, I need to retract that object from working 
   memory.
   The problem is that when I insert the comment line below I get a compiler
   error saying that I can only issue a retract on fact handles.
  
   Here is an example of my rule plus the function:
  
   rule QTY Percentage tolerance - Approval
   salience -25
   no-loop  true
   when
   rtvHeader : RtvHeader( totalAmount : totalAmount, status not
   in ( StatusConstants.MATCHED, StatusConstants.APPROVAL) )
   repaymentCode : RepaymentCode( code == QTY, matchApprv ==
   Y, tolDollar ==0, tolPercent != 0, tolPercent : tolPercent )
   qtyOutput : QTYOutput( sumRTVQty : sumRTVQty , sumCmAndRnr :
   sumCmAndRnr )
   eval( qtyPercentage(qtyOutput, totalAmount, tolPercent) )
   then
   System.out.println(QTY Percentage tolerance - No Approval);
   rtvHeader.setStatus(StatusConstants.APPROVAL );
   openRTVLines(drools.getWorkingMemory(),
   drools.getWorkingMemory().getQueryResults( Open RTV Lines ),
   StatusConstants.MATCHED_WITHIN_TOLERANCE);
   end
  
   function void openRTVLines(WorkingMemory workingMemory, QueryResults
   results, String status)
   {
   System.out.println( We have  + results.size() +  Open RTV
   Lines );
   for ( Iterator it = results.iterator(); it.hasNext(); ) {
   QueryResult result = ( QueryResult ) it.next ();
   DetailLine line = ( DetailLine ) result.get( line );
   line.setStatus(status);
  
   // I need to add this in
   // workingMemory.retract(line);
   }
   }
  
   Thanks in advance,
  
   Ron
  
  
  
 

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


[rules-users] URGENT: BRMS - how to use variables on Action part?

2007-10-03 Thread Felipe Piccolini
Anyone knows how to use variables (from fields) setted on LHS, to  
modify a field on the RHS using the GUI editor

from BRMS?

What I need is to write this rule on BRMS.

rule Set approvedMount for a women
no-loop true
when
$p: Person($sex: sex == F, $income: incomeMount)
then
$p.setApprovedMount($income * 1.2);
update($p);
end

I know I can use formulas, but I only know how to set those on LHS, I  
dont know how to put a formula on RHS (setter of the field to modify).


Thanks.


Felipe Piccolini M.
[EMAIL PROTECTED]




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


RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
If you can't insert the NameValue objects at all because you are using
somebody else's code to setup the initial facts you can use another rule to
do this for you:-
 
rule insert NameValues
salience -100
when
$l : LineItem( )
then
for(int i = 0, NameValue[] nvs = $l.getNameValueArray(); i 
nvs.length; i++) {
insert(nvs[i]);
}
end
 
rule process NameValues
salience -90
when
  $nv : NameValue( )
then
...
end
 
Depending on what you want to do with NameValue (i.e. simply count them or
apply a function to a value) you could try looking at collect or
accumulate but I doubt this is what you are after.
 
Lastly you can always iterate over them in the RHS of a rule - but without
inserting them into working memory you'll never be able to write rules to
handle them.

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bhattacharya,
Sougata
Sent: 03 October 2007 14:26
To: Rules Users List
Subject: RE: [rules-users] Arrays help



Your assumption is correct, but how do I iterate throw the array

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael
(M.)
Sent: Wednesday, October 03, 2007 6:52 PM
To: Rules Users List
Subject: RE: [rules-users] Arrays help

 

Do you mean you cannot insert NameValue facts into working memory?

 

If this is the case, then you might have to use eval or MVEL dialect. Based
upon your model below I assumed you could insert NameValues:-

 

LineItem--getParameters() returns Parameter[]

Parameter-getNameValueArray() return NameValue[]

Each NameValue has name and value attribute

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bhattacharya,
Sougata
Sent: 03 October 2007 13:23
To: Rules Users List
Subject: RE: [rules-users] Arrays help

Yes that's the simple one, but I can't send the NameValue, I will send only
the LineItem

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael
(M.)
Sent: Wednesday, October 03, 2007 5:36 PM
To: Rules Users List
Subject: RE: [rules-users] Arrays help

 

I forgot to mention, this assumes you want to maintain the relationships. If
you're not interested in these but merely want to process all NameValue
objects then a simple rule works fine:-

 

rule don't worry about preserving relationships

when

$n : NameValue ( )

then

.

end

 

Simply assert all NameValue objects.

 


  _  


From: Anstis, Michael (M.) 
Sent: 03 October 2007 12:48
To: 'Rules Users List'
Subject: RE: [rules-users] Arrays help

There are a number of ways...

 

Java dialect [requires LineItem, Parameter and NameValue to be asserted into
working memory]

 

rule a - requires object model change for parent property

when

$l : LineItem( )

$p : Parameter ( parent == $l )

$n : NameValue( parent == $p )

then

...

end

 

rule b

when

$n : NameValue( )

$p : Parameter ( nameValues contains $n )

$l : LineItem( parameters contains $p )

then

...

end

 

MVEL dialect

 

rule c

dialect mvel

when

$n :
my-mvel-syntax-lets-me-down-but-I-know-you-can-traverse-object-graphs-using-
it

then

...

end

 

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bhattacharya,
Sougata
Sent: 03 October 2007 12:37
To: Rules Users List
Subject: [rules-users] Arrays help

Hi All,

  I have a object graph like this

LineItem has array of Parameter and each Parameter has array of  NameValue
and Namevalue object has name and value.

Now I have LineItem object in working memory, how to test the value of each
value of NameValue object.

 

LineItem--getParameters() returns Parameter[]

Parameter-getNameValueArray() return NameValue[]

Each NameValue has name and value attribute

Any help?

 

Ta

Sougata


This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. 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.

 


This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. 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.

 

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the 

[rules-users] How to have your emails ignored

2007-10-03 Thread Mark Proctor
Did this for some fun, will add it to the mailing lists info page on the 
website. Anyone else have some more ideas? I'll blog the final results :)


How to have your emails ignored:
Start the email with URGENT
Tell everyone how desparate you and how you need an immediate response 
for your really important project.
Don't wait a minimum of 3 days and resend your email within minutes of 
hours.

Send emails directly to mailing list members, especially the developers.
Paste pages of code and then say it doesn't work, please help.
Paste a long stack trace and say it doesn't work, please help.
Start your email with please sirs or include do the needful.
Ask dumb questions that are in the manual.
Ask basic java questions.
Ask questions about JRules
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using java.util.List in rules

2007-10-03 Thread Edson Tirelli
  Use the from CE:

rule This rule will fire once for each Caracteristica whose codCarac is !=
0
when
Especialista( $caracList : retratoUser.lstCarac )
Caracteristica( codCarac != 0 ) from $caracList
then
...
end

   []s
   Edson

2007/10/3, Bhattacharya, Sougata [EMAIL PROTECTED]:

  If I want to test for all ith element,

 Like this



 rule Test

 when
 e : Especialista(retratoUser.lstCarac.get(i).codCarac != 0)
 then
 System.out.println (test);

 end



 what should I do



   --

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Edson Tirelli
 *Sent:* Wednesday, October 03, 2007 6:10 AM
 *To:* Rules Users List
 *Subject:* Re: [rules-users] Using java.util.List in rules




You can't explicitly call methods in the field name. Use MVEL special
 notation for lists:

 e : Especialista(retratoUser.lstCarac[0].codCarac != 0)

 []s
 Edson


 2007/10/2, Anderson Pazza Mello [EMAIL PROTECTED]:

 Hi everyone,

 I'm trying to use a java.util.List like this:

 rule Test

 when
 e : Especialista(retratoUser.lstCarac.get(0).codCarac != 0)
 then
 System.out.println (test);

 end

 The property lstCarac is a java.util.ListCaracteristica. I'm getting
 this error :

 org.drools.rule.InvalidRulePackage: [18,44]: unknown:18:44 Unexpected
 token '0'[18,46]: unknown:18:46 Unexpected token '.'
 at org.drools.rule.Package.checkValidity(Package.java:419)

 Someone knows what i have to do to fix the problem??


 --
 Anderson Pazza Mello
 Tecnologia em Informática - UFPR
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
   Edson Tirelli
   Software Engineer - JBoss Rules Core Developer
   Office: +55 11 3529-6000
   Mobile: +55 11 9287-5646
   JBoss, a division of Red Hat @ www.jboss.com
  This message contains information that may be privileged or confidential
 and is the property of the Capgemini Group. 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.


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




-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Drools 4.0 StateExampleWithDynamicRules Question

2007-10-03 Thread Daren Chylinski
Hello,

 

I was pulled away from my Drools learning and now I am back.  I must
have missed the response to my previous inquiry.  Is there anyone that
has experienced the scenario described below?

 

Regards,

Daren

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Daren
Chylinski
Sent: Thursday, August 02, 2007 11:22 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Drools 4.0 StateExampleWithDynamicRules Question

 

Hello,

 

I am a new Drools user working my way through the examples.  To test my
understanding of how the rules work, I modified the
StateExampleUsingSalience.drl file used in the
StateExampleWithDynamicRules example.  The result of my change
conflicted with my understanding of how the rules should work.

 

I made two modifications in the StateExampleUsingSalience.drl file.  The
two modifications (shown below) are the commenting out of the two lines
in the RHS portion of the B to D rule.  My understanding of how this
would affect the result was:  because the D State object never changes
state to State.FINISHED the RHS portion of the D to E rule (shown
below) would not execute because the first pattern in the LHS would fail
to find a State object in working memory that met the criteria of the
constraint groups defined within it.

 

My question is:  Why does the D to E rule in the
StateExampleDynamicRules.drl execute the statements in the RHS portion
of the rule?

 

From StateExampleUsingSalience.drl:  My changes in this file are the two
lines commented out in the RHS portion.

 

rule B to D

  when

State(name == B, state == State.FINISHED )

d : State(name == D, state == State.NOTRUN )

  then

//System.out.println(d.getName() +  finished );

//d.setState( State.FINISHED );

end

 

 

From StateExampleDynamicRules.drl:  This is the rule where I expected
the RHS portion to NOT get executed because there aren't any State
objects in working memory that have their name == D and its state ==
State.FINISHED because the setState( State.FINISHED ) was never executed
on the D state object.

 

rule D to E

  when

State(name == D, state == State.FINISHED )

e : State(name == E, state == State.NOTRUN )

  then

System.out.println(e.getName() +  finished );

e.setState( State.FINISHED );

end

 

After my modifications, the output was:

 

A finished

B finished

C finished

E finished

 

I did not expect the E finished message to be printed.

 

 

Regards,

Daren



Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace
Managed Hosting. Any dissemination, distribution or copying of the enclosed
material is prohibited. If you receive this transmission in error, please
notify us immediately by e-mail at [EMAIL PROTECTED], and delete the
original message. Your cooperation is appreciated.

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


Re: [rules-users] How to have your emails ignored

2007-10-03 Thread ekke

don't open a new topic - place your mail in the middle of another thread
which belongs to a totally different topic
start your email with I'm a member of the drools mailinglist, so please
answer me

ekke

Mark Proctor wrote:
 
 Did this for some fun, will add it to the mailing lists info page on the 
 website. Anyone else have some more ideas? I'll blog the final results :)
 
 How to have your emails ignored:
 Start the email with URGENT
 Tell everyone how desparate you and how you need an immediate response 
 for your really important project.
 Don't wait a minimum of 3 days and resend your email within minutes of 
 hours.
 Send emails directly to mailing list members, especially the developers.
 Paste pages of code and then say it doesn't work, please help.
 Paste a long stack trace and say it doesn't work, please help.
 Start your email with please sirs or include do the needful.
 Ask dumb questions that are in the manual.
 Ask basic java questions.
 Ask questions about JRules
 ___
 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/How-to-have-your-emails-ignored-tf4562290.html#a13020944
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] How to have your emails ignored

2007-10-03 Thread Mark Proctor
Sure I'll number each of the items below, so on the times those emails 
aren't totally ignored, someone can reference them to that item number.

Manukyan, Sergey wrote:

I would suggest create a manual on how to communicate on this mailing
list, and all emails not conforming to this manual be tagged with f.e...
LIST COMMUNICATION ABUSE REFRENCE # 2.1.1, please consider to reformat
your email to match those standards. Therefore the sender knows what it
is about and it won't continue to do the same...



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor
Sent: Wednesday, October 03, 2007 10:36 AM
To: Rules Users List
Subject: [rules-users] How to have your emails ignored

Did this for some fun, will add it to the mailing lists info page on the

website. Anyone else have some more ideas? I'll blog the final results
:)

How to have your emails ignored:
Start the email with URGENT
Tell everyone how desparate you and how you need an immediate response 
for your really important project.
Don't wait a minimum of 3 days and resend your email within minutes of 
hours.

Send emails directly to mailing list members, especially the developers.
Paste pages of code and then say it doesn't work, please help.
Paste a long stack trace and say it doesn't work, please help.
Start your email with please sirs or include do the needful.
Ask dumb questions that are in the manual.
Ask basic java questions.
Ask questions about JRules
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.


___
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] JBRMS - Decision Tables - Effective Dates Expiration Dates

2007-10-03 Thread Barry K

What is the direction for handling date-effective and date-expiration when
compiling decision tables?  

Currently, org.drools.decisiontable.model.Rule does not have attributes for
effective or expiration date.  I started going down the path of adding the
attributes to org.drools.decisiontable.model.Rule and using a custom
RulesheetListener to populate them, but I was concerned about
overcustomization the application.  Are these attributes going to be added
for decision tables?

Thanks

Barry
-- 
View this message in context: 
http://www.nabble.com/JBRMS---Decision-Tables---Effective-Dates---Expiration-Dates-tf4562541.html#a13021477
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] How to have your emails ignored

2007-10-03 Thread Mark Proctor
ok here is the list updated. In reality we aren't that formal, and the 
tone of the list below is tongue in cheek, but if I put this up on the 
mailing list info page hopefully it might help a little, especially as 
traffic picks up. There was 20K download attempts last month, so I think 
our little community is growing :)


How to have your emails ignored:
#1. Start the email with URGENT
#2. Tell everyone how desparate you and how you need an immediate 
response for your really important project.
#3. Don't wait a minimum of 3 days and resend your email within minutes 
of hours.

#4. Send emails directly to mailing list members, especially the developers.
#5. Paste pages of code and then say it doesn't work, please help.
#6. Paste a long stack trace and say it doesn't work, please help.
#7. Start your email with please sirs or include do the needful.
#8. Ask dumb questions that are in the manual.
#9. Ask basic java questions.
#10. Ask questions about JRules
#11. Reply to an existing thread but starting a new topic
#12. Start your email with I'm a member of the drools mailinglist, so 
please answer me


ekke wrote:

don't open a new topic - place your mail in the middle of another thread
which belongs to a totally different topic
start your email with I'm a member of the drools mailinglist, so please
answer me

ekke

Mark Proctor wrote:
  
Did this for some fun, will add it to the mailing lists info page on the 
website. Anyone else have some more ideas? I'll blog the final results :)


How to have your emails ignored:
Start the email with URGENT
Tell everyone how desparate you and how you need an immediate response 
for your really important project.
Don't wait a minimum of 3 days and resend your email within minutes of 
hours.

Send emails directly to mailing list members, especially the developers.
Paste pages of code and then say it doesn't work, please help.
Paste a long stack trace and say it doesn't work, please help.
Start your email with please sirs or include do the needful.
Ask dumb questions that are in the manual.
Ask basic java questions.
Ask questions about JRules
___
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] How to have your emails ignored

2007-10-03 Thread Mark Proctor

Scott Reed wrote:

Please tell me how I can call a function on the LHS.
(hurry my assignment is due today!)

Is that not covered by #2, it's more of an example for #2?
#1. Start the email with URGENT
#2. Tell everyone how desparate you and how you need an immediate 
response for your really important project.
#3. Don't wait a minimum of 3 days and resend your email within minutes 
of hours.

#4. Send emails directly to mailing list members, especially the developers.
#5. Paste pages of code and then say it doesn't work, please help.
#6. Paste a long stack trace and say it doesn't work, please help.
#7. Start your email with please sirs or include do the needful.
#8. Ask dumb questions that are in the manual.
#9. Ask basic java questions.
#10. Ask questions about JRules
#11. Reply to an existing thread but starting a new topic
#12. Start your email with I'm a member of the drools mailinglist, so 
please answer me

#13. General begging and pleading


ekke's message received 10/3/2007 11:10 AM:

don't open a new topic - place your mail in the middle of another thread
which belongs to a totally different topic
start your email with I'm a member of the drools mailinglist, so please
answer me

ekke

Mark Proctor wrote:
Did this for some fun, will add it to the mailing lists info page on 
the website. Anyone else have some more ideas? I'll blog the final 
results :)


How to have your emails ignored:
Start the email with URGENT
Tell everyone how desparate you and how you need an immediate 
response for your really important project.
Don't wait a minimum of 3 days and resend your email within minutes 
of hours.
Send emails directly to mailing list members, especially the 
developers.

Paste pages of code and then say it doesn't work, please help.
Paste a long stack trace and say it doesn't work, please help.
Start your email with please sirs or include do the needful.
Ask dumb questions that are in the manual.
Ask basic java questions.
Ask questions about JRules
___
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] How to have your emails ignored

2007-10-03 Thread Mark Proctor

ok I've blogged this already:
http://blog.athico.com/2007/10/how-to-have-your-emails-ignored.html

:)
Scott Reed wrote:

Please tell me how I can call a function on the LHS.
(hurry my assignment is due today!)

ekke's message received 10/3/2007 11:10 AM:

don't open a new topic - place your mail in the middle of another thread
which belongs to a totally different topic
start your email with I'm a member of the drools mailinglist, so please
answer me

ekke

Mark Proctor wrote:
Did this for some fun, will add it to the mailing lists info page on 
the website. Anyone else have some more ideas? I'll blog the final 
results :)


How to have your emails ignored:
Start the email with URGENT
Tell everyone how desparate you and how you need an immediate 
response for your really important project.
Don't wait a minimum of 3 days and resend your email within minutes 
of hours.
Send emails directly to mailing list members, especially the 
developers.

Paste pages of code and then say it doesn't work, please help.
Paste a long stack trace and say it doesn't work, please help.
Start your email with please sirs or include do the needful.
Ask dumb questions that are in the manual.
Ask basic java questions.
Ask questions about JRules
___
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] rules precompilation

2007-10-03 Thread ekke

sergey,
one possible way:
after adding your rules to a package,
you can use yourPackage.writeExternal() to store your package (with compiled
rules) anywhere.

later you can get the compiled rules back with ...Package.readExternal()
ekke


Manukyan, Sergey wrote:
 
 
 Folks,
 
 Where can I find information on how to pre-compile rules in 4.0.1?
 
 Thanks,
 
 -Sergey
 
 
 **
 ** LEGAL DISCLAIMER **
 **
 
 This E-mail message and any attachments may contain 
 legally privileged, confidential or proprietary 
 information. If you are not the intended recipient(s),
 or the employee or agent responsible for delivery of 
 this message to the intended recipient(s), you are 
 hereby notified that any dissemination, distribution 
 or copying of this E-mail message is strictly 
 prohibited. If you have received this message in 
 error, please immediately notify the sender and 
 delete this E-mail message from your computer.
 
 ___
 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/How-to-have-your-emails-ignored-tf4562290.html#a13024208
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] rules precompilation

2007-10-03 Thread Jin, Ming
Sergey,

I am using precompiled rules.  Serializing instances of
org.drools.rule.Package works for me.

Thanks,
-Ming 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation


Folks,

Where can I find information on how to pre-compile rules in 4.0.1?

Thanks,

-Sergey


**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.

___
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] Rule Compilation error

2007-10-03 Thread Michael Epstein
Hi,

I have a JBRMS question. I have DSL that I am using, when I build a rule in
the guided editor that uses the DSL it works fine. When I use the business
rule text edit, the same [when] fails validation.

Here is the error:

Rule Compilation error Expression smcUnit is not an rvalue Unknown
variable or type smcUnit Expression smcUnit is not an lvalue Unknown
variable or type smcUnit A method named setSmcUnitId is not declared in
any enclosing class nor any supertype, nor through a static import
Expression smcUnit is not an rvalue Expression smcUnit is not an rvalue
Expression smcUnit is not an rvalue Unknown variable or type smcUnit
Unknown variable or type smcUnit Expression smcUnit is not an rvalue
Expression smcUnit is not an rvalue Expression smcUnit is not an rvalue
Unknown variable or type smcUnit Exception:14 error(s) while compiling
unit com/symark/smc/Rule_test2_0.java

Here is the DSL:

[when]There is a Log=LogStartStop()
[when]- runUserId with a command run by user: '{id}'=runUserId == {id}
[when]- submitUserId with a command submitted by user: '{id}'=submitUserId
== {id}
[when]- runHostId with a command run on host: '{id}'=runHostId == {id}
[when]- submitHostId with a command submitted from host: '{id}'=submitHostId
== {id}
[then]Assign to unit with id: '{id}' =  smcUnit = new SmcUnit() ;
smcUnit.setSmcUnitId({id}) ; insert(smcUnit ) ;

And finally here is the rule:

when
There is a Log
- runUserId with a command run by user: 'smc_app_elton'
then
Assign to unit with id: '1'

Any help would be greatly appreciated.

Thanks,
Mike

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


[rules-users] MVEL VariableResolverFactory problem on eclipse

2007-10-03 Thread Felipe Piccolini
updated to 4.0.1 and creating a new drools project. Any .drl file  
(and also rule flows) shows errors with this info on problems tab

on eclipse:
org/mvel/integration/VariableResolverFactory

no more info, actualy I can run the rules (from the Sample.drl) but  
it shows the problem.


I tried changing libraries and jdt dependencies, but not succes...  
what can it be?...anyone has this problem too?


Thanks.

Felipe Piccolini M.
[EMAIL PROTECTED]




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


[rules-users] suggestion for drl grammar: single-element constraints

2007-10-03 Thread Godmar Back
If a fact contains a single field, it would be nice to be able to
express a constraint on the value of that field without having to know
its name, e.g.:

Cheese (stilton)

which would be equivalent to

Cheese (type == stilton)

if Cheese contained only one field, and which would be a compile-time
error otherwise.

A similar convenience syntax is used, for instance, for Java 5
annotations. Instead of having to say @Retention(value =
RetentionPolicy.RUNTIME) it can be abbreviated
@Retention(RetentionPolicy.RUNTIME) since this annotation only has a
single field.

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


[rules-users] BRMS - how to use variables on Action part?

2007-10-03 Thread Felipe Piccolini
Ok, so to fit on the not ignored emails from the list Mark posted,  
I changed the title. However I following in the list

anyways beacuse Im resending this email in less than 3 days.

Note: Im not desperate, nor this is for today. This just came out  
today yesterday and well... its important to me, but I

think I can get a work around for now.

So here is the real on-topic question.
-
Anyone knows how to use variables (from fields) setted on LHS, to  
modify a field on the RHS using the GUI editor

from BRMS?

What I need is to write this rule on BRMS.

rule Set approvedMount for a women
no-loop true
when
$p: Person($sex: sex == F, $income: incomeMount)
then
$p.setApprovedMount($income * 1.2);
update($p);
end

I know I can use formulas, but I only know how to set those on LHS, I  
dont know how to put a formula on RHS (setter of the field to modify).


Thanks.


Felipe Piccolini M.
[EMAIL PROTECTED]




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


RE: [rules-users] rules precompilation

2007-10-03 Thread Manukyan, Sergey
Ming, Ekke,

After deserialising the Package back - getting exception when inserting
facts:

Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy

XXX - is my class name

Any ideas?

-Sergey



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 1:50 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation

Sergey,

I am using precompiled rules.  Serializing instances of
org.drools.rule.Package works for me.

Thanks,
-Ming 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation


Folks,

Where can I find information on how to pre-compile rules in 4.0.1?

Thanks,

-Sergey


**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.

___
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] rules precompilation

2007-10-03 Thread Jin, Ming
Did you save the Package right after the creation from PackageBuilder,
or after some other processes? 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 2:21 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation

Ming, Ekke,

After deserialising the Package back - getting exception when inserting
facts:

Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy

XXX - is my class name

Any ideas?

-Sergey



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 1:50 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation

Sergey,

I am using precompiled rules.  Serializing instances of
org.drools.rule.Package works for me.

Thanks,
-Ming 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation


Folks,

Where can I find information on how to pre-compile rules in 4.0.1?

Thanks,

-Sergey


**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.

___
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

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


RE: [rules-users] rules precompilation

2007-10-03 Thread Manukyan, Sergey
Did it immediately... 

If you don't mind could you post code that works?

Thanks.

-Sergey

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 3:40 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation

Did you save the Package right after the creation from PackageBuilder,
or after some other processes? 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 2:21 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation

Ming, Ekke,

After deserialising the Package back - getting exception when inserting
facts:

Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy

XXX - is my class name

Any ideas?

-Sergey



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jin, Ming
Sent: Wednesday, October 03, 2007 1:50 PM
To: Rules Users List
Subject: RE: [rules-users] rules precompilation

Sergey,

I am using precompiled rules.  Serializing instances of
org.drools.rule.Package works for me.

Thanks,
-Ming 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Wednesday, October 03, 2007 12:29 PM
To: Rules Users List
Subject: [rules-users] rules precompilation


Folks,

Where can I find information on how to pre-compile rules in 4.0.1?

Thanks,

-Sergey


**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of this
message to the intended recipient(s), you are hereby notified that any
dissemination, distribution or copying of this E-mail message is
strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this E-mail message from your
computer.

___
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

___
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] RE: rules precompilation

2007-10-03 Thread ekke

sergey,

just tried it:
exported a package with rules as stream
(using the writeExternal() from Package)

then in another run I created new RuleBase, added new Package,
then import the rules into this empty Package (using the readExternal() from
Package)
then added some facts, execute the rules,

tested if all rules are there,
tested if the Facts are in workingMemory - all ok

(using snapshot 4.0.2, eclipse 3.3, osx 10.4.10)

ekke

Manukyan, Sergey wrote:
 
 Ming, Ekke,
 
 After deserialising the Package back - getting exception when inserting
 facts:
 
 Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy
 
 XXX - is my class name
 
 Any ideas?
 
 -Sergey
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jin, Ming
 Sent: Wednesday, October 03, 2007 1:50 PM
 To: Rules Users List
 Subject: RE: [rules-users] rules precompilation
 
 Sergey,
 
 I am using precompiled rules.  Serializing instances of
 org.drools.rule.Package works for me.
 
 Thanks,
 -Ming 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
 Sergey
 Sent: Wednesday, October 03, 2007 12:29 PM
 To: Rules Users List
 Subject: [rules-users] rules precompilation
 
 
 Folks,
 
 Where can I find information on how to pre-compile rules in 4.0.1?
 
 Thanks,
 
 -Sergey
 
 
 **
 ** LEGAL DISCLAIMER **
 **
 
 This E-mail message and any attachments may contain legally privileged,
 confidential or proprietary information. If you are not the intended
 recipient(s), or the employee or agent responsible for delivery of this
 message to the intended recipient(s), you are hereby notified that any
 dissemination, distribution or copying of this E-mail message is
 strictly prohibited. If you have received this message in error, please
 immediately notify the sender and delete this E-mail message from your
 computer.
 
 ___
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-have-your-emails-ignored-tf4562290.html#a13026864
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] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Malika

Hello,

I started to write web app using drools decision table. Here is what I have
in my web project in eclipse 3.3,
drools 4.0:

1. A Jsp page that takes input and pass it on to a servlet that fires the
rules.
2. Servlet class has import statements:
import org.drools.RuleBase;
import org.drools.RuleBaseFactory;
import org.drools.StatefulSession;
import org.drools.StatelessSession;
import org.drools.WorkingMemory; and so on..
3. When I run the jsp on tomcat, it starts but when i hit submit it throws
the exception:

java.lang.NoClassDefFoundError: org/drools/RuleBase

4. I have drools jar files added under project properties - build path- add
external jars from
C:\wtp_all_in_one\eclipse\configuration\org.eclipse.osgi\bundles\503\1\.cp\lib.
This is showing all drools jar files under Libraries hierarchy.

Could anyone please suggest what to do to resolve this error?

Thanks and Regards,
Malika


-- 
View this message in context: 
http://www.nabble.com/Drools-web-project-in-eclipse---Drools-Library-issue-tf4564565.html#a13028564
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] How to have your emails ignored

2007-10-03 Thread Scott Reed

Mark Proctor's message received 10/3/2007 12:28 PM:

Scott Reed wrote:

Please tell me how I can call a function on the LHS.
(hurry my assignment is due today!)

Is that not covered by #2, it's more of an example for #2?
Actually I thought I was being funny about #11 and threw in the bit about getting my homework done 
for spice. I always get a kick out of the emails that ask for solutions to homework problems. Do we 
want to ignore those too?

#1. Start the email with URGENT
#2. Tell everyone how desparate you and how you need an immediate 
response for your really important project.
#3. Don't wait a minimum of 3 days and resend your email within minutes 
of hours.
#4. Send emails directly to mailing list members, especially the 
developers.

#5. Paste pages of code and then say it doesn't work, please help.
#6. Paste a long stack trace and say it doesn't work, please help.
#7. Start your email with please sirs or include do the needful.
#8. Ask dumb questions that are in the manual.
#9. Ask basic java questions.
#10. Ask questions about JRules
#11. Reply to an existing thread but starting a new topic
#12. Start your email with I'm a member of the drools mailinglist, so 
please answer me

#13. General begging and pleading

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


Re: [rules-users] rules precompilation

2007-10-03 Thread Scott Reed

You didn't even bother to read the thread you interrupted here, did you Sergey?

Manukyan, Sergey's message received 10/3/2007 1:29 PM:

Folks,

Where can I find information on how to pre-compile rules in 4.0.1?

Thanks,

-Sergey

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


Re: [rules-users] custom defined types in setter and getters

2007-10-03 Thread Steven Williams
No - you can use any java object as a fact, so both of your classes are
fine. For instance you could do:

when
  Car($p: paint)
then
  System.out.println($p.getName());
end

and using MVEL you could do:

when
  Car(paint.name == red)
then
  ...


On 10/4/07, jack wu [EMAIL PROTECTED] wrote:

 Hi, i suppose the second form of fact is not supported. but i'd like to
 confirm.

 in other words, you can only have setters and getters that return basic
 java types. is that right? can i return java collections such as array and
 map? the documentation is not clear on that.

 thanks.

 public class Paint
 {
 String getName();
 String getColor();
 }


 public class Car
 {
 int getSize();
 Paint getPaint();
 }


 jack.



 --
 Got a little couch potato?
 Check out fun summer activities for 
 kids.http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz

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




-- 
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Fernando Meyer
Hi,

You can check the drools insurance example
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-examples/drools-insurance/

Regards

On 10/3/07, Malika [EMAIL PROTECTED] wrote:


 Hello,

 I started to write web app using drools decision table. Here is what I
 have
 in my web project in eclipse 3.3,
 drools 4.0:

 1. A Jsp page that takes input and pass it on to a servlet that fires the
 rules.
 2. Servlet class has import statements:
 import org.drools.RuleBase;
 import org.drools.RuleBaseFactory;
 import org.drools.StatefulSession;
 import org.drools.StatelessSession;
 import org.drools.WorkingMemory; and so on..
 3. When I run the jsp on tomcat, it starts but when i hit submit it throws
 the exception:

 java.lang.NoClassDefFoundError: org/drools/RuleBase

 4. I have drools jar files added under project properties - build path-
 add
 external jars from

 C:\wtp_all_in_one\eclipse\configuration\org.eclipse.osgi\bundles\503\1\.cp\lib.
 This is showing all drools jar files under Libraries hierarchy.

 Could anyone please suggest what to do to resolve this error?

 Thanks and Regards,
 Malika


 --
 View this message in context:
 http://www.nabble.com/Drools-web-project-in-eclipse---Drools-Library-issue-tf4564565.html#a13028564
 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




-- 
Fernando Meyer http://fmeyer.org
JBoss Rules Core Developer
[EMAIL PROTECTED]
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Malika

I added jars to J2ee module dependencies and it worked fine. Thanks a lot!

Regards,
Malika



Steven Williams-5 wrote:
 
 Make sure the drools jars end up in your WEB-INF/lib directory.
 
 cheers
 Steve
 
 On 10/4/07, Malika [EMAIL PROTECTED] wrote:


 Hello,

 I started to write web app using drools decision table. Here is what I
 have
 in my web project in eclipse 3.3,
 drools 4.0:

 1. A Jsp page that takes input and pass it on to a servlet that fires the
 rules.
 2. Servlet class has import statements:
 import org.drools.RuleBase;
 import org.drools.RuleBaseFactory;
 import org.drools.StatefulSession;
 import org.drools.StatelessSession;
 import org.drools.WorkingMemory; and so on..
 3. When I run the jsp on tomcat, it starts but when i hit submit it
 throws
 the exception:

 java.lang.NoClassDefFoundError: org/drools/RuleBase

 4. I have drools jar files added under project properties - build path-
 add
 external jars from

 C:\wtp_all_in_one\eclipse\configuration\org.eclipse.osgi\bundles\503\1\.cp\lib.
 This is showing all drools jar files under Libraries hierarchy.

 Could anyone please suggest what to do to resolve this error?

 Thanks and Regards,
 Malika


 --
 View this message in context:
 http://www.nabble.com/Drools-web-project-in-eclipse---Drools-Library-issue-tf4564565.html#a13028564
 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

 
 
 
 -- 
 Steven Williams
 
 Supervising Consultant
 
 Object Consulting
 Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
 [EMAIL PROTECTED]
 www.objectconsulting.com.au
 
 consulting | development | training | support
 our experience makes the difference
 
 ___
 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/Re%3A-Drools-web-project-in-eclipse---Drools-Library-issue-tf4565053.html#a13032223
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