Hemanth meka
Hemanth meka

Reputation: 193

What all do i need for using drools with spark for managing rules?

I have to set some filtering conditions base on business given values. I am thinking of using drools for this but the documentation is very complex and has too many components. Which components do i need to use drools as rules engine. My understanding is that i need drools engine which is the core part and drools workbench which is a GUI to set rules I also have KIE execution server deployed on tomcat server but do i need this?. Is this correct do i need anything else?

Upvotes: 1

Views: 1906

Answers (2)

Hemanth meka
Hemanth meka

Reputation: 193

I installed kie-server and kie-workbench.

kie-workbench is a UI and allows following 1. Creation of a project/container 2. creation of rule or guided rule 3. creation of data objects which are like POJO objects. 4. deploy created project/container to kie-server 5. and also lot of other things which i did not explore.

kie-server is component which 1. accepts REST requests to manage or execute containers

I created required rules in kie-wb and deployed them onto kie-server and then made rest requests to kie-server from my program and received xml response after all rules are executed.

I followed the following links http://www.mastertheboss.com/jboss-jbpm/jbpm6/running-rules-on-wildfly-with-kie-server http://mswiderski.blogspot.in/2015/10/installing-kie-server-and-workbench-on.html

Upvotes: 1

Michael Reynolds
Michael Reynolds

Reputation: 96

If you can define your business rules as part of the source code then you can simply embed the Drools engine in one of the jars included with your Spark job. You'll simply need to include drools-core, drools-compiler, kie-api, and kie-internal in your dependencies.

If you need your business people to author these rules, or the rules need to be able to be redeployed without rebuilding/redeploying the application, then you will need the workbench.

Upvotes: 1

Related Questions