0
votes

I'm new to using drools and guvnor

I have deployed a tomcat server that serves business rules

The problem is that I get two different answers if I use code that goes against the server with type DRL or with PKG

If I go against the server with DRL type I get one result

http://localhost:8180/guvnor/org.drools.guvnor.Guvnor/package/PkgDinamicoBV/LATEST.drl

property name="type" value="DRL"

If I go against the server with PKG type I get a different

http://localhost:8180/guvnor/org.drools.guvnor.Guvnor/package/PkgDinamicoBV/LATEST

property name="type" value="PKG"

I don't understand what I have to do to get both ways to access the server to produce the same result

I have build the package in guvnor so I expected to get the same result in both ways to access my local server

Many thanks for your help

Simar

2
the links you provided point to your local machine, and we dont have access to your local machine :) - saljuama
Of course. I have explained myself badly. What I don't understand is why I get 2 different results going to the same server but in 2 different ways. - simar.serball
can't really say if you dont show your outputs for both cases - saljuama
Thanks anyway, I guess I have to read more to understand guvnor and drools - simar.serball

2 Answers

0
votes

DRL and PKG are file types for two different things. Compared to the programming language C, they correspond to .c and .o.

More accurately, a DRL file is the Drools Rule Language text which can be written with a text editor or is generated from your input in the Drools IDE, Guvnor or its successor in 6.x. A DRL file must be compiled by the Drools DRL compiler used in the Builder; the result is a (binary) Rule Package file, the .PKG.

For creating a Rule Base and from it, in turn, a session, you may use the rule package.

0
votes

You can always access the .drl file generated by guvnor. Click on the "view source" option after selecting the package you created in Guvnor webapp.

Here you can see how many rules have actually been written. Hope it helps..:)