[rules-users] Rules doubt

Puneet duggal duggalpunit at gmail.com
Tue May 4 11:10:27 EDT 2010


@Wolfgang,

thanks a lot for ur wonderful explanation regarding the Dialect...
But i still cant find the better way
to know the exact error in some cases ,one case
i had mentioned in my previous post ...i want to highlight
that my drl are loading from database so i cant put break point
in drl.

appreciate ur help.
thanks
Puneet


On 5/4/10, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:
>
> Here, I've found this for you, a comment from the Drools source file
> org.drools.rule.builder.dialect.java.JavaDialectConfiguration
>
> * There are options to use various flavours of runtime compilers.
> * Apache JCI is used as the interface to all the runtime compilers.
> *
> * You can also use the system property "drools.compiler" to set the
> desired compiler.
> * The valid values are "ECLIPSE" and "JANINO" only.
> *
> * drools.dialect.java.compiler = <ECLIPSE|JANINO>
> * drools.dialect.java.lngLevel = <1.5|1.6>
> *
> * The default compiler is Eclipse and the default lngLevel is 1.5.
> * The lngLevel will attempt to autodiscover your system using the
> * system property "java.version"
> *
> * The JavaDialectConfiguration will attempt to validate that the
> specified compiler
> * is in the classpath, using ClassLoader.loasClass(String). If you intented
> to
> * just Janino sa the compiler you must either overload the compiler
> property before
> * instantiating this class or the PackageBuilder, or make sure
> Eclipse is in the
> * classpath, as Eclipse is the default.
>
> Try it without the JANINO setting - it *should* flag the setter with
> the incompatible types.
>
> If you haven't used MVEL so far, I don't see any reason to start now.
>
> -W
>
>
> 2010/5/4 Puneet duggal <duggalpunit at gmail.com>:
> > @  Wolfgang Laun ,
> >
> > i am using just this statement:-
> >
> > javaConf.setCompiler( JavaDialectConfiguration.JANINO );
> >
> > I dont know the exact use of this statement .I  am not using the mvel
> > , i tried to google abt it but couldnt find the use of this ...
> > can u through some light on this.
> >
> > Thanks
> >
> >
> > On 5/4/10, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:
> >>
> >> Actually, this kind of error isn't discovered by the Drools DRL
> compiler;
> >> it would be flagged by the Java compiler. (You can verify: if you make
> the
> >> same error in Java code, you'll get that error message.)
> >>
> >> But if you are using dialect "mvel" (are you?), this is not flagged as
> an
> >> error, and it would silently convert the Double to a String, and set
> >> fid31003 to "497.0". Is this what keeps your other rules from firing,
> i.e.,
> >> the excess ".0"?
> >>
> >> I suggest that you do not use "mvel" unless there is a compelling reason
> >> (in other rules). Even then, you might restrict use "mvel" to those
> rules
> >> where it is really necessary.
> >>
> >> -W
> >>
> >>
> >> 2010/5/4 Puneet duggal <duggalpunit at gmail.com>
> >>>
> >>> drlFile = BusinessRuleUtils.createCombinedDrlDocument(id,map.get(id));
> >>>
> >>>      PackageBuilder PACKAGE_BUILDER = new
> >>> PackageBuilder(BUILDER_CONFIGURATION);
> >>>      org.drools.rule.Package pkg = null;
> >>>      PACKAGE_BUILDER
> >>>        .addPackageFromDrl(new StringReader(drlFile));
> >>>      if (PACKAGE_BUILDER.hasErrors()) {
> >>>       DSM_LOGGER
> >>>         .logFatal("Error has occured while building package. For
> >>> Parameter ID : "
> >>>           + id
> >>>           + " Error details are : "
> >>>           + PACKAGE_BUILDER.getErrors()
> >>>             .toString());
> >>>      } else {
> >>>       pkg = PACKAGE_BUILDER.getPackage();
> >>>       RULEBASE.addPackage(pkg);
> >>>       DSM_LOGGER
> >>>         .logInfo("Package created for Component Prmr ID : "
> >>>           + id);
> >>>      }
> >>>
> >>>
> >>>
> >>> This is the code which i am using  at it is not giving
> >>> any error  at the time creating  the drl file.it is also
> >>> not giving any error at the time of calling of execute()
> >>> method , but rules are not executed .
> >>>
> >>> On 5/4/10, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:
> >>>>
> >>>> Anatoly,
> >>>>
> >>>> please note that I wrote "please" to Puneet, which is usually not
> >>>> considered
> >>>> as being "impolite". Also, kindly note that I asked for more
> >>>> information, which,
> >>>> in my book, is not "inconsiderate", as simply deleting Puneet's post
> >>>> might have been.
> >>>>
> >>>> I do resent being called a "hater", and I'll let the community judge
> >>>> whether
> >>>> my (admittedly ironic) kidding is "hateful". Somehow, however, posters
> >>>> have to
> >>>> be admonished to state their problem more detailed, without people on
> >>>> the
> >>>> list having to waste their time playing guessing games or writing
> >>>> replies begging
> >>>> for more information.
> >>>>
> >>>> -W
> >>>>
> >>>> PS: A you can see now, it was not a question of "debugging", and so
> you
> >>>> have wasted
> >>>> your time on a "simple question". :-)
> >>>>
> >>>>
> >>>> On Tue, May 4, 2010 at 5:10 AM, tolitius <webakaunt at gmail.com> wrote:
> >>>>>
> >>>>>
> >>>>> @Wolfgang,
> >>>>>
> >>>>>    No need to be a hater Wolfgang, the question is simple. I agree,
> >>>>> examples would be helpful, but that is NOT how you grow a friendly
> >>>>> community.
> >>>>>
> >>>>>    Community is the biggest problem JBoss has. Why is it so inhumanly
> >>>>> difficult to be polite and considerate?
> >>>>>
> >>>>> /Anatoly
> >>>>>
> >>>>> --
> >>>>> View this message in context:
> >>>>>
> http://drools-java-rules-engine.46999.n3.nabble.com/Rules-doubt-tp774023p775029.html
> >>>>> Sent from the Drools - User mailing list archive at Nabble.com.
> >>>>> _______________________________________________
> >>>>> rules-users mailing list
> >>>>> rules-users at lists.jboss.org
> >>>>> https://lists.jboss.org/mailman/listinfo/rules-users
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> rules-users mailing list
> >>>> rules-users at lists.jboss.org
> >>>> https://lists.jboss.org/mailman/listinfo/rules-users
> >>>>
> >>>
> >>>
> >>> _______________________________________________
> >>> rules-users mailing list
> >>> rules-users at lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/rules-users
> >>>
> >>
> >>
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >>
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> _______________________________________________
> 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/20100504/f46222dd/attachment.html 


More information about the rules-users mailing list