Re: [rules-users] JSR-94 and JEE integration
by Knoster
thank´s for your quick answer.
well, in witch context does your 'RuleLoader' reside? do u use ejbs for
access?
Corneil du Plessis wrote:
> We use JSR-94 and have a 'RuleLoader' that uses our rule definitions and a
> velocity script to generate the rules and creates a ruleset from that.
>
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Hehl, Thomas
> Sent: 10 June 2008 13:48
> To: 'Rules Users List'
> Subject: RE: [rules-users] JSR-94 and JEE integration
>
> I know nothing about jsr-94, but we use drools in a webapp, servlet side
> only.
>
> It seems to me you could simply put your rules into a stateless session
> bean.
>
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Knoster
> Sent: Tuesday, June 10, 2008 4:46 AM
> To: rules-users(a)lists.jboss.org
> Subject: [rules-users] JSR-94 and JEE integration
>
> Hi,
> i would like to integrate drools in jee. to be more flexible i was
loking at
> jsr-94. as i suppose jsr-94 only addresses j2se environment, my question
is:
> how it is possible to use drools with this specs from an ejb3 session bean?
> my thoughts about this brought me to the idea of injecting the
> rules-administrator via resource annotation to prevent the container always
> doing a class.forname(..) lookup. to define a j2se resource in a jee
> container a jca might be the best way to integrate and to assure the jee
> specs will not be violated. but this seams a lot of overhead to me.
> how do u use drools in your jee applications when not relying on the brms?
> any help or ideas on integrating drools with jsr-94 in jee would be great.
>
> Knosta
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 6 months
Re: [rules-users] JSR-94 and JEE integration
by Knoster
to access the engine from a servlet might not be the problem, as in
servlets some attributes are managed as singletons. but with ejb3 there
are no singletons, as i know.
Hehl, Thomas wrote:
> I know nothing about jsr-94, but we use drools in a webapp, servlet side
> only.
>
> It seems to me you could simply put your rules into a stateless session
> bean.
>
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Knoster
> Sent: Tuesday, June 10, 2008 4:46 AM
> To: rules-users(a)lists.jboss.org
> Subject: [rules-users] JSR-94 and JEE integration
>
> Hi,
> i would like to integrate drools in jee. to be more flexible i was loking
> at jsr-94. as i suppose jsr-94 only addresses j2se environment, my
> question is: how it is possible to use drools with this specs from an ejb3
> session bean? my thoughts about this brought me to the idea of injecting
> the rules-administrator via resource annotation to prevent the container
> always doing a class.forname(..) lookup. to define a j2se resource in a
> jee container a jca might be the best way to integrate and to assure the
> jee specs will not be violated. but this seams a lot of overhead to me.
> how do u use drools in your jee applications when not relying on the brms?
> any help or ideas on integrating drools with jsr-94 in jee would be great.
>
> Knosta
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 6 months
Accessing the fact model class files
by Felbecker, Tobias
Hi all, I create a *.pkg package with the BRMS and I want to access the
class files from my fact model at runtime. I coud't find a way to do so
in the org.drools.rule.Package API. Is there a way to do so?
Thx,
Tobi
16 years, 6 months
re[rules-users] -use of an object used in a previous rule
by Mounir Chattou
Hi,
I have a problem : a fact is inserted in a rule but when I cast for it in
another, nothing happened, here is a simplified code to understand better :
rule "eco"
ruleflow-group "economic"
salience 20
when
a : Alpha()
then
Beta beta = new Beta()
beta.add(a)
beta.setStatus("eco") // the property status is setted
insert(beta)
end
rule "fl eco"
ruleflow-group "economic"
salience 20
when
f : Fl ()
then
Fl fl = new Fl();
fl.add(f);
fl.setStatus("eco") // the property status is setted
insert(fl)
end
rule "pack eco"
ruleflow-group "economic"
when
f : Fl(status == "eco") //those two conditions are never casted
... while I inserted the facts
a : Alpha(status == "eco")
then
end
Could someone explain me why ?
--
View this message in context: http://www.nabble.com/re-use-of-an-object-used-in-a-previous-rule-tp17750...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 6 months
eval question
by Mike D
I'm close, but no cigar...
I have a header record amount and did an accumulate on a detail amount. The
sum of the detail can be within a percent of the total.
The $valueUsAmt is the header, and the totValue is the sum of lines...
What I need to do is to take the valueUsAmt * .0001 and if that is >= the
abs value, all is good.
eval($valueUsAmt.subtract($totValue).abs().compareTo(???) <= 0)
It's the * .0001 that is giving me the problem. Any help would be
appreciated.
Thanks!
--
View this message in context: http://www.nabble.com/eval-question-tp17647309p17647309.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 6 months
RE: [rules-users] JSR-94 and JEE integration
by Hehl, Thomas
I know nothing about jsr-94, but we use drools in a webapp, servlet side
only.
It seems to me you could simply put your rules into a stateless session
bean.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Knoster
Sent: Tuesday, June 10, 2008 4:46 AM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] JSR-94 and JEE integration
Hi,
i would like to integrate drools in jee. to be more flexible i was loking
at jsr-94. as i suppose jsr-94 only addresses j2se environment, my
question is: how it is possible to use drools with this specs from an ejb3
session bean? my thoughts about this brought me to the idea of injecting
the rules-administrator via resource annotation to prevent the container
always doing a class.forname(..) lookup. to define a j2se resource in a
jee container a jca might be the best way to integrate and to assure the
jee specs will not be violated. but this seams a lot of overhead to me.
how do u use drools in your jee applications when not relying on the brms?
any help or ideas on integrating drools with jsr-94 in jee would be great.
Knosta
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 6 months
JSR-94 and JEE integration
by Knoster
Hi,
i would like to integrate drools in jee. to be more flexible i was loking
at jsr-94. as i suppose jsr-94 only addresses j2se environment, my
question is: how it is possible to use drools with this specs from an ejb3
session bean? my thoughts about this brought me to the idea of injecting
the rules-administrator via resource annotation to prevent the container
always doing a class.forname(..) lookup. to define a j2se resource in a
jee container a jca might be the best way to integrate and to assure the
jee specs will not be violated. but this seams a lot of overhead to me.
how do u use drools in your jee applications when not relying on the brms?
any help or ideas on integrating drools with jsr-94 in jee would be great.
Knosta
16 years, 6 months
How to write related table dsl,dslr files
by Nagaraju runkana
Hi ,
i have some problem...
core_preference_text this my table name.Row like "VARIABLE_CODE" VARCHAR2(60
BYTE)"
i need write dsl,dslr files related data validation to the table.
1. variable_code should be unieque per enterprise_id
2. variable_code can not be updated
give me some suggestion ..how to write dsl,dslr file related two
conditions.ASAP..
=====
Chanti
16 years, 6 months
ClassCastException and other problems
by Sibylle Duerr
Hi there,
I have three issues, where I'm not sure if these are bugs in drools, or
if this is just the way it has to be.
the used classes in this case are:
Project
Model
ProcessModel extends Model
only the Project is in the working memory, because I didn't want to load
all elements due to performance issues (there can be thousends of
elements to load at startup).
if I have the following rule:
Project($models : models)
ProcessModel($activities : activities) from $models
there happen to be two problems. if the project does not only contain
ProcessModels but also TypeModels or others (all extend Model), this
leads to a ClassCastException.
I can solve this by writing the rule as follows:
Project($models : models)
$m : Model(eval($m instanceof ProcessModel)) from $models
ProcessModel($activities : activities) from $m
but this is not really nice and I hope there is a better solution for
this, is there?
the second problem this rule gives me, is when the set 'models' is
empty. that will also throw an exception. to solve this I write:
$p : Project(eval($p.hasModels()), $models : models)
$m : Model(eval($m instanceof ProcessModel)) from $models
ProcessModel($activities : activities) from $m
and I need to use this in each case where I have possible empty sets.
the last problem I encountered when I tried to load all elements to the
working memory and then redefine some rules. used classes:
Aggregation extends DomainElement
rule:
Aggregation(owner.owner != type.owner)
causes some exception. the root exception is a ClassCastException:
ProxyShadowProxy cannot be cast to Aggregation.
when I rewrite the rule as:
$element : DomainElement(eval($element instanceof Aggregation))
Aggregation(owner.owner != type.owner) from $element
everything works fine. but that again is not a nice solution.
any help?
best regards
sibylle
16 years, 6 months
Constants initialize
by Thalupula Ravi
Hi,
Can some one suggest me how can i initialize a constant (String), which is
common to all rules and the value of constant can able to change by Business
users (BRMS).
I think we can use global variable or fact, but that need to be supplied by
client program and initialized at client side.
I'm expecting initialization at rules side, which can easily maintain by
business users.
Thanks in advance.
Regards,
Ravi Thalupula
--
View this message in context: http://www.nabble.com/Constants-initialize-tp17731133p17731133.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 6 months