Assuming that the remaining 19998 rules are of the same kind, there is a lot of data in these rules, and only very little logic. Ignoring the issue of &quot;Olympia&quot; being one of the cities not being &quot;Seattle&quot;, we have the problem of matching a triplet of &lt;field,state,city&gt; from a Student fact so that we can store one or more Subjects in Student.subjects.<br>
<br>Imagine that you have objects of type Inscribe containing a triplet of field, state, city and the pertaining List&lt;Subject&gt;. Then you could write a single (!) rule<br><br>rule register<br>when<br>  $stu: Student ( $f: field, $s: state, $c: city )<br>
  $ins: Inscribe( field==$f, state==$s, city==$c )<br>then<br>  $stu.setSubjects( $ins.getSubjects() );<br>end<br><br>BTW: Why do you use equals with state? Using &quot;==&quot; should be possible here, too.<br><br>And, of course, matching ~20000 different triplets to facts of a single type isn&#39;t really RBS fodder. You can design a simple Java program that achieves this goal, assuming you can come up with a straightforward representation of the &lt;field,state,city;subject+&gt; mapping.<br>
<br>-W<br><br><br><div class="gmail_quote">2012/1/10 Shweta1986 <span dir="ltr">&lt;<a href="mailto:shweta.a.thakkar@gmail.com">shweta.a.thakkar@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
My rules are  as follows.<br>rule &quot;rule1&quot;<br>    salience -2<br>    dialect &quot;mvel&quot;<br>    when<br>    stud : Student ( field == &quot;ARTS&quot;, state.equals(&quot;WA&quot;))<br>then<br>    java.util.List subList = new java.util.ArrayList();<br>

    Subject subject = new Subject();<br>    subject.setName(&quot;ABC&quot;);<br>    subject.setFees(33454);<br>    subject.duration(4);<br>    subList.add(subject);<br>
<br>
    subject = new Subject();<br>
    subject.setName(&quot;XYZ&quot;);<br>
    subject.setFees(33454);<br>
    subject.duration(4);<br>
    subList.add(subject);<br>
<br>
    stud.setSubjects(subList);<br>end<br>rule &quot;rule2&quot;<br>
    salience -100<br>
    dialect &quot;mvel&quot;<br>
    when<br>
    stud : Student ( field == &quot;ARTS&quot;, state.equals(&quot;WA&quot;) , city == &quot;SEATTLE&quot;))<br>
then<br>
    java.util.List subList = new java.util.ArrayList();<br>
    Subject subject = new Subject();<br>
    subject.setName(&quot;ABC&quot;);<br>
    subject.setFees(33454);<br>
    subject.duration(4);<br>
    subList.add(subject);<br>

<br>

    subject = new Subject();<br>

    subject.setName(&quot;XYZ&quot;);<br>

    subject.setFees(33454);<br>

    subject.duration(4);<br>

    subList.add(subject);<br>

<br>

    stud.setSubjects(subList);<br>
end<br><br><br><br>Student is the main object and it contains List of Subjects. here the way I am using the salience because<br>if the input us shweta, ARTS, WA,Olympia it matched rule1 <br>but if the input is shweta, ARTS, WA, Seattle it matches 1 and 2 but i want the rule 2 to be executed  so salience.<br>

<br>I am using StatelessKnowledge Session and also the resource change scanner.<br>I execute one rule at a time and the scanner poll interval is 1 hour.<br>When I started with 100 rules I was using &quot;PK&quot; as my source in changeSet.xml but when the rules grew to 20K I was not able to build the rules in Guvnor UI and hence I started using &quot;DRL&quot; as source. <br>

<br>The way I generate drl is using a script which converts the csv to drl format.<br>I copy the drl to the text area in techincal rules and save it. ( this copy is also paiful so I asked that if there is an upload drl file unlike the import drl file)<br>

In changeset I give the path to the url in webdav /guvnor/org.drools.guvnor.Guvnor/webdav/packages/StudentRules/StudentRules.drl<br><br>I am not sure if I am doing it the right way. Please suggest.<br><br>Thanks,<br>Shweta<br>

<br>On Mon, Jan 9, 2012 at 11:58 PM, laune [via Drools] <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3648661&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">

        Salience is just one way to force the evaluation of a condition before others. In fact, using salience throughout is just a way of re-creating a sequence of plain old if statements using a rules engine.<br><br>I&#39;m not going to waste my time and yours by elaborating on possible alternatives unless you come up with a detailed description of your rules, and how you run your rules engine: fact insertion, calls to fire, etc.<br>


<br>-W<br><br><div class="gmail_quote">2012/1/10 Shweta1986 <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3647015&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span><br>

<blockquote style="border-left:2px solid rgb(204,204,204);padding:0pt 1em" class="gmail_quote"><div>
I am not sure I understand that. What is the other option for this case. Why would simple rules not work for 20 K rules. Am I missing something. I cannot use database to store my rules. Drools also gives me salience which I need for my usecase. <br>



<br></div><div class="gmail_quote"><div>On Thu, Jan 5, 2012 at 11:29 PM, laune [via Drools] <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3646449&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>



</div><blockquote style="border-left:2px solid rgb(204,204,204);padding:0pt 1em" class="gmail_quote"><div>

        2012/1/6 Shweta1986 <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3637255&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span><br><div class="gmail_quote"><div>



<blockquote style="border-left:2px solid rgb(204,204,204);padding:0pt 1em" class="gmail_quote">

<p>And my rules are very simple it is like if string comparison then set that&#39;s it..<br></p></blockquote></div><div>This doesn&#39;t really warrant the use of a rule based system. If keeping this logic out of the application or an easy maintenance of these if-then&#39;s are your main goals, there are other ways. I&#39;ve already hinted at this, with the idea of providing the information embedded in similar rules as data.<br>




-W<br><br> </div></div><div>
<br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=3637255&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        </div><div style="color:rgb(68,68,68);font-family:tahoma,geneva,helvetica,arial,sans-serif;font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:normal;font-size-adjust:none;font-stretch:normal">


<div>
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://drools.46999.n3.nabble.com/Large-number-of-rules-in-Drools-tp3630385p3637255.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/Large-number-of-rules-in-Drools-tp3630385p3637255.html</a>
        </div></div><div><div>
        <div style="color:rgb(102,102,102);font-family:tahoma,geneva,helvetica,arial,sans-serif;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;font-size-adjust:none;font-stretch:normal;margin-top:0.4em;line-height:1.5em">



                To start a new topic under Drools: User forum, email <a href="http://user/SendEmail.jtp?type=node&amp;node=3646449&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a> <br><div>
                To unsubscribe from Drools: User forum, <a rel="nofollow" link="external">click here</a>.<br>

                <a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&amp;breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font-family:serif;font-style:normal;font-variant:normal;font-weight:normal;font-size:9px;line-height:normal;font-size-adjust:none;font-stretch:normal" link="external" target="_blank">NAML</a>
        </div></div></div></div></blockquote></div><br>

        
<br><hr width="300" align="left">
View this message in context: <a href="http://drools.46999.n3.nabble.com/Large-number-of-rules-in-Drools-tp3630385p3646449.html" rel="nofollow" link="external" target="_blank">Re: [rules-users] Large number of rules in Drools</a><div>

<br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" rel="nofollow" link="external" target="_blank">Drools: User forum mailing list archive</a> at Nabble.com.<br><br></div><div>
_______________________________________________<br>

rules-users mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&amp;node=3647015&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></div></blockquote></div><div><br>
<br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=3647015&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        </div><div style="color:rgb(68,68,68);font-family:tahoma,geneva,helvetica,arial,sans-serif;font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:normal;font-size-adjust:none;font-stretch:normal">
<div>
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://drools.46999.n3.nabble.com/Large-number-of-rules-in-Drools-tp3630385p3647015.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/Large-number-of-rules-in-Drools-tp3630385p3647015.html</a>
        </div><div><div>
        <div style="color:rgb(102,102,102);font-family:tahoma,geneva,helvetica,arial,sans-serif;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;font-size-adjust:none;font-stretch:normal;margin-top:0.4em;line-height:1.5em">

                To start a new topic under Drools: User forum, email <a href="http://user/SendEmail.jtp?type=node&amp;node=3648661&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a> <br>
                To unsubscribe from Drools: User forum, <a rel="nofollow" link="external">click here</a>.<br>

                <a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&amp;breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font-family:serif;font-style:normal;font-variant:normal;font-weight:normal;font-size:9px;line-height:normal;font-size-adjust:none;font-stretch:normal" link="external" target="_blank">NAML</a>
        </div></div></div></blockquote></div><br>

        
<br><hr width="300" align="left">
View this message in context: <a href="http://drools.46999.n3.nabble.com/Large-number-of-rules-in-Drools-tp3630385p3648661.html" target="_blank">Re: [rules-users] Large number of rules in Drools</a><br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" target="_blank">Drools: User forum mailing list archive</a> at Nabble.com.<br><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>
<br></blockquote></div><br>