I normally do something like
when
$creditContract : CreditContract()
$o : Applicant() from $creditContract.coApplicantArray
then
insert($o);
end
retract would be something like
when
$o : Applicant( )
CreditContract( coApplicantArray contains $o )
then
retract($o);
end
cheers
Steve
On Tue, Feb 10, 2009 at 6:36 AM,
<kfs2@chryslerfinancial.com> wrote:
There may be a better way but I did
it using a function as below:
function
void
insertArray(WorkingMemory workingMemory, Object[] array)
{
for
(int
i=0;i<array.length;i++)
{
workingMemory.insert(array[i]);
}
return;
}
...
rule
"StarCoApplicants"
ruleflow-group
"STAR"
dialect
"mvel"
when
$creditContract : CreditContract ()
then
insertArray(drools.workingMemory,$creditContract.coApplicantArray);
end
Kent Symanzik
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users