Re: [rules-users] New object in XLS ACTION

2013-01-15 Thread aleste
Mantis:

Yes, that did the trick. 

I have been trying to find a way to perform the create and insert
automatically, without having to add the two additional columns, in a
similar way as the guided decision tables do, but no luck.

Thanks a lot for your help.

MV




--
View this message in context: 
http://drools.46999.n3.nabble.com/New-object-in-XLS-ACTION-tp4021374p4021538.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] New object in XLS ACTION

2013-01-15 Thread Michael Anstis
Glad you have it working.

The guided decision table in Guvnor is no different. The example you gave
only populates the amount field.

FeeDTO [f3]
amount
10
20
(...)

You'd still need to add additional columns for the other fields.

On 15 January 2013 13:27, aleste moisesvent...@gmail.com wrote:

 Mantis:

 Yes, that did the trick.

 I have been trying to find a way to perform the create and insert
 automatically, without having to add the two additional columns, in a
 similar way as the guided decision tables do, but no luck.

 Thanks a lot for your help.

 MV




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/New-object-in-XLS-ACTION-tp4021374p4021538.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] New object in XLS ACTION

2013-01-14 Thread Michael Anstis
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 moisesvent...@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@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] New object in XLS ACTION

2013-01-07 Thread aleste
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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users