Are there second-rate fact types?
by Wolfgang Laun
Consider:
class Foo { /*...*/ }
rule checkFoo
when
Foo( noSuchField > 0 )
then ... end
DRL compilation reports an error (Error: unable to resolve method ...)
and identifies rule, line and column, which is fine.
Now let's look at:
import java.util.ArrayList;
rule checkArrayList
when
ArrayList( noSuchField > 0 )
then ... end
The same DRL compiler (checked with 5.5.0 and 6.0.0) accepts this, and
there is a nasty exception thrown at runtime. This is inconvenient,
since the exception can be thrown by any code inserting an ArrayList
object, and the faulty rule isn't identified.
Why are certain classes second-rate?
-W
11 years, 7 months
Drools Workbench - Cloning a local Repo Gives “Invalid remote: origin”
by Zahid Ahmed
Hi,
I am trying to clone a repo in Drools WorkBench and getting the following error,
"Can't clone repository. java.lang.RuntimeException:Invalid remote: origin"
The repository which I am cloning, resides in my local machine. D:/Servers/Drools-6-Deployment/repo/repoA.git
Following are the inputs I am providing to WorkBench clone Wizard,
"Repository Name = repoCloned" "Organizational Unit = inTech"
"GIT URL = file:///D:/Servers/Drools-6-Deployment/repo/repoA.git"
"User Name = " (Currently I am giving my github account cred. What to give in user name?)
"Password = " (Currently I am giving my github account cred. What to give as password?)
Question 1
Why am I getting remote origin error when I am cloning from a local GIT repository ?
Question 2
Kindly let me know what to give as User Name and Password when I am cloning from an existing GIT repo in my local filesystem ?
Regards,
Zahid Ahmed
11 years, 7 months
Parallel / Distributed Optaplanner
by jonathan.labin
I know that this topic has come up before. At various times there were
responses indicating that it was being considered at some level within the
project(s).
How has that played out? Was there progress or has the idea been put on the
back-burner? Was something discovered that seems to make the idea not worth
pursuing?
I'm contemplating doing some investigating of my own to attempt to leverage
additional hardware in a distributed way for our application. But I didn't
want to end up re-discovering things or try things that have already proved
to be a dead end by an effort ongoing within the project.
Any insight you could share?
--
View this message in context: http://drools.46999.n3.nabble.com/Parallel-Distributed-Optaplanner-tp4029...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
Drools Pluggin Syntax Check
by vdesai
I have installed Drools Pluggin in Eclipse and have installed pluggin -
JBoss Drools Core and related ones.
However, it doesnt complain/error about errors in the typo or bracket issues
for trules. is there anything i am missing or needs to install other
features which will validate Drools files as good as Java Class for syntax.
The Pluggin/Features should validate all brackets, typo erros, reference
java classes and all dependencies.
Appreciate the input.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Pluggin-Syntax-Check-tp4029927.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
6.0.1.F Enumerations that hit class that access DB don't update as expected
by SrjTx
I have a class xyz that accesses a DB to populate the dropdown:
'mybean.q1' : (new QueryThins()).getList("FOO", "BAR")
This works, except that when the backing store changes, the dropdown don't
update even if you leave and re-enter the editor. I have a workaround
below.
I there a fix for this on github?
I have been searching github checkins by cloning and doing "git search"
within eclipse, but didn't find anything. Are there any other ways to
search commits that might be a better approach?
workaround
1. Edit the Integration.enumeration file.
- Click the [Add enum] to create a blank entry at the bottom of the
list
- Click [-] to delete that enum
- Save
2. Close Any Rules that are open.
3. Reopen a Rule. The Dropdown will be refreshed.
Next time through, delete the blank entry so the .enumeration is dirty.
--
View this message in context: http://drools.46999.n3.nabble.com/6-0-1-F-Enumerations-that-hit-class-tha...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
Grouping of rule and range check
by Chaturvedi Dewashish
Hi,
I have a requirement which is as
1. There are three rules lets say rule1, rule2 and rule3
2. rule1 says there is a person
Age < 40
Age >= 20
Then do something
3. rule2 says there is a person
Age < 60
Age >= 40
Then do something else
4. rule3 says there is a person
Age >= 60
Then do something new
Now I am feeding person object as whole as event based from other
application.
So the requirement in form of test cases is
1. Age = 22 - do something
2. Age = 25 - Nothing as rule1 is already triggered and "do something" done
3. Age = 42 - do something else
4. Age = 45 - Nothing as rule1 is already triggered and "do something else"
done
4. Age = 65 - do something new
5. Age = 68 - nothing
6. Age = 25 - do something
7. Age = 45 - do something else
Is there any way to do this using the guvnor UI?
Thanks and regards,
Chaturvedi Dewashish
Nirvana Solutions
11 years, 7 months
No such field org.optaplanner.core.config.heuristic.selector.value.chained.SubChainSelectorConfig.entitySelector
by dBijkoo
when I use this code:
<subChainChangeMoveSelector>
<subChainSelector>
<entitySelector>
<entityClass>model.ScheduleBlockPeriod</entityClass>
</entitySelector>
<minimumSubChainSize>2</minimumSubChainSize>
<maximumSubChainSize>40</maximumSubChainSize>
</subChainSelector>
<valueSelector>
<variableName>nextScheduleBlockPeriod</variableName>
</valueSelector>
<selectReversingMoveToo>true</selectReversingMoveToo>
</subChainChangeMoveSelector>
I get the following error:
/com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException:
No such field
org.optaplanner.core.config.heuristic.selector.value.chained.SubChainSelectorConfig.entitySelector
---- Debugging information ----
field : entitySelector
class :
org.optaplanner.core.config.heuristic.selector.value.chained.SubChainSelectorConfig
required-type :
org.optaplanner.core.config.heuristic.selector.value.chained.SubChainSelectorConfig
converter-type :
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number : 57
class[1] :
org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainChangeMoveSelectorConfig
class[2] :
org.optaplanner.core.config.heuristic.selector.move.composite.CartesianProductMoveSelectorConfig
class[3] :
org.optaplanner.core.config.localsearch.LocalSearchSolverPhaseConfig
class[4] : org.optaplanner.core.config.solver.SolverConfig
version : 1.4.7
-------------------------------
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.handleUnknownField(AbstractReflectionConverter.java:495)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:351)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:377)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:377)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:377)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at
com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1185)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1169)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1040)
at
org.optaplanner.core.config.solver.XmlSolverFactory.configure(XmlSolverFactory.java:84)
at
org.optaplanner.core.config.solver.XmlSolverFactory.configure(XmlSolverFactory.java:74)
at
org.optaplanner.core.config.solver.XmlSolverFactory.configure(XmlSolverFactory.java:67)
at
org.optaplanner.core.config.solver.XmlSolverFactory.<init>(XmlSolverFactory.java:51)
at AgendaTest.before(AgendaTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)/
Even though it is besides naming the same xml code as it shows on the
website here:
http://docs.jboss.org/drools/release/6.0.1.Final/optaplanner-docs/html_si...
My goal is to select a specific chained variable from a planningEntity
--
View this message in context: http://drools.46999.n3.nabble.com/No-such-field-org-optaplanner-core-conf...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months