What result do you get with the following (on a single row):-<br><br><span style="font-family:courier new,monospace">ACTION | ACTION | ACTION</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">------------------------------+---------------------------------------+-------------------------</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
FeeDTO feeDTO = new FeeDTO(); | feeDTO.setAmount(new BigDecimal($1)); | feeDTO.setReason("$1")</span><br style="font-family:courier new,monospace"><br><br><br><div class="gmail_quote">On 7 January 2013 15:11, aleste <span dir="ltr"><<a href="mailto:moisesventura@gmail.com" target="_blank">moisesventura@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to create a new object, populate a number of attributes in it and<br>
insert it in memory as part of the ACTION in a decision table XLS.<br>
<br>
I was able to do that in a single XLS column:<br>
<br>
ACTION<br>
insertLogical( new RuleError(t, Constants.ErrorType.PROMOTION, $1, $2));<br>
<br>
Or using the guided decision tables in Guvnor:<br>
<br>
FeeDTO [f3]<br>
amount<br>
10<br>
20<br>
(...)<br>
<br>
But I have not been able to do it using an XLS and having multiple ACTION<br>
columns. Something like:<br>
<br>
ACTION ACTION<br>
FeeDTO feeDTO = new FeeDTO();<br>
feeDTO.setAmount(new BigDecimal($1)); feeDTO.setReason("$1");<br>
<br>
<br>
This is the rule that I'd be expecting as result of the XLS compilation:<br>
<br>
//from row number: 3<br>
rule "Row 3 FeesTest"<br>
dialect "mvel"<br>
when<br>
f1 : FinancialTransactionDTO( transactionType == TRANSACTION_TYPE.DEPOSIT<br>
)<br>
then<br>
FeeDTO f3 = new FeeDTO();<br>
f3.setAmount( 20 );<br>
f3.setType( "Some Description" );<br>
f3.setOverrideable (true);<br>
insert( f3 );<br>
end<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/New-object-in-XLS-ACTION-tp4021374.html" target="_blank">http://drools.46999.n3.nabble.com/New-object-in-XLS-ACTION-tp4021374.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>