I'm new to JBOSS DROOLS , i need to imp below pseudo code on DROOLS rule. Let me know any smart way imp DROOLS rule.
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
rule "Card1"
when
CARD( Prod_of_Interest == Signature Car || Prod_nm : 001 )
then
Response s= new Response()
s.setSeg( "5555" );
end