0
votes

I have imported the DRL file and required pojo as individual jar file in guvnor. I could see the dependent classes appearing as fact for individual rule and Guvnor exposes those rules via URL. I use changeset to consume the URL and apply the rules for my data. When I do that, I get below exception message for all the class I imported in the DRL file.

Unable to Analyse Expression

[Error: unable to resolve method using strict-mode: org.drools.spi.KnowledgeHelper.***]

Can someone help me in resolving this issue?

Thanks in advance!

1
Please define which version of Guvnor.Steve
Hi, I use Guvnor 5.5.0 version and Drools runtime is also 5.5.0vaish
@Steve , can you please help me in resolving this issue?vaish
@Steve I have mentioned dialect as "java" and now the error message is gone. But I still did not succeed in what I m doing. I have a standalone drools app which has DRL file that validates my incoming data and flags the erroneous data. Say I have an user object to validate age & check eligibility for voting, In my DRL the user object will be imported and rule defined for age check. In case of erroneous message I will set something in user object itself. How do I make this whole thing available in Guvnor for runtime rule updation?vaish
I suspect you may need to create a new question around that. :) But essentially, Guvnor is just a store for the rules. You application needs to run separately and load in the rules from a remote Guvnor instance. Search the Guvnor docs for "knowledge agent". This is the piece provided by Drools, to automatically reload rules from Guvnor (or elsewhere) when they are changed.Steve

1 Answers

0
votes

Without seeing the DRL, I'll take a guess. I suspect that you're using the 'mvel' dialect, but your DRL is doing things which assume the Java dialect. Try changing that. You can see an example of this here:

Throwing exception in Guvnor (Guided Editor Rule)

If you post the DRL, then I may well need to reconsider and change/delete this answer. :)