On 18-06-13 09:46, Bartek wrote:
Thanks for your answer, it helps.
But just after solving one problem I am facing another. When
uploading my domain facts to Guvnor I get exception (from guvnor
logs):
...
Servlet.service() for servlet AssetFileServlet threw exception:
javax.enterprise.event.ObserverException
...
Caused by: java.lang.NoClassDefFoundError:
org/drools/planner/core/solution/Solution
at java.lang.ClassLoader.defineClass1(Native Method)
[rt.jar:1.7.0_07]
...
I suppose there are no Optaplanner classes on guvnor classpath.
Should they be? Or mayby guvnor do not need my problem
definition(so guvnor wont need to use Solution interface )?
Your domain classes will have @PlanningEntity and @PlanningVariable
annotations (as well as the Solution interface),
so you'll need to add the optaplanner-core jar (just as you added
your domain model jar) into guvnor.
Is it generally good idea to try use guvnor to define scores?
Yes, if you need that flexibility, as it allows you to change your
score rules through the guvnor web interface.
However, this is mostly uncharted territory: some users have already
successfully done it (there are mails on this mailing list's
archive),
but there's little documentation and no example for it. Feel to do a
write up once you get it to work, for the next person wanting to do
this :)
W dniu 2013-06-17 15:52, Geoffrey De Smet pisze:
On 17-06-13 15:33, Bartek wrote:
Hello,
How Optaplanner and Guvnor should be integrated? I am using
Drools 5.5.0.Final. I have configuration with spring so I
have access to KnowledgeBase.
I found in documentation:
How I can get rule base? (If it is correct way do integrate
with guvnor)
yes, it's the correct way for optaplanner 5.5.x with drools
5.5.x:
IIRC, the guvnor docs explains how you can get a KnowledgeBase
(~ drools 5 api), which you can transform into a RuleBase (~
drools 4 api which is still available in 5.5.x) like this:
See http://stackoverflow.com/questions/11017613/live-rule-creation-in-drools-planner
IIRC, KnowledgeAgent connects to guvnor and builds a
KnowledgeBase.
That being said, for optaplanner 6.0.x with drools 6.0.x,
everything is standardized on KieBase (~ drools 6 api) (which is
like the KnowledgeBase in the 5 api).
We recently released 6.0.0.Beta3 (drools, guvnor and optaplanner
release together).
So there's
solverFactory.getSolverConfig().getScoreDirectorFactoryConfig.setKieBase(kieBase);
The optaplanner and drools stuff is pretty stable, even if it's
called Beta3 (CR1 is coming soon),
but I have no idea about the state of guvnor's KieBase support.
Thanks,
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users
|
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users