A simple tip when creating DSLs:

Write an example rule as DRL first!

:)

Then, if it's working DRL code (get familiar with unit testing rules) use DSL to map 'plain English' phrases to the DRL code you just wrote.

It's then also worth writing a simple unit test around a hand-cranked DSRL rule which uses your DSL, before sticking it in Guvnor.




On 18 Feb 2013, at 16:16, Esteban Aliverti <esteban.aliverti@gmail.com> wrote:

In the sentence 'Transaction.setChargeFee( true)', 'Transaction' is not making reference to the fact (unless you have bound it and you are not showing that piece) but to the class named 'Transaction'.

Best Regards,




XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com


On Mon, Feb 18, 2013 at 4:48 PM, IPatel <ishita.patel@usbank.com> wrote:
Thank you for your response.

Here is the another option i used. Instead of using variable $item. I used
the fact itself as following:
[then] Charge a fee = Transcation.setChargeFee( true)

when i used this i am getting "There was an error executing the consequence
of rule"...

Any idea how can i fix this??



--
View this message in context: http://drools.46999.n3.nabble.com/When-Then-In-DSL-Rule-tp4022407p4022410.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