[rules-users] How Add all packages to KnowledgeBuilder.add(drl or pkg or xsd,..);

srinivasasanda srinivasasanda at gmail.com
Tue Dec 13 00:45:45 EST 2011


Hi All,
Thanks in Advance to one and all, U have helped me lot , Please can give me
some idea to resolve from this senario..

we are giving (package created in guvnor) as  newUrlResource(url,type) to
add to kbuilder, ...
I have some 100 of packages how can i add all the packages to kbuilder...

but by using  rest api - 
http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/rest/packages (if i
give this url in browser) i am able to see all the packages.. can i add the
all packages with out hot coding the each and every package to
kbuilder.add(url,type);



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
String
url="http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/sample/LATEST/";
kbuilder.add(ResourceFactory.newUrlResource(url), ResourceType.PKG);

--
View this message in context: http://drools.46999.n3.nabble.com/How-Add-all-packages-to-KnowledgeBuilder-add-drl-or-pkg-or-xsd-tp3581495p3581495.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list