Inttegrating rule engine with other application

38 views
Skip to first unread message

Sumit

unread,
Dec 15, 2016, 10:39:00 AM12/15/16
to Drools Usage
Hi All,

We are designing a business rule engine which is going to accept data from external applications. Available options from application are http/json or http/xml. When I gone through the docs I came across API for Json, JAXB and Xstream. I see that we can get json or xml and can fire the rule as received. But could not see how these json/xml are going to mapped with POJO or my facts. My understanding may be wrong and I would get better when I go in more detail.

My question while we design it is, which option is better Json/XML in term of implementation and performance. Also any reference for integrating drools with other applications will be really helpful.

Thanks
Sumit

John Dunning

unread,
Dec 15, 2016, 1:42:42 PM12/15/16
to Drools Usage
If it helps, I've currently got a small project running with a web service on JBoss EAP, using jaxRS. I use ObjectMapper to map the JSON to the fact model and then fire the rules. For the response I populate a RuleResponse fact, extract it from working memory, map it to Json and squirt it back

Here's the pom entry for the dependency

<!-- Import the JAX-RS API, we use provided scope as the API is included
in JBoss EAP 6 -->
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
</dependency>

Reply all
Reply to author
Forward
0 new messages