Guvnor InvalidClassException
by Robert Morse
I have a Seam 2.2 application that works perfectly with Drools when it references the drl file directly. Using Guvnor 5.1.0.M1 and the same drl, I'm getting the exception listed below.
I've used earlier releases of Guvnor without any issues, but was curious why this would occur. I've stayed away from the latest release of Guvnor because my cursory evaluation leads me to believe
it's unstable. Clicking on the "verify" button for a particular rule locks JBoss 5.0.
Thanks for your help.
14:13:55,777 ERROR [STDERR] java.io.InvalidClassException: org.drools.base.ClassFieldAccessorStore; local class incompatible: stream classdesc serialVersionUID = 400, local class serialVersionUID = 487535245723988666
The human mind is an iterative processor, it never does anything right the first time. What it does well is to make improvements on every iteration (deMarco)
15 years, 6 months
How to remove a persisted session from the database ?
by Gustavo Tenrreiro
Hi,
I am using persistence, and since the sessions don't seem to have a
standard way of getting removed from the database when they are not
needed anymore, I am wondering how to do that.
I am using JPA but if I call :
em.remove(someSessionInfo);
where em is the JPA EntityManager, that does not remove the entry from
the database.
if I try to use a Query returned by the em.createQuery("delete from
SessionInfo where id = 1") it complains that it needs a transaction,
and since I don't know how to get around the issue I am stuck.
Any help would be appreciated.
Thanks
15 years, 6 months
Drools dependencies
by Evert Penninckx
Hello
I'm using ant to compile and deploy a project which uses drools. I ran in
some jar dependency problems and have a hard time understanding which
packages are required for what and which dependent libs are really needed.
I read the README_DEPENDENCIES file, but it's rather outdated by now. Is it
possible to update this file?
Tnx
Evert
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-dependencies-t...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
simultaneous forEach
by Carlos Villegas
Hi,
I'm testing Drools Flow functionality and it seems that the foreach node
iterates over the collection one value at a time, the embedded flow is
executed sequentially for each value. I'm looking for some construct
that invokes each embedded flow simultaneously for each collection
value. Like a AND split/AND join of multiple instances.
Is this possible with forEach, am I missing some configuration? or any
other way to achieve it.
Thanks,
Carlos
15 years, 6 months
using forall to validate same field value from a list
by tushmish
Hi,
My requirement is to check for same field value from a list of items. in the
test case mentioned below, I want to verify that all the applicants are of
same age.
I am running the rule as mentioned below. The 'then' part does not execute.
Please suggest.
Thanks for your time.
public class Applicant {
private String name;
private int age;
private BigDecimal amount;
// getter and setters
}
rule "age"
when
$list : List();
forall( $app : Applicant( $age : age) from $list
Applicant( this == $app, age == $age ) );
then
System.out.println("success" );
end
// setting data in working memory
Applicant applicant1 = new Applicant("aaaa", 20, new BigDecimal(16.50));
Applicant applicant2 = new Applicant("aaaa", 20, new BigDecimal(16.50));
Applicant applicant3 = new Applicant("aaaa", 20, new BigDecimal(16.50));
List<Applicant> list = Arrays.asList(new Applicant[] { applicant1,
applicant2, applicant3 });
ksession.insert(list);
Regards,
Tushar
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/using-forall-to-valid...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Waiting in the Join node (AND)
by Ji Oh Yoo
Hi,
I am a new to Drools and I have a question.
I set up the Join (AND) node having two incoming edges,
one from some other node and one from some Event node.
I thought the Join (AND) node should wait until the Event node is triggered
(triggered by separate user input)
but the process actually stops when the process is in that Join node.
Should I use ksession.fireUtilHalt() instead of ksession.fireAllRules(),
or should I use something else?
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Waiting-in-the-Join-n...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Drools reflection problem.
by tom ska
Hi,
in my package definition I have two kinds of facts. I use stateFullSession
and I send to ksession facts of two different types. For each type I have
one rule using only this type. So what I am doing is processing two
different fact's types in one session. I start fireAllRules, and I know it
fires good rules, and all is working fine. But problem appears later - when
I want to get my fact's back using Drools reflection API.
With first type (facts of first type) all is working fine, but when I change
factType object to "point" into another type (the second one), I get
problems:
[ERROR] package.Type2 cannot be cast to package.Type2
java.lang.reflect.InvocationTargetException
It is thrown when I call
kbase.getFactType(package, Type2).get(factObject , "filed1_name");
I know that factObject is good, because when I use syso (factObject) I get
what I want.
What surprises me is when I call it for Type1 it works. Also, if I process
in ksession only one fact type using my code, I don't get this error (for
first and second fact type).
Thanks,
tom.
15 years, 6 months
Re: [rules-users] [rules-dev] Technical Rules
by Wolfgang Laun
There is a short hint in the Expert Manual, subsection 4.11.3, where
conversion between DRL and XML using classes such as DrlParser and XmlDumper
is discussed. A .brk is just the "native" Drools XML format.
-W
On 14 September 2010 01:17, Leonardo Gomes <leonardo.f.gomes(a)gmail.com>wrote:
> Hi Amisha,
>
> You should use the user's list: <rules-users(a)lists.jboss.org> for this
> sort of question.
>
> AFAIK, no you can't convert technical rules (manually written drl) to
> business rules (.brl) generated with the graphical editor using Guvnor.
>
> Cheers,
> Leo.
>
>
> On Mon, Sep 13, 2010 at 10:42 PM, apatel <apatel(a)ondeckcapital.com> wrote:
>
>>
>> Hi,
>>
>> Is it possible to port Technical Rules in Drools to Business Rules? Is the
>> procedure posted somewhere?
>>
>> Also is it possible to apply Drools Categories to Technical Rules?
>>
>> Thanks for your help,
>> Amisha
>> --
>> View this message in context:
>> http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp146...
>> Sent from the Drools - Dev mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
15 years, 6 months
Guvnor Asset versioning vs Package snapshot versioning
by Abdel Dridi
I am using Guvnor packaging and snapshot creation.
I have three environment DEV, UAT and Production, I configured each
environment with a package snapshot to listen to, each time the package
change, I build it then overwrite the snapshot for that particular
environment. This was working great for me, however when my server fail to
deploy the new updated snapshot package, I want to roll back to the old
working one which was overwritten already - this is a problem.
Why Guvnor does not provide package versioning, just like asset versioning?
I took a look at the code and was thinking to add a control before
overwriting the package snapshot to prevent the user to backup his package
snapshot before overwriting it which will lead to a package clone before the
overwrite happen.
What do you guys think?
I will volunteer to add this feature if you think it make sense.
Thoughts?
Abdel
15 years, 6 months