[英]How can I add Formula in Guided Decision table in Drools Kie Workbench?
我嘗試根據工資添加公式來計算工資嗎?
if(age>25)
Salary = Salary + cofactor *Salary
我的規則:
來源:Kie Workbench在以下代碼中創建;
package com.myteam.rbffiyatlama2;
//from row number: 1
rule "Row 1 GDT1" extends "GR1"
dialect "mvel"
when
f1 : Employee( age >= 25 )
then
modify( f1 ) {
setSalary( 0.0 )
}
end
但是我不能使用以下方式設置薪水:薪金=薪金+輔因子*薪金
通過使用指導規則表,我的所需規則必須在下面:
package com.myteam.rbffiyatlama2;
//from row number: 1
rule "Row 1 GDT1" extends "GR1"
dialect "mvel"
when
f1 : Employee( age >= 25 )
then
modify( f1 ) {
setSalary( f1.Salary + f1.cofactor *f1.Salary )
}
end
如何在“指導決策”表中添加(setSalary(f1.Salary + f1.cofactor * f1.Salary))的公式?
我遇到了這種情況,並執行以下操作:綁定條件列並添加操作brl片段列-修改字段的值-字段值公式並添加我的公式。
最后我有這個gui表的來源
package com.myspace.project;
//from row number: 1
rule "Row 1 gui"
dialect "mvel"
when
$c : Customer( $b : balance, $d : discount)
then
modify( $c ) {
setIncome( $b*$d*10 )
}
end
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.