[jboss-jira] [JBoss JIRA] (DROOLS-1368) Property reactive KieSession.update(fh, h, propName) fails in polymorfic case with "Unknown property"
Mario Fusco (JIRA)
issues at jboss.org
Tue Dec 6 05:22:00 EST 2016
[ https://issues.jboss.org/browse/DROOLS-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-1368.
---------------------------------
Fix Version/s: 7.0.0.Beta4
Resolution: Done
Fixed by https://github.com/droolsjbpm/drools/commit/3d3f42727
> Property reactive KieSession.update(fh, h, propName) fails in polymorfic case with "Unknown property"
> -----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1368
> URL: https://issues.jboss.org/browse/DROOLS-1368
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Reporter: Geoffrey De Smet
> Assignee: Mario Fusco
> Priority: Critical
> Fix For: 7.0.0.Beta4
>
> Attachments: Drools1368Test.java
>
>
> I call
> {code}
> kieSession.update(factHandle, entity, variableName);
> {code}
> with entity being an instance of LeadingExam, which extends Exam, which extends AbstractPersistable.
> AbstractPersistable has setId(...).
> Exam has setTopic(...), setRoom(...).
> LeadingExam has setPeriod(...).
> I get this:
> {code}
> java.lang.RuntimeException: Unknown property: period
> at org.drools.core.reteoo.PropertySpecificUtil.setPropertyOnMask(PropertySpecificUtil.java:102)
> at org.drools.core.reteoo.PropertySpecificUtil.calculatePatternMask(PropertySpecificUtil.java:94)
> at org.drools.core.reteoo.PropertySpecificUtil.calculatePositiveMask(PropertySpecificUtil.java:65)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:313)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:1605)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.update(DroolsScoreDirector.java:169)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.afterVariableChanged(DroolsScoreDirector.java:156)
> at org.optaplanner.core.impl.heuristic.selector.move.generic.ChangeMove.doMoveOnGenuineVariables(ChangeMove.java:75)
> at org.optaplanner.core.impl.heuristic.move.AbstractMove.doMove(AbstractMove.java:34)
> at org.optaplanner.core.impl.heuristic.move.CompositeMove.doMove(CompositeMove.java:110)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:125)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:98)
> at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:74)
> at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:160)
> at org.optaplanner.examples.common.app.SolverPerformanceTest.runSpeedTest(SolverPerformanceTest.java:65)
> at org.optaplanner.examples.examination.app.ExaminationPerformanceTest.solveComp_set5FastAssert(ExaminationPerformanceTest.java:52)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Debugging PropertySpecificUtil shows that settableProperties include "id", "room", "topic", but not "period".
> Note that there is also FollowingExam which also extends Exam.
> FollowingExam also has setPeriod(...).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list