<div dir="ltr"><div><div><div><div><div><div><div>Hi<br><br></div>I have such problem. I use Guvnor as a storage for rules, and now i want to add calendars declaration to some rule. I&#39;ve done this and in my sources of these rules i can see:<br>
<br>rule &quot;CalendarTest&quot;<br>        calendars &quot;AUD Home Loans&quot;<br>        no-loop true<br>        dialect &quot;mvel&quot;<br>        when<br>            <br>        then<br>            System.out.println(&quot;CALENDAR IS WORKING!!!&quot;);<br>
    end<br><br></div>In my application I use KnowledgeAgent and such configuration to use rules from Guvnor:<br><br>KnowledgeBuilder builder = KnowledgeBuilderFactory<br>                .newKnowledgeBuilder();<br>        builder.add(ResourceFactory.newClassPathResource(&quot;ChangeSet.xml&quot;),<br>
               ResourceType.CHANGE_SET);<br>        if (builder.hasErrors()) {<br>            throw new RuntimeException(builder.getErrors().toString());<br>        } // creating KnowledgeBase and Session<br>        KnowledgeBase base = KnowledgeBaseFactory.newKnowledgeBase();<br>
        base.addKnowledgePackages(builder.getKnowledgePackages());<br>        StatefulKnowledgeSession session = base.newStatefulKnowledgeSession();<br><br></div>my ChangeSet.xml looks like this: <br><br>&lt;change-set xmlns=&#39;<a href="http://drools.org/drools-5.0/change-set">http://drools.org/drools-5.0/change-set</a>&#39;<br>
    xmlns:xs=&#39;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&#39;<br>    xs:schemaLocation=&#39;<a href="http://drools.org/drools-5.0/change-set">http://drools.org/drools-5.0/change-set</a> <a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd</a>&#39; &gt;<br>
    &lt;add&gt;<br>         &lt;resource source=&#39;    <br><a href="http://localhost:8083/drools-guvnor/rest/packages/magick-model/source">http://localhost:8083/drools-guvnor/rest/packages/magick-model/source</a>&#39; type=&#39;DRL&#39; basicAuthentication=&quot;enabled&quot; username=&quot;admin&quot; password=&quot;admin&quot;/&gt;<br>
    &lt;/add&gt;<br>&lt;/change-set&gt;<br><br></div>But the problem is when i invoke fureRules this rule with calendars clause also invokes, even if i don&#39;t set any calendar objects to session.<br><br></div>Can you help me what the problem is?<br>
<br></div>And if i just use local drl file, everything works fine<br><br></div>Thanks, Anton<br><div><div><div><div><br><div><br></div></div></div></div></div></div>