user1627100
user1627100

Reputation: 41

How to call ILOG JRules business Rules using Java?

I have made the business Rules using ILOG Studio and deployed the business rule to RES. Now I want to use that business rule in java project.

What are the ways to call/consume the business rules using Java and which libraries I need to import in java project? Kindly provide some link or sample for calling business rules.

Thanks

Upvotes: 2

Views: 4548

Answers (1)

user1660472
user1660472

Reputation: 317

There are couple of ways to consume using Java. The simplest and the recommended ways are ...

  1. Invoking the Rule in a J2EE environment using IlrPOJOSessionFactory. All the details and code sample are provided in this link.

  2. Invoking the Rule in a J2SE environment using IlrJ2SESessionFactory . All the details and code sample are provided in this link.

The Jar files you need to import are as follows.

  1. jrules-engine.jar
  2. jrules-res-XXXX-session-java.jar (XXXX - represent the version of the ILOG you are using)
  3. jrules-res-execution.jar
  4. jrules-res-session-XXXX.jar (XXXX - Represents the app server you are using websphere/weblogic etc..)

Spring framework also provide a JSR 94 template to invoke business rules deployed in RES from J2SE and J2EE component.

Upvotes: 3

Related Questions