[rules-users] Drools reflection problem.

tom ska tiberium.linux at gmail.com
Wed Sep 15 02:27:10 EDT 2010


Hi,
I have never been doing this (opening a JIRA), but I will try in next 2,
meaby 3 days - when I would have some extra time for it :)

Thanks,
tom.

2010/9/15 Edson Tirelli <tirelli at post.com>

>   That is odd Tom. Can you please open a JIRA for it and attach a
> test case to reproduce the problem plz? I will look into it when I get
> a chance.
>
>   Edson
>
> 2010/9/14 tom ska <tiberium.linux at gmail.com>:
> > 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.
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
>
> --
>   Edson Tirelli
>   JBoss Drools Core Development
>   JBoss by Red Hat @ www.jboss.com
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100915/72330011/attachment.html 


More information about the rules-users mailing list