我是JBOSS DROOLS的新手, 我需要在DROOLS规则下面低于伪代码。 让我知道DROOLS统治的任何聪明方式。
if(Prod_of_Interest == "Signature Card" || Prod_nm == "001")
seg= '5555'
else if(Prod_of_Interest == "SBI Platinum Card" || Prod_nm == "002")
seg= '6666'
else if(Prod_of_Interest ==SBI Platinum Card == "SBI Gold & More Card" || Prod_nm == "003")
seg= '7777'
else if(Prod_of_Interest ==SBI Platinum Card == "Yatra SBI Card" || Prod_nm == "004")
seg= '8888'
else if(Prod_of_Interest ==SBI Platinum Card == "SpiceJet SBI Card" || Prod_nm == "005")
seg= '9999'
else if(Prod_of_Interest ==SBI Platinum Card == "SBI Maruti Card" || Prod_nm == "006")
seg= '1111'
else if(Prod_of_Interest ==SBI Platinum Card == "TATA Card" || Prod_nm == "007")
seg= '2222'
else if(Prod_of_Interest ==SBI Platinum Card == "SBI Oriental Bank of Commerce Platinum Card" || Prod_nm == "008")
seg= '3333'
DROOLS规则
rule "Card1"
when
CARD( Prod_of_Interest == Signature Car || Prod_nm : 001 )
then
Response s= new Response()
s.setSeg( "5555" );
end
答案 0 :(得分:0)
警告:级联if不等同于反映这些条件的一组规则。除非采取对策,否则规则将独立匹配并开火。
这不是一个真正的答案 - 请遵循史蒂夫的建议并提供更多信息。