private KieModuleModel createKieProjectWithPackages(KieServices ks, String pkg) { KieModuleModel kproj = ks.newKieModuleModel(); KieBaseModel kieBaseModel1 = kproj .newKieBaseModel("KBase1") .setEqualsBehavior(EqualityBehaviorOption.EQUALITY) .setEventProcessingMode(EventProcessingOption.STREAM) .addPackage(pkg); KieSessionModel ksession1 = kieBaseModel1 .newKieSessionModel("KSession1") .setType(KieSessionType.STATEFUL) .setClockType(ClockTypeOption.get("realtime")); return kproj; }
private KieModuleModel createKieProjectWithPackagesAnd2KieBases(KieServices ks) { KieModuleModel kproj = ks.newKieModuleModel(); kproj .newKieBaseModel("KBase2") .setEqualsBehavior(EqualityBehaviorOption.EQUALITY) .setEventProcessingMode(EventProcessingOption.STREAM) .addPackage("org.pkg1") .newKieSessionModel("KSession1"); kproj .newKieBaseModel("KBase1") .setEqualsBehavior(EqualityBehaviorOption.EQUALITY) .setEventProcessingMode(EventProcessingOption.STREAM) .addPackage("org.pkg2") .newKieSessionModel("KSession2"); return kproj; }