[rules-users] Problem while using the global - Drools 3.0.6

Natraj Gudla natraj.forums at gmail.com
Wed Jul 4 23:11:58 EDT 2007


Thanks Edson. I was able to get to this URL yesterday through some search on
the net.

On 7/4/07, Edson Tirelli <tirelli at post.com> wrote:
>
>
>    Natraj
>
>    The link is:
>
> http://jira.jboss.com/jira/browse/JBRULES
>
>    You need to create an account for you first, providing your e-mail, so
> you get notified when the ticket is worked on.
>
>    []s
>    Edson
>
> 2007/7/4, Natraj Gudla <natraj.forums at gmail.com>:
> >
> > Thanks Edson. I have never used JIRA earlier. Can you give me the
> > required URL or set up details to have it going for me.
> >
> > Thanks
> > Natraj
> >
> >
> >  On 7/3/07, Edson Tirelli <tirelli at post.com> wrote:
> > >
> > >
> > >     Natraj,
> > >
> > >     There are a couple technical difficulties why this does not work,
> > > but if you think it would be important to have that, please open a JIRA with
> > > the feature request. We will look into making that possible in future
> > > releases.
> > >
> > >     Thank you,
> > >       Edson
> > >
> > >
> > > 2007/7/3, Natraj Gudla <natraj.gudla at gmail.com>:
> > > >
> > > > Hi Edson, thanks for the update. Any specific reason why this is so?
> > > > Because as a general convention in Java, we tend to use global declarations
> > > > in any constructs across. It would be a good thing to have.
> > > >
> > > >
> > > >
> > > >
> > > > On 7/2/07, Edson Tirelli <tirelli at post.com> wrote:
> > > > >
> > > > >
> > > > >    Natraj,
> > > > >
> > > > >    Globals were not designed to be available in functions, unless
> > > > > they are sent in as parameters in the way you did in your second example.
> > > > >
> > > > >    []s
> > > > >    Edson
> > > > >
> > > > > 2007/7/2, Natraj Gudla <natraj.gudla at gmail.com>:
> > > > > >
> > > > > >  Hello,
> > > > > >
> > > > > > I am using Drools 3.0.6. While using a global variable in a
> > > > > > function, the compiler complains it cannot resolve the global variable name.
> > > > > > Something like below
> > > > > >
> > > > > > *
> > > > > >
> > > > > > global
> > > > > > *com.*sample*.ExampleLogger *customLogger*;*
> > > > > >
> > > > > > function
> > > > > > **void* logMessage(String msg){
> > > > > >
> > > > > > customLogger.logMessage("Log Message from the function");
> > > > > >
> > > > > > }
> > > > > > In the above code, it complains "customLogger cannot be
> > > > > > resolved". I am able to refer the global in the consequence of a rule
> > > > > > directly. What is the problem using the reference within a function.
> > > > > >
> > > > > > On the other hand, i am able to do something like
> > > > > > * *
> > > > > >
> > > > > > function *void* logMessage(ExampleLogger custLogger,String msg){
> > > > > >
> > > > > > custLogger.logMessage(msg+
> > > > > > " Accept gloabal as function parameter");
> > > > > >
> > > > > > }
> > > > > > and call from the consequence of a rule : logMessage(customLogger);
> > > > > > // I am passing the global to the function as an argument and then use it to
> > > > > > log a message.
> > > > > > This way is working. But not the first way of using the global
> > > > > > in the function.
> > > > > >
> > > > > > Any help??
> > > > > >
> > > > > > Thanks
> > > > > > --
> > > > > > Natraj Gudla
> > > > > >
> > > > > > _______________________________________________
> > > > > > rules-users mailing list
> > > > > > rules-users at lists.jboss.org
> > > > > > https://lists.jboss.org/mailman/listinfo/rules-users
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > >   Edson Tirelli
> > > > >   Software Engineer - JBoss Rules Core Developer
> > > > >   Office: +55 11 3529-6000
> > > > >   Mobile: +55 11 9287-5646
> > > > >   JBoss, a division of Red Hat @ www.jboss.com
> > > > > _______________________________________________
> > > > > rules-users mailing list
> > > > > rules-users at lists.jboss.org
> > > > > https://lists.jboss.org/mailman/listinfo/rules-users
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Natraj Gudla
> > > > _______________________________________________
> > > > rules-users mailing list
> > > > rules-users at lists.jboss.org
> > > > https://lists.jboss.org/mailman/listinfo/rules-users
> > > >
> > > >
> > >
> > >
> > > --
> > >   Edson Tirelli
> > >   Software Engineer - JBoss Rules Core Developer
> > >   Office: +55 11 3529-6000
> > >   Mobile: +55 11 9287-5646
> > >   JBoss, a division of Red Hat @ www.jboss.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
> >
> >
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of 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/20070705/d0959243/attachment.html 


More information about the rules-users mailing list