What result do you get with the following (on a single row):-
ACTION | ACTION |
ACTION
------------------------------+---------------------------------------+-------------------------
FeeDTO feeDTO = new FeeDTO(); | feeDTO.setAmount(new BigDecimal($1)); |
feeDTO.setReason("$1")
On 7 January 2013 15:11, aleste <moisesventura(a)gmail.com> wrote:
I'm trying to create a new object, populate a number of
attributes in it
and
insert it in memory as part of the ACTION in a decision table XLS.
I was able to do that in a single XLS column:
ACTION
insertLogical( new RuleError(t, Constants.ErrorType.PROMOTION, $1, $2));
Or using the guided decision tables in Guvnor:
FeeDTO [f3]
amount
10
20
(...)
But I have not been able to do it using an XLS and having multiple ACTION
columns. Something like:
ACTION ACTION
FeeDTO feeDTO = new FeeDTO();
feeDTO.setAmount(new BigDecimal($1)); feeDTO.setReason("$1");
This is the rule that I'd be expecting as result of the XLS compilation:
//from row number: 3
rule "Row 3 FeesTest"
dialect "mvel"
when
f1 : FinancialTransactionDTO( transactionType ==
TRANSACTION_TYPE.DEPOSIT
)
then
FeeDTO f3 = new FeeDTO();
f3.setAmount( 20 );
f3.setType( "Some Description" );
f3.setOverrideable (true);
insert( f3 );
end
--
View this message in context:
http://drools.46999.n3.nabble.com/New-object-in-XLS-ACTION-tp4021374.html
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