Hi
I have such problem. I use Guvnor as a storage for rules, and now i want to add calendars declaration to some rule. I've done this and in my sources of these rules i can see:
rule "CalendarTest"
calendars "AUD Home Loans"
no-loop true
dialect "mvel"
when
then
System.out.println("CALENDAR IS WORKING!!!");
end
In my application I use KnowledgeAgent and such configuration to use rules from Guvnor:
KnowledgeBuilder builder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
builder.add(ResourceFactory.newClassPathResource("ChangeSet.xml"),
ResourceType.CHANGE_SET);
if (builder.hasErrors()) {
throw new RuntimeException(builder.getErrors().toString());
} // creating KnowledgeBase and Session
KnowledgeBase base = KnowledgeBaseFactory.newKnowledgeBase();
base.addKnowledgePackages(builder.getKnowledgePackages());
StatefulKnowledgeSession session = base.newStatefulKnowledgeSession();