bmk1977
bmk1977

Reputation: 141

How to generate java code for a given JBoss Drool DRL file?

In JBoss Drools, I believe the PackageBuilder generates code for a given DRL file. But this is happening internally. How do I see that java code for a given DRL fike?

Upvotes: 4

Views: 4791

Answers (2)

Edson Tirelli
Edson Tirelli

Reputation: 3901

There is a configuration option to dump generated code into the filesystem for debugging purposes:

-Ddrools.dump.dir=<path>

Please note that basically what is code generated are some glue code and the consequences for rules. The whole Rete network is not generated as Java code and things like constraints and field accessors are in most cases bytecode generated or converted into MVEL compiled expressions.

Upvotes: 7

salaboy
salaboy

Reputation: 4133

The PackageBuilder generates a binary representation of your rules. Why do you want to see the java code? Your rules are transformed into a RETE network, so there is no code for a given rule. The package will contain a network that will represent all your rules LHSs. Take a look at this blog post: http://salaboy.com/2011/06/06/drools-reteoo-for-dummies-1-intro/ Cheers

Upvotes: 0

Related Questions