[Beginners Corner] - Example Code
by Anea
Hello there,
i´m a beginner on rules and BREs and still trying to understand the Drools examples.
In my attempt to implement my own example adapted from the "golf" example I encountered a problem.
Here is my example:
There are 3 Girls, each has a name, a lastname, a fad and gets some pocket-money.
The task is, to find a solution for following facts and rules:
girl-names: Marion, Susi, Uschi
lastnames: Müller, Bauer, Weber
fads: records, sweets, dresses
money: 6?, 7?, 8?
1) Marion loves Sweets. She gets less money than the Girl with the lastname Weber.
2) Susi gets 7?.
3) Uschi doesn´t spent her money on records. Uschi and the girl with the lastname Bauer get another amount than 6?.
the information about the girls works exactly like the "Golf" example.
g1:Girl($marionsName:name=="Marion", .... )
g2:Girl($susisName:name=="Susi", .... )
g3:Girl($uschisName:name=="Uschi", .... )
My Problem is, how to bring the information in "that the girl with the lastname Bauer gets another amount than 6?".
my first idea was to add something like
Girl(lastname == "Bauer", money!=6)
but this does not want to do, what I want it to.
As far, as I understand it, this only selects the matching facts from the working memory. How can I tell the system, that I don´t want to find new Girls, but only add some additional information to the girls, which are already found?
Is there something like a "union" function in Drools?
Thanks for your help.
P.S. excuse the errors in my english, I´m german ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977221#3977221
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977221
19 years, 7 months
[JBoss Seam] - Re: Postback/form resubmission detection
by alpheratz-jb
It Just Works.
It sure does! MANY thanks...it is coming together for me now!
My (poor longsuffering) wife just heard me exclaim "Gavin, you genious!"
I LIKE this feature (now I understand it, of course...)
This is exactly what I mean by "simple solution" and "a high-level note".
When I evaluate a framework, I am looking for "added value", or more "bang for buck." This feature just did it for me ;-)
I have been looking at apache shale (didn't seem enough of a "leap forward"); spring (I just LOVE the way that people are saying that EJB2.x descriptors are too complex, and then wading into spring's morasses of XML configuration; easier testability is nice, though) and Seam....Seam "felt right" to me, in terms of making proper use of the latest and greatest, but I couldn't see my way through.
So: many thanks. This is Good Work.
Alph.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977220#3977220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977220
19 years, 7 months
[JBoss jBPM] - ClassNotFoundException: couldn't load delegation class
by maddogmooney
Firstly I must apologise as there appears to be 7 other threads that look at similar issues - but I was unable to resolve the problem.
I have a process definition inside my webapp and can succesfully parse the XML to load it inside a servlet. However the process references an assignment handler, and when it comes to calling createStartTaskInstance() I get the error:
couldn't load delegation class 'rats.handler.PreviousAssignmentHandler'
| java.lang.ClassNotFoundException: class 'rats.handler.PreviousAssignmentHandler' could not be found by the process classloader
The compiled class file is in the correct location inside WEB-INF/classes/... when I create the war - so from the other threads it would appear that I have my jars in the wrong places. I have experimented moving around the various hibernate, ehcache and jbpm jars/sars between the server lib, the sar and the war ... all to no avail.
Can anyone give me an idea of what jars etc I need to put where? Also, if the same jar is in more than one location (eg inside server lib and inside war) does this create a problem?
I have not customised anything from the defaults, so it is more likely to be not having configured something rather than the result of me trying to do something tricky.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977213#3977213
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977213
19 years, 7 months