作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 JRules 编写业务规则。我想向规则添加注释,如下面非常简单的示例所示。我知道该规则有一个文档部分,但这不是我所需要的
// 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'
显然,使用通常的 c++ 和 c# 双正斜杠//在上面的示例中不起作用,所以我的问题是如何将注释添加到 BAL 中的规则。
最佳答案
很遗憾,您无法在规则中添加评论。如果语言表达得当,规则应该是不言自明的。
但是如果您想记录每个规则的业务理由,您可以使用文档功能。
关于business-rules - 如何将注释行添加到以业务操作语言编写的业务规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8976023/
我是一名优秀的程序员,十分优秀!