How to update the working memory of a nested object attribute
by Wishing Carebear
Hi,
My rules update the nested object attributes :eligibilityScore which is used
in another rule downstream.
Only the Client object is sent as fact, the nested object is derived using
the from keyword (list of services)
rule "Rule 8 EligibilityRating"
agenda-group "EligibilityRating"
no-loop true
salience 5
//dialect "mvel"
when
$client : Client(type == "Preferred")
$policy : Service(productType == "Vehicle Insurance") from
$client.service
then
System.out.println(" Rule 8 ER = type == preferred:"+
$policy.getId() + ": -50");
int eScore = $policy.getEligibilityScore() - 50;
* $policy.setEligibilityScore(eScore);* // how to let the downstream
rule know that this atribute value is updated without letting this current
rule go into infinite loop
end
Any suggestion is greatly appreciated
15 years
Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules
by pamerida
Hi everyone,
I am trying to create some rules with Guvnor guided editor but when I try to
validate the rule it gives me a error message like this:
"Unable to wire compiled classes, probably related to compilation
failures:[Error: unable to resolve method using strict-mode:
java.lang.Object.dateTimePeriod()] [Near : {...
DTM[0].dateTimePeriod.dateOrTimeOrPer ....}] ^ [Line: 1, Column: 8"
I have tried to turn off the strict mode by modifying the
drools.packagebuilder.conf putting false in this property, but nothing seems
to work
drools.dialect.mvel.strict = false
Thanks so much for your help... :)
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-2-0-Final-in-Tomcat-6-0-32-fai...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
Implementation of not conditional expression
by jkrupka
How is the not conditional expression implemented? I am using it as a gate
expression - I can't remember if that's the correct technical term or not,
basically I'm using that expression to prevent the rules engine from having
to evaluate additional expressions on the same rule which I know to be
somewhat expensive and potentially frequently evaluated and added to the
agenda, but only infrequently executed (due to highly dynamic facts). In
the testing I have done, it seems to work well, but I'm not sure if there's
a certain number of facts where the not CE calculation will outweigh the
thing it's preventing. Is the not CE something that's optimized, or does
the rules engine have to look through all the facts of that type to
determine if the not CE is true? In my case there could be 10's of
thousands of the fact on which I have the not CE.
--
View this message in context: http://drools.46999.n3.nabble.com/Implementation-of-not-conditional-expre...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
get inserted facts
by Ruault Gaetan
Hi,
I use drools in stateless Session like this :
session.execute( my_facts_list) ;
and i have many rules like this
when
Type1(filter1 =1)
Then
Insert( new Fact()) ;
Could you explain how it's possible to retrieve my new facts in java code ?
Thanks.
Gaetan
15 years
Re: [rules-users] Drools and ArrayList
by wendy
I think normally setGlobal variables are only used when you want to be able
to call back out to the java code again. (I'm not an expert by any stretch
so please take that with a grain of salt.) So you might be able to just
insert the list.
I'm going to assume the List is really List<NombersUnTypeDefault> if that is
not true please let me know.
what about something like this? First is collects all the
NombersUnTypeDefault that match your constraints from list then it counts
them using an accumulate function.
global java.util.List list
rule "Calcul redondance"
when
$i: Number() from accumulate($c: NombersUnTypeDefault()
from collect(NombersUnTypeDefault($code ==
"AAA", $int == 1) from list)
, count($c));
then
System.out.println($i);
end
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-and-ArrayList-tp3140821p3144161....
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
How do we use a huge collection in the condition of a rule
by Prasad
Hi All,
Is there a way in which we can use a collection in the condition of a rule
(to be used in contains, memberof) , which can be managed by a Guvnor User
containing big list of elements (may be 10,000).
Having this in a Database is an option but considering the maintenance of
the list where in a user(who doesn't have Database Knowledge) has to update
the list frequently, can this collection be maintained in Guvnor and used in
the Condition of a rule.
Thanks,
Prasad
--
View this message in context: http://drools.46999.n3.nabble.com/How-do-we-use-a-huge-collection-in-the-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
Re: [rules-users] How to change database configuration from derby to oracle?
by Michael Anstis
HI Deepak,
You never did answer my question:
Can you create new rules when configured to use Oracle? If so your
configuration, I'd assume, to be correct. AFAIK the repository folder is
only relevant if you're using JCR's file-system storage - if configured to
use a database I doubt it has much relevance. So you'll need to export the
repository XML first (your comment above implied you know how) from Derby,
re-configure for Oracle and import.
With kind regards,
Mike
2011/7/6 Deepak Cherukuri <deepak.cherukuri(a)valuemomentum.biz>
> Dear All,****
>
> Firstly, before deploying the Drools guvnor in weblogic11g , I set the
> repository configuration in components.xml.below is the path i mentioned for
> repositoryConfiguration****
>
> <component name="repositoryConfiguration">
> <property name="homeDirectory">E:/GuvnorRepo/</property>****
>
> Deployed the Drools guvnor in weblogic11g , and in E drive GuvnorRepo
> folder has created with 3 sub folders workspaces,repository,version and
> repository.xml.
> Now i updated the repository.xml for changing the database from derby to
> oracle.
> Below are the changes
> <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
>
> <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
> <param name="url" value="jdbc:oracle:thin:@rsa10gserver:1525:ifpub34"/>
> <param name="user" value="drools_repository"/>
> <param name="password" value="drools_repository"/>
> <param name="schema" value="oracle"/>
> <param name="schemaObjectPrefix" value="version_"/>
> <param name="tableSpace" value=""/>
> <param name="errorHandling" value=""/>
> </PersistenceManager>****
>
> Now i restarted the weblogic11g and it successfully deployed and entered
> into the login page and but i could not see any rules in the left navigation
> page.****
>
> Is there any other procedure rather than what I have done?****
>
> Whether I should import/export new repository.xml ?****
>
> Please help me regarding this.****
>
> ** **
>
> ** **
>
> *Thanks & Regards*
>
> * *
>
> *Deepak Cherukuri* | Software Engineer****
>
> Value Momentum Software Services Pvt Ltd(SEZUnit),****
>
> HitechCity2, Gachibowli(V)****
>
> Hyderabad 500 081****
>
> deepak.cherukuri(a)valuemomentum.biz ****
>
> Cell: +91 95537 - 95999****
>
> http://www.valuemomentum.com****
>
> [image: cid:image003.jpg@01CA595B.191D0A30]****
>
> ** **
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
15 years
How to change database configuration from derby to oracle?
by Deepak Cherukuri
Dear All,
Firstly, before deploying the Drools guvnor in weblogic11g , I set the
repository configuration in components.xml.below is the path i mentioned for
repositoryConfiguration
<component name="repositoryConfiguration">
<property name="homeDirectory">E:/GuvnorRepo/</property>
Deployed the Drools guvnor in weblogic11g , and in E drive GuvnorRepo folder
has created with 3 sub folders workspaces,repository,version and
repository.xml.
Now i updated the repository.xml for changing the database from derby to
oracle.
Below are the changes
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManage
r">
<param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
<param name="url" value="jdbc:oracle:thin:@rsa10gserver:1525:ifpub34"/>
<param name="user" value="drools_repository"/>
<param name="password" value="drools_repository"/>
<param name="schema" value="oracle"/>
<param name="schemaObjectPrefix" value="version_"/>
<param name="tableSpace" value=""/>
<param name="errorHandling" value=""/>
</PersistenceManager>
Now i restarted the weblogic11g and it successfully deployed and entered
into the login page and but i could not see any rules in the left navigation
page.
Is there any other procedure rather than what I have done?
Whether I should import/export new repository.xml ?
Please help me regarding this.
Thanks & Regards
Deepak Cherukuri | Software Engineer
Value Momentum Software Services Pvt Ltd(SEZUnit),
HitechCity2, Gachibowli(V)
Hyderabad 500 081
<mailto:deepak.cherukuri@valuemomentum.biz>
deepak.cherukuri(a)valuemomentum.biz
Cell: +91 95537 - 95999
<http://www.valuemomentum.com/> http://www.valuemomentum.com
cid:image003.jpg@01CA595B.191D0A30
15 years