]
Michael Anstis moved GUVNOR-1922 to DROOLS-1918:
------------------------------------------------
Project: Drools (was: Guvnor)
Key: DROOLS-1918 (was: GUVNOR-1922)
Workflow: GIT Pull Request workflow (was: classic default workflow)
Component/s: Guided Rule Editor
Guided Template Editor
(was: Guided Rule Editor)
(was: Guided Rule Templates)
Affects Version/s: 5.5.0.Final
(was: drools-5.4.0.Final)
Guided rule editor: "from accumulate" should support
multiple pattern definitions
---------------------------------------------------------------------------------
Key: DROOLS-1918
URL:
https://issues.jboss.org/browse/DROOLS-1918
Project: Drools
Issue Type: Feature Request
Components: Guided Rule Editor, Guided Template Editor
Affects Versions: 5.5.0.Final
Reporter: Michael Anstis
Assignee: Michael Anstis
This was reported:-
On 27/07/12 03:34, Udaypal Aarkoti wrote:
> Michael,
>
> I was talking to Edson about what's the best way to build a PoC for a customer
that I am working with and Edson gave a few suggestions. Those more mostly using DRL but I
wanted to convert them into a Rule Template that customer can simply use to fill in values
but looks like I hit a limitation here and wanted to check if there any way around it.
>
> Here is the psuedo code and the rule I am trying to implement
>
> Class Partner {}
> Class Representation{ Partner partner }
> Class Training {Representative rep}
>
> The main problem I am facing is that I cannot seem to have a compound condition
using "from accumulate" as show below in guided editor. I am able to use either
a "Representative" Object or "Training" object as a condition but NOT
both using the guided editor.
>
> Is that true? Is there a way around it? I don't want to use DSL because there
are some key bindings that needs to be passed to the condition (i.e user will enter value
in the template that need to be passed down to the DSL, which I believe is not currently
supported).
>
>
> rule "Accumulate partner Trainings for RPPOS100"
>
> when
> $p : Partner()
> $count : Number() from accumulate( $r : Representative( partner == $p ) and
Training( representative == $r, name == "RPPOS100" ), count( 1 ) )
> then
> System.out.println("Testing : " + $count);
> end