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.xrule assets (archived in a jar) could be loaded from the classpath of an application (likeWAR) usingKnowledgeBuilderas 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.xas well where theWARcontaining the code and the rule jar (i.e. aKie jarbuilt 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.