简体   繁体   中英

How to integrate drools in jersey rest web service

I have developed a jersey est web service API. Now I would like to integrate DROOLS rules in this rest service. IN the rest service, after ascertaining all required conditions, i would like to send it to the drools rule engine and the fire the rule. How to do this. Please help me step by step guidance.

It's not Jersey, but here is an example of a REST web service, which evaluates requests using Drools: https://github.com/gratiartis/sctrcd-payment-validation-web

Essentially you create a singleton bean, which wraps the knowledge base. When validation requests arrive, you can create knowledge sessions, insert your facts and execute the rules.

It's built with Spring, so the main change you would need to make if not using Spring would be to ensure that the knowledge base is only created once.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM