I managed to get it working thanks to your (precious) help.
I ended up with this code (I put it here so it can help someone in the
future):
public static KnowledgeBase readKnowledgeBase(String decisionTable)
throws Exception {.newUrlResource("http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary");
UrlResource resource = (UrlResource) ResourceFactory
resource.setBasicAuthentication("enabled");
resource.setUsername("guest");kbuilder.add(resource, ResourceType.DTABLE);
resource.setPassword("guest");
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
KnowledgeBase kbase = kbuilder.newKnowledgeBase();Changed the URL to
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
}
http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary
and ResourceType to DTABLE.
In my real implementation the name of the asset will be a variable of
course.
--
View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023298.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users