Perhaps another (simpler) approach (showing columns as rows):
ACTION || myMap.put(new KeyPojo($1,$2,$3), || 1,22,333
ACTION || $param); || 122333
-W
On 04/06/2012, Vincent LEGENDRE <vincent.legendre(a)eurodecision.com> wrote:
The formula trick works : POI (api used inside drools) is reading
values by
default for cells (at least the last time I used that in 5.1 version).
The main problem of this is when users adds new rows : you must ensure that
formula are copied too .... and this lead to other dirtier tricks (like
using VB ...) or strict user manual (to force users to COPY row instead of
adding brand new one ...)
----- Original Message -----
From: "Wolfgang Laun" <wolfgang.laun(a)gmail.com>
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Sent: Lundi 4 Juin 2012 09:11:19
Subject: Re: [rules-users] Drools Decision Table, multiple actions
accumulation
On 04/06/2012, FrankVhh <frank.vanhoenshoven(a)agserv.eu> wrote:
> Hi all,
>
> There is a small remark/comment that pops into my head when reading this.
> Giving the effort that has already been spent on the issue, this might
> come
> a bit late to you, but whatever...
>
> Wouldn't it also be possible to keep your excel decision table exactly
> the
> way it originally was (everything in one column) and then exploit the
> excel
> capabilities?
>
> I.e.
> 1) Insert two extra columns (one for the key, one for the value).
> 2) Do not annotate them with CONDIITION!
I guess you mean ACTION.
> 3) Create a function in your initial column that would compose the value
> of
> the two new columns.
I haven't tried it either, but I'd think that the API accessing the
spreadsheet would have to return the formula rather than the value
computed from it.
And, IIRC, if the additional columns aren't headed with one of
CONDITION, ACTION,... they'd stop access by the spreadsheet parser. So
they would have to be the rightmost columns, which might not be
convenient in general.
-W
> 4) Hide the real condition column.
>
> I have not yet tried this myself, but it might work.
>
> regards,
> Frank
>
>
> manstis wrote
>>
>> But each column became a separate DRL fragment ;) but glad to read you
>> got
>> it working :)
>>
>> One for me to remember. Thanks Vincent
>>
>> sent on the move
>>
>> On 2 Jun 2012 01:47, "chsekhar" <chandrasekhar.a@>
wrote:
>>
>>> I was able to merge data from multiple ACTION columns in decision
>>> table.
>>>
>>> First ACTION column:
>>> (kept all keys as comma separated in single column. we can have it in
>>> individual columns)
>>> KeyPojo keys = new KeyPojo($1,$2,$3);
>>>
>>> Second ACTION column:
>>> $myMap.put(keys, $param);
>>>
>>> This worked great. Thanks Vincent for your answer.
>>>
>>> --
>>> View this message in context:
>>>
http://drools.46999.n3.nabble.com/Drools-Decision-Table-multiple-actions-...
>>> Sent from the Drools: User forum mailing list archive at
Nabble.com.
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users@.jboss
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users@.jboss
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> --
> View this message in context:
>
http://drools.46999.n3.nabble.com/Drools-Decision-Table-multiple-actions-...
> Sent from the Drools: User forum mailing list archive at
Nabble.com.
> _______________________________________________
> 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