I can't try in mvel/drools right now, but String has length(), not size.
On Sat, Nov 12, 2011 at 1:29 PM, lansyj wrote:
> Hi folks,
>
> I'm trying to create a guided rule which treats customers differently based
> on the length of their customer ID. The generated rule source is as follows:
>
> ru
Maybe your actual business needs have a procedural, flow chart like
aspect to them?
You can chain ruleflow groups in Drools Flow...
If your needs are mostly declarative and you'd like to handle a rare
exception with this "fire once" rule, it can be done of course by
tweaking the rule a bit:
One wa
This is I think something all of us came across while learning Drools...
So I searched for "drools loop faq" in google but nothing useful came up.
I propose to extend the "inifinite recursion" section in the faq with
the best practices for avoiding this!
My favorite way to avoid unnecessary activ
Hi,
>From what I know, it's generally better to make the rules idempotent:
In your case introduce a discountedPrice field, leaving the original
price alone.
If you insist on making it run only once instead, you can introduce a
field or fact class to mark an order "discounted", then all
discountin
Please excuse my blind bias against globals, but isn't this what Querys are
there for?
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e5362
Gabor
___
rules-users mailing list
rules-users@lists.jboss.org
$m = Map()
eval( "PalpusztaiChese".equals($m.get("type")) )
eval((Integer)$m.get("smell") > 11 )
then
modify($m) { set("QA","pass"); }
end
(A DSL could completely hide this difference though, couldn't it?)
Tha
On Wed, Jan 19, 2011 at 6:12 PM, H.C. wrote:
> I have been doing some more testing and have observed that the test case
> will actually sometimes evaluate to true. Out of 10 runs, 2 succeeded and 8
> failed.
I'll elaborate on the "some code to reproduce" part:
Try to simplify the test, eliminate
Hi,
Without understanding the intricacies, just on general sw engineering
principles:
Is the number of possible package combinations too high to cache a rulebase
instance for each combination, or at least the ones anybody used recently?
If you have n toggle buttons on the GUI to include different
Hi,
On Wed, Jan 19, 2011 at 8:35 AM, Mark Proctor wrote:
>
> Any takers for a more robust sudoku example, that demonstrates best
> practice?
I'm considering volunteering as a learning exercise. Won't be perfect
at first, but you can drill me on those best practices for free :-)
However I don't
Hi,
Purely for educational purposes I am trying to figure out how this
will work when multiple Sale instances share the same "type" string.
It seems to me that under the default "identity" assertion mode of the
Working Memory, as many SaleType instances would be maintained as
there are unexpired
Hi,
2011/1/3 Kiran Ananthpur Bacche (kbacche) :
> I want the rule to fire successfully only when the TotalSalesAmount for
> _any_ given type exceeds 100.
I've never used "accumulate" myself, so I looked it up in the manual,
and there's an example that's exactly what you want :-)
(just substitute
On Sat, Jan 1, 2011 at 1:43 PM, ge0ffrey wrote:
>
> I agree on the normal constraints with vincent. The 100% sold is like nurses
> falling sick.
> You cannot plan it in advance.
I could be misunderstanding the domain, but I though that's exactly
what he wants the most :-)
And the historical data
Hi,
I'm just learning Drools, so I could be dead wrong, but it sounds like
you need "reasoning over the the absence of events" just like
advertised here:
http://www.jboss.org/drools/drools-fusion.html#Drools_Fusion_Features
On Mon, Dec 13, 2010 at 9:20 AM, rodih wrote:
> In more details: I want
stance.getVariable("forEachVariable") ) )
...
then
Is that the way, or am I missing something here?
Thanks in advance:
Gabor Szokoli
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Hi,
2010/12/8 Robert Miyashiro :
> Is there some kind of evaluation mode or setting that will make
> Drools pay attention to the order in which objects are inserted into the
> session?
Not that I know of, but here's a way to externally supply the pairs of
objects to fire on:
rule
when
$list1
suspect what you'd want.
Ahh, the dog ate my equals sign:
<<<
$attribute : StringHolder(get()!="value")
$child: Child(parent==$parent ... attribute==$attribute)
>>>
But the real question here is how I can make Drools treat my
attributes as the atomic un
I think I've got your use case: you are making XSLT on steroi^W some
kind of cheese that tastes stimulating and is dense in nutrients but
is in no way controversial.
It would allow user rules for removing stuff, and have built-in rules
for transitively removing unreferenced stuff, right?
On Mon, D
om the logical point of view, why do you need to retract
unreferenced facts? Do you see performance issues from too many facts?
Gabor Szokoli
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
he attention-whoring double take in nomenclature, does
that rule pattern look OK?
I'll stick with cheese in the future :-)
Thanks Again!
Gabor Szokoli
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
)
$attribute : StringHolder(get()!="value")
$child: Child(parent==$parent ... attribute=$attribute)
then
modify ($attribute) { set("value") }
end
That looks worse than before! Please share your thoughts.
Thanks in advance:
Gabor Szokoli
__
20 matches
Mail list logo