Reputation: 7276
We would like to upgrade from drools 5 to 6 but are trying to first evaluate what kind of time investment that would involve. I've spent a lot of time combing the net and documentation, but nowhere can I find an explanation on the minimally required steps for updating a drools 5 implementation to drools 6. It can't possibly be a simple matter of replacing libraries as the differences between the two seem too stark.
Is anyone aware of documentation which explains the upgrade process enough that we would be able to evaluate the time investment required and eventually use the document to perform the update?
Upvotes: 4
Views: 6494
Reputation: 51
In the link provided by Mika'il, you can effectively find some information showing the major differences between the 5.x branch and 6.x one.
For instance, Knowledge API has been replaced by KIE API. So do not forget to change the importation package of RuleContext class in your Java classes defining the imported functions in your DRL rules. In 5.x the RuleContext class where coming from org.drools.runtime.rule package and in 6.x from org.kie.api.runtime.rule package.
If you forget to do it, everything would seem to be fine till the compilation of your DRL (at runtime). At rule compile time, the rule compiler will not be able to do the match between the signature of your method and the method declared in your DRL file. The compiler error message is particularly unintelligible, something like: "The method warning(RuleContext, Object) in the type YourClass is not applicable for the arguments (RuleContext, Account)"
At first glance, we could think that the class Account does not inherit from Object. Of course, it is absurd. In fact, the problem is coming the first parameter that is not from the same package in the Java method and the DRL imported function.
I have lost a lot of time before finding. Sometimes we don't see the most obvious facts. But a better message from the compiler would have helped me...
Upvotes: 0
Reputation: 1
There is a Knowledge API Legacy5 Adapter that can be used so you can keep the api calls the same.
Upvotes: 0
Reputation: 14661
Not really a complete answer, but ... on top of any planned work you might be able to identify in advance, be prepared for:
Upvotes: 0
Reputation:
This document partly explains some of the major differences.
Major differences between Drools 5 and 6 are:
Consequently you will need to:
Upvotes: 3