business-rulesjrules

How do I add comment lines to a business rule authored in Business Action Language


I am using JRules to author business rules. I want to add comments to the rules as shown in the very simple example below. I realise there is a documentation section for the rule but that is not what I require

// comments needed here

definitions 
set 'an existing customer' to a customer
where the category of 'an existing customer' is "gold"

if 
the city of 'an existing customer' is "London"

then
give a 5% discount to 'an existing customer'

else
// and more comments needed here
give a 10% discount to 'an existing customer'

Clearly, using the usual c++ and c# double forwardslash // will not work in the example above, so my question is how are comments added to rules in BAL.


Solution

  • Unfortunately you cannot add comments in rules. The rules are supposed to be self explanatory if the verbalization is good.

    But you can use the documentation feature,if you want to document the business justification for each of the rules.