Error due to same class name
by Sumit Dhaniya
I've two classes with same name but in different packages.
I created several guided rules which use these classes when I validate
individual rules they get validated but when I try to Build and Deploy the
project it fails cause it try to find a field in another class.
Unable to create Field Extractor for 'isPH'Field/method 'isPH' not found for
cla
ss 'com.****.****.db.user.TmSlot'
: [Rule name='ProducerHour']
org.drools.core.RuntimeDroolsException: Field/method 'isPH' not found for
class
'com.****.****.db.user.TmSlot'
Unable to Analyse Expression isPH == true:
[Error: unable to resolve method using strict-mode:
com.****.****.db.user.TmSlot.isPH()]
[Near : {... isPH == true ....}]
--
View this message in context: http://drools.46999.n3.nabble.com/Error-due-to-same-class-name-tp4030304....
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Confusion on choosing Listeners
by Shrinath Managuli
Hi Drools,
I'm not completely sure about choosing Listener from which package either from drools-core or kie-api. I do see Listeners are available as below in kie-api and drools-core api.
kie-api
org.kie.api.event.rule
AgendaEventListener.java
RuleRuntimeEventListener.java
WorkingMemoryEventListener.java
kie-api org.kie.api.event.rule.process
ProcessEventListener.java
drools-core
org.drools.core.event
AgendaEventListener
WorkingMemoryEventListener
RuleBaseEventListener
KieSession accepts listener from kie-api. In which we can configure drools-core listeners? What Listeners are preferred to use?
Please share your thoughts.
Thanks,
Shrinath.
11 years, 9 months
Project Authoring in kie ide
by Sumit Dhaniya
I updated the POJO's which were getting used in rules due to which some of
the rules started throwing error and the left hand side panel consisting of
Organisational Unit, repository and project was no longer visible.
I tried restarting the server and then even deleting and creating a new
repository but left hand side panel of project authoring perspective is
still not getting displayed.
--
View this message in context: http://drools.46999.n3.nabble.com/Project-Authoring-in-kie-ide-tp4030298....
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
unexpected/spurious ClassCastException
by Borris
I am getting an unexpected cast exception. The backtrace looks like
Exception in thread "main" java.lang.ClassCastException:
com.tastiereasier.rulez.ContextFoodItem cannot be cast to
com.tastiereasier.domain.FoodItem
at
ConditionEvaluatorb792d1e4169f4ac98945e49e1412d793.evaluate(Unknown Source)
at
org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:216)
at
org.drools.core.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:185)
at
org.drools.core.common.SingleNonIndexSkipBetaConstraints.isAllowedCachedLeft(SingleNonIndexSkipBetaConstraints.java:141)
at
org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:98)
at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:60)
at
org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:547)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:533)
at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalStackEntry(RuleNetworkEvaluator.java:224)
at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:166)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at
org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:193)
at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:68)
at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:928)
at
org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1193)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1202)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1175)
at com.tastiereasier.rulez.Rulez.insertAndFire(Rulez.java:168)
at com.tastiereasier.rulez.Rulez.addDinerToContext(Rulez.java:310)
at com.tastiereasier.rulez.Rulez.<init>(Rulez.java:101)
at com.tastiereasier.rulez.Rulez.main(Rulez.java:44)
The rules that are triggering this are:
rule contextDinerDislike
enabled true
when
ContextDiner( $diner; )
DatumPreference
(
datumPreferenceType == DatumPreference.Type.PREFERENCE,
belief.factor < 0.0,
$datum: datum
)
from $diner.getDatumPreferences()
then
insert( new ContextFoodItem( (FoodItem) $datum, true ) );
end
rule spotNewContextDinerLike
enabled true
when
ContextDiner( $diner; )
DatumPreference
(
datumPreferenceType == DatumPreference.Type.PREFERENCE,
belief.factor > 0.0,
$datum: datum
)
from $diner.getDatumPreferences()
then
insert( new ContextFoodItem( (FoodItem) $datum, false ) );
end
If I disable either rule, then the other proceeds fine and no cast
exception happens.
I can't see why the cast should ever be asked for - it doesn't make sense.
If I changed the boolean parameter in the new in the insert - so both
are either true or both
are either false, there are no cast exceptions (there must be a clue here).
If I put a debug after the insertion, the backtrace actually happens
after return from the
insert() method - implying it's something on the agenda?
I tried using the Audit stuff to see if it gave any clues - but I've
never used that before
and simply got a heap exhaustion from Eclipse after 1/2 hour trying to
ingest something like 200
meg of trace data - I've got a lot of data being initialised into the
workspace before these rules
get a chance to do anything.
It's feeling remarkably like a bug to me, but I don't know how to
interpret the backtrace usefully,
so it's possible I've got something messed up elsewhere - although I've
disabled massive amounts
of rules that I can.
I grabbed a snapshot last night and it didn't change anything. (I was on
a snapshot from early June to fix being able to have Drools editor
reference my external jars.)
Does this look like a bug or user error? It's going to take some effort
to try and extract a test case
so I really don't want to spend the effort on that unless it looks the
only way.
Sage observations most appreciated.
Borris
11 years, 9 months
kie-drools-wb-6.0.1 : view "artifact repository" is empty
by jps
Hello,
The artifact repository view in drools-wb is suddenly empty :( after having
uploaded a new jar. Before this operation, I had 3 artifacts that were
listed ..
I try to redeploy the app, restart jboss, delete JBOSS_HOME/bin/repository
and start again ... but still the list of artifact in the repository is
empty, although i can see it's not empty on the disk in
JBOSS_HOME/bin/repository/kie/...
Something has been corrupted somewhere. But I'm stuck. Any idea or
suggestions ?
What can prevent drools-wb from getting the repo data ?
Thanks
jps
--
View this message in context: http://drools.46999.n3.nabble.com/kie-drools-wb-6-0-1-view-artifact-repos...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Equality semantics of logical assertions and stated assertions
by mikerod
I understand that logical insertions in Drools does not insert two facts that
are equal according to their #equals implementation (and associated
#hashCode logic).
I'm basing this off of my own investigation plus the (well written)
documentation @
http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/....
However, normal/stated fact assertions only use identity-based equality
checks - by default.
It looks like this can be changed to value-based equality via
RuleBaseConfiguration.
I have found some related, old Jiras:
https://issues.jboss.org/browse/JBRULES-266
https://issues.jboss.org/browse/JBRULES-233
In both cases, Mark Proctor had a final remark, but I wasn't able to
understand what was really decided and why.
One specific comment @ https://issues.jboss.org/browse/JBRULES-266 is,
"logical assertions are always equality based. Stated facts can now use
identity and equality - using your configuration settings.
I have added another configuration setting to dictate how logical over-ride
works. Does it discard the original fact, or turn it into two stated fact
handles."
What is the reasoning behind only using the value-based equality for logical
assertions?
Why is it not configurable as stated fact assertions are?
Also, why is the default behavior of stated fact assertion to be
identity-based equality?
- I find the inconsistency between the default for normal assertions and the
(only option) for logical assertion to be a bit confusing/inconsistent.
I'm just looking for an understanding the motivation behind these design
decisions.
I have had a lot of performance issues using, primarily, logical assertions
due to the "no duplicate" checking being done.
Even the stated assertions do still come with a cost of creating the initial
FactHandle.
With deeply nested/complex domain objects, the #equals and #hashCode
implementations may be quite expensive when executed many times throughout
rule execution.
This is especially prominent in accumulators that may later accumulate these
objects into collections that then are also subject to this equals/hashCode
"penalty".
I have a related post a while back @
http://drools.46999.n3.nabble.com/Object-size-impact-on-session-insertion....
I do not believe it is typical to use complex domain model objects as the
keys to something like a HashMap.
One reason (there are more; especially for mutable objects) would be due to
the performance around having them be hashed and equality checked regularly
when the
map is accessed, modified, etc.
The creation of many FactHandle's has shown up in some of my profiling
performance problems due to this the constructor immediately hashing my
domain model objects.
I think the reason the fact handles use this information is for value-based
equality comparisons - such as the only method used by the Truth Maintenance
System logical assertions.
I would really appreciate more insight into the motivation for not allowing
#equals facts to be logically asserted separately into working memory -
especially since there is a price to pay for the behavior in my case.
--
View this message in context: http://drools.46999.n3.nabble.com/Equality-semantics-of-logical-assertion...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Repositories in Kie-Drools
by Sumit Dhaniya
I want to use a repository hosted on cloud as repository in my kie ide.
I tried creating a new repo cloning an existing repo but after cloning kie
ide creates a new repo path at localhost and doesn't uses the cloud repo
path.
Can I achieve this or I'll have to find a way to sync two repositories one
linked to kie and another to cloud repo.
--
View this message in context: http://drools.46999.n3.nabble.com/Repositories-in-Kie-Drools-tp4030254.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Kie Spring integration
by Sumit Dhaniya
Hi,
I'm trying to inject KieBase objects declared in my
kmodule.xml file which is in a jar imported by using maven dependencies in
my project but it doesn't work. Below are few things I tried :-
1.) @KBase(name="defaultKieBase")
@KReleaseId(artifactId="com.demo", groupId="FirstDemo",
version="1.0")
private KieBase kbase;
2.)KieServices.Factory.get().newKieContainer(KieServices.Factory.get().newReleaseId("com.demo","FirstDemo","1.0"))
nothing works until I import drl files in my project and write own
kmodule.xml file. FirstDemo Project is imported correctly using maven I can
see it in my dependencies also.
Is there anything I'm doing wrong?
I'm using spring-tc server and trying this in spring project and I've
imported spring-kie and kie-ci and related dependencies in my project.
--
View this message in context: http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Diesel montres courantes se présentent tout simplement parce que votre meilleure option dans la gestion de montres que vous pouvez acheter
by cheapwatches
Diesel annoncé catégorie des montres I-pod lecteur mp3, stéréo Main joueur de
poker (WMP-1V), ce fut le commencer avec le type il s'asseoir et regarder
rester conçu. Quand quelqu'un est une plongée importante dans le futur
potentiel, aider de nombreuses personnes à être manipulés par les
propriétaires chansons préférées en raison de sa propre s'asseoir et
regarder tout en étant get pour éclairer la période de temps. L'application
continua de courir Diesel Montre store <http://www.dieselmontre.com/>
montres à la suite d'être seul objectif principal réel pour vous aider
principal objectif multicouche, un style importante qui n'a effectivement
lieu et même voyager un peu rapidement. Mai '08 est une autre révolution
gigantesque conçu pour un moteur diesel à l'échelle mondiale dans la gestion
de montres devraient-ils déchargés que G-SHOCK Riseman, ce n'était que dans
le monde entier à commencer par 6 multi-bande le diesel des ondes qui
fonctionne sous montres à vendre restreintes s'asseoir et regarder de tous
les produits s'asseoir et regarder, moteur diesel contient fréquemment et
même systématiquement stimulé l'état de concept à leur fonctionnement
montres encore plus loin et plus si sont toujours la gestion à l'échelle
mondiale en ligne de montres de fonctionnement numérique, à laquelle
certaines personnes accueillent toujours une colossale partie de la
publicité. Grâce notion outre, les probabilités de concept de restauration
assez fréquemment, demain ne peuvent apparaître en effet remarquable dans un
moteur diesel, à travers un certain nombre de penser à tout ce qui les
possèdent alors une grande s'asseoir et regarder vraiment va acquérir. En
général individuel, ayant sur une montre-bracelet est vraiment aussi
rapide tout simplement parce que répondre et même la sélection de toutes
sortes de choses qui est bouclée dans la branche. En supposant que cela
pourrait effectivement éclairer un temps précieux, il est affligé sans avoir
un moment considération. Puis, dans l'individu qui pourrait être individuel
de ce qu'il ou elle les vêtements, à vrai dire, il est connu comme un devoir
de s'assurer qu'une personne fait la meilleure application. Obtenir un
emploi mieux peut utiliser le présentant sur le sit parfait et regarder pour
vous aider à aider à faire juste la bonne formule compte tenu de la diesel
autres parties alimenté montres courantes appartenant aux vêtements qu'ils
sont vraiment avoir sur. Le plus souvent, à moteur diesel montres courantes
se présentent tout simplement parce que votre meilleure option dans la
gestion de montres que vous pouvez acheter. Une chose très importante, une
fois l'achat s'asseoir et regarder Diesel Montre prix
<http://www.dieselmontre.com/> pour vous aider à être habillé en est
certainement l'occasion appartenant à l'asseoir et regarder faire tout le
travail. Toutefois, vous pourriez désirer la bonne façon attrayante
l'application se sent, en plus il est un être de s'assurer que vous serez en
appréciant un s'asseoir et regarder ce qui fonctionne totalement claire.
Diesel montres courantes sont remarquables pour sa propre possibilité
d'accomplir le bon nombre de prudent occasion de l'opération. Beaucoup de
ces montres courantes faire le travail tout à fait clairement pour une
personne qui pourrait être porté sur la variété d'options du fait que le
s'asseoir et regarder des cadeaux.
--
View this message in context: http://drools.46999.n3.nabble.com/Diesel-montres-courantes-se-presentent-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months