The use of "Otherwise" is not supported in XLS at the moment.<br><br>There is an open JIRA to address this: <a href="https://issues.jboss.org/browse/GUVNOR-1278">https://issues.jboss.org/browse/GUVNOR-1278</a><br>
<br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 15 August 2012 21:16, dme1 <span dir="ltr"><<a href="mailto:mehtad@hotmail.com" target="_blank">mehtad@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
How do I use <otherwise> in Decision Tables created using Eclipse (Excel<br>
Spreadsheets). I have created a rule where I have provided "<otherwise>" as<br>
a criteria but its been taken as the value of the parameter instead of<br>
creating a separate rule with the "not" clause. I am providing the<br>
screenshot of the decision table as well as the rules generated by Drools.<br>
<br>
I would much appreciate if someone can advise on how I can use <otherwise><br>
in my rules.<br>
<br>
<a href="http://drools.46999.n3.nabble.com/file/n4019162/droolsdt.jpg" target="_blank">http://drools.46999.n3.nabble.com/file/n4019162/droolsdt.jpg</a><br>
<br>
Drools conversion to ".drl" below (Rule Flight_Type_Rules_15 shows<br>
<otherwise> being used as parameter valUE):<br>
<br>
DRL is :: package com.test.BasicDTRules;<br>
//generated from Decision Table<br>
import java.util.Date;<br>
import com.test.Flight;<br>
// rule values at C11, header at C6<br>
rule "Flight Type Rules_11"<br>
when<br>
flight : Flight(flightNumber >= "0001", flightNumber <= "1000",<br>
airlineCode == "BA")<br>
then<br>
flight.setFlightType("SH");<br>
flight.setValid(true);<br>
System.out.println("Row 1");<br>
end<br>
<br>
// rule values at C12, header at C6<br>
rule "Flight Type Rules_12"<br>
when<br>
flight : Flight(flightNumber >= "0001", flightNumber <= "1000",<br>
airlineCode == "AA")<br>
then<br>
flight.setFlightType("SH");<br>
flight.setValid(true);<br>
System.out.println("Row 2");<br>
end<br>
<br>
// rule values at C13, header at C6<br>
rule "Flight Type Rules_13"<br>
when<br>
flight : Flight(flightNumber >= "1001", flightNumber <= "2500",<br>
airlineCode == "VG")<br>
then<br>
flight.setFlightType("LH");<br>
flight.setValid(true);<br>
System.out.println("Row 3");<br>
end<br>
<br>
// rule values at C14, header at C6<br>
rule "Flight Type Rules_14"<br>
when<br>
flight : Flight(flightNumber >= "1001", flightNumber <= "2500",<br>
airlineCode == "AA")<br>
then<br>
flight.setFlightType("550");<br>
flight.setValid(true);<br>
System.out.println("Row 4");<br>
end<br>
<br>
// rule values at C15, header at C6<br>
rule "Flight Type Rules_15"<br>
when<br>
flight : Flight(flightNumber >= "2501", flightNumber <= "9999",<br>
airlineCode == "<otherwise>")<br>
then<br>
flight.setFlightType("Invalid");<br>
flight.setValid(false);<br>
System.out.println("Row 5");<br>
end<br>
<br>
<br>
Thanks,<br>
dme<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/otherwise-in-Excel-Decision-Table-tp4019162.html" target="_blank">http://drools.46999.n3.nabble.com/otherwise-in-Excel-Decision-Table-tp4019162.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>