How to programmatically load rules from a Kie jar lying in the classpath of an application like a WAR ?
Issue
- In
Red Hat JBoss BRMS 5.x
rule assets (archived in a jar) could be loaded from the classpath of an application (likeWAR
) usingKnowledgeBuilder
as shown below.
KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add(ResourceFactory.newClassPathResource("sample.drl"),ResourceType.DRL);
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase();
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages());
...
Are there similar ways to do the same in Red Hat JBoss BRMS 6.x
as well, where rules can be programmatically loaded from a Kie jar
lying in the classpath of an application like WAR
?
- Will it work in an environment of
Websphere Application Server 8.5.x
as well where theWAR
containing the code and the rule jar (i.e. aKie jar
built inBusiness Central
) is in exploded form ?
Environment
- Red Hat JBoss BRMS (BRMS)
- 6.0.0
- Websphere Application Server (WAS)
- 8.5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.