.
>> > I can't figure out what might be causing this.
>> >
>> > Thanks
>> >
>> > On Tue, Jan 10, 2012 at 10:08 PM, Davide Sottara
>> wrote:
>> >
>> >> Did you remember to bind $item to some expression in the LHS ? Maybe
ht be causing this.
> >
> > Thanks
> >
> > On Tue, Jan 10, 2012 at 10:08 PM, Davide Sottara
> wrote:
> >
> >> Did you remember to bind $item to some expression in the LHS ? Maybe you
> >> just
> >> called that "item" without th
, Davide Sottara wrote:
>
>> Did you remember to bind $item to some expression in the LHS ? Maybe you
>> just
>> called that "item" without the $ :)
>> Davide
>>
>> (the original "modify" syntax is still wrong anyway)
>>
>> --
&
users-For-loop-inside-a-modify-block-problem-tp3648460p3651214.html
Sent from the Drools: User forum 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-boun...@lists.jboss.org] *On Behalf Of *Mark Proctor
> *Sent:* 11 January 2012 15:27
> *To:* rules-users@lists.jboss.org
>
> *Subject:* Re: [rules-users] For loop inside a modify block problem
>
> ** **
>
> Why no braces after SomeBusinessLogic?
>
>
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mark Proctor
Sent: 11 January 2012 15:27
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] For loop inside a modify block problem
Why no braces after SomeBusinessLogic?
Also your logic
expression in the LHS ?
Maybe you just
called that "item" without the $ :)
Davide
(the original "modify" syntax is still wrong anyway)
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-For-loop-inside-a-modify-block
Is this literally your rule? This one is missing () after
> SomeBusinessLogic,
> which might be confusing the parser...
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-For-loop-inside-a-modify-block-problem-tp3648460p3650235.html
> Sent
.nabble.com/rules-users-For-loop-inside-a-modify-block-problem-tp3648460p3650235.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
27;...
>
> I can't figure out what might be causing this.
>
> ** **
>
> Thanks****
>
> ** **
>
> On Tue, Jan 10, 2012 at 10:08 PM, Davide Sottara wrote:
>
>
> Did you remember to bind $item to some expression in the LHS ? Maybe you
> jus
ntity, and says 'no
>>> such identifier $item'...
>>> I can't figure out what might be causing this.
>>>
>>> Thanks
>>>
>>> On Tue, Jan 10, 2012 at 10:08 PM, Davide Sottara wrote:
>&
il.com>> wrote:
Did you remember to bind $item to some expression in the LHS ? Maybe you just
called that "item" without the $ :)
Davide
(the original "modify" syntax is still wrong anyway)
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-For-
gure out what might be causing this.
>>
>> Thanks
>>
>> On Tue, Jan 10, 2012 at 10:08 PM, Davide Sottara wrote:
>>
>>> Did you remember to bind $item to some expression in the LHS ? Maybe you
>>> just
>>> called that "item" with
Maybe you
>> just
>> called that "item" without the $ :)
>> Davide
>>
>> (the original "modify" syntax is still wrong anyway)
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/rules-users-For-loop-
n in the LHS ? Maybe you
> just
> called that "item" without the $ :)
> Davide
>
> (the original "modify" syntax is still wrong anyway)
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-For-loop-inside-a-modify-block-pr
Did you remember to bind $item to some expression in the LHS ? Maybe you just
called that "item" without the $ :)
Davide
(the original "modify" syntax is still wrong anyway)
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-For-loop-inside-a-
what is this doing:
for (int i = 0; i < $item.quantity; i++) {
$gsc.doSomethingElse($item.id);
}
"i" is not being used inside the $gsc.doSomethingElse($item.id); sentence..
that means that you are executing that always with the same
parameter.. do you really need that?
By the way
Strangely, after making the changes, that 'for' loop makes the Drools
engine to come up with the same error (no such identifier).
I commented the loop and it does not throw that error.
Any ideas why this happens?
Thanks
On Tue, Jan 10, 2012 at 9:04 PM, Martin A wrote:
> Hi, Mauricio,
>
> Than
Hi, Mauricio,
Thanks for the help.. but what do you mean by ' that loop is not doing
anything '
Regards,
Martin
On Tue, Jan 10, 2012 at 8:59 PM, Mauricio Salatino wrote:
> yeah.. sort of..
> you can do
>
> $gsc.doSomething($item.id);
> for (int i = 0; i < $item.quantity; i++) {
>
yeah.. sort of..
you can do
$gsc.doSomething($item.id);
for (int i = 0; i < $item.quantity; i++) {
$gsc.doSomethingElse($item.id);
}
update($gsc);
but by the way.. that loop is not doing anything ..
2012/1/10 Martin A :
> Hello,
>
> I suppose that means something like:
>
>
Hello,
I suppose that means something like:
modify ($gsc) {
doSomething($item.id);
}
for (int i = 0; i < $item.quantity; i++) {
$gsc.doSomethingElse($item.id);
}
update($gsc);
Thanks,
Martin
2012/1/10 Wolfgang Laun
> No can do,
No can do, because within a modify block a comma-separated list of (setter)
method calls of the object between the parentheses must be written.
Note that you can change a fact (without a modify statement) - just follow
this with an update call.
See the Expert manual for details.
-W
2012/1/10 M
You just need to do the loop outside the modify block and then just
update the object.
Cheers
2012/1/10 Martin A :
> Hello, guys,
>
> I have the following snippet of a right side rule:
>
>
> modify ($gsc) {
> doSomething($item.id);
>
> for (int i = 0; i < $item.quan
Hello, guys,
I have the following snippet of a right side rule:
modify ($gsc) {
doSomething($item.id);
for (int i = 0; i < $item.quantity; i++) {
doSomethingElse($item.id);
}
}
which looks like is invalid syntax in some way, b
24 matches
Mail list logo