[rules-users] rules-users Digest, Vol 39, Issue 45

Nilima R nilima.r at tcs.com
Thu Feb 18 04:39:40 EST 2010


Hi 

In drools in deployment we get the below link.
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/xxxxxxx/LATEST.drl 

We need to include this in properties file in application wherein this URL 
is mentioned.
How can one protect unauthorized access to this URL as the whole set of 
rules can be viewed for this .


Nilima 
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________



From:
rules-users-request at lists.jboss.org
To:
rules-users at lists.jboss.org
Date:
02/17/2010 10:14 PM
Subject:
rules-users Digest, Vol 39, Issue 45
Sent by:
rules-users-bounces at lists.jboss.org



Send rules-users mailing list submissions to
                 rules-users at lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
                 https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
                 rules-users-request at lists.jboss.org

You can reach the person managing the list at
                 rules-users-owner at lists.jboss.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."


Today's Topics:

   1. Re: Negating a result (Wolfgang Laun)
   2. Re: Negating a result (djb)
   3. Re: Negating a result (Wolfgang Laun)
   4. Re: guvnor - dsl rule editor - using ":" in text box
      (Toni Rikkola)
   5. Re: getWorkingMemoryEntryPoint returns NULL (Wolfgang Laun)
   6. Insert new facts from RHS (Malinda Kaushalye)
   7. Re: Insert new facts from RHS (Mauricio Salatino)
   8. Re: Insert new facts from RHS (Enda J Diggins)


----------------------------------------------------------------------

Message: 1
Date: Wed, 17 Feb 2010 09:48:50 +0100
From: Wolfgang Laun <wolfgang.laun at gmail.com>
Subject: Re: [rules-users] Negating a result
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
 <17de7ee81002170048j6898203br6a73e2e2962cbc79 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Please be more specfic. If your field is called "foo", then
should have a method in the class representing
your fact, such as:

   boolean getFoo(){
       return <condition> ? ! (<expression>) : <expression>;
   }

Basically, <condition> could be a global parameter (public static final)
or a static or regular method call. <expression> could depend on other
attribute values, and so on.

You can then write your CEs with a test such as
  foo == true

But I think this is closely related with that other question you
have posted.

-W


On Wed, Feb 17, 2010 at 9:32 AM, djb <dbrownell83 at hotmail.com> wrote:

>
> Hi Wolfgang,
>
> Sure, I know de Morgan's laws, but I'm not asking how one can negate a
> condition...
>
> I'm asking how one can either negate or not negate, based on a test... 
and
> whether I'm going to have to split my spreadsheet/rule-template into 2,
> (i.e. 1 for "may not be" rules, 1 for "must be" rules).
>
> My spreadsheet has a field that in Java would be expressed as field ?
> !finalResult : finalResult
>
> But in DRL, it seems the lack of a ternary operator means I have to 
split
> my
> rule-set, and I'm just checking if this is the case.
>
> -Daniel
>
> --
> View this message in context:
> http://n3.nabble.com/Negating-a-result-tp212559p212656.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.jboss.org/pipermail/rules-users/attachments/20100217/18c19147/attachment-0001.html 


------------------------------

Message: 2
Date: Wed, 17 Feb 2010 02:02:08 -0800 (PST)
From: djb <dbrownell83 at hotmail.com>
Subject: Re: [rules-users] Negating a result
To: rules-users at lists.jboss.org
Message-ID: <1266400928420-212797.post at n3.nabble.com>
Content-Type: text/plain; charset=us-ascii


Well the thing is, it's not just one condition - it's the combination of 
all
my rule's conditions. 
And my rules have about 7 conditions, none of which are mandatory. 

And that is actually the source of all my problems: that the conditions 
are
optional.

If I set up a few logical relationships, there is nothing specific I am
testing on, which gives a single expression I can test in a function.  In
procedural programming, I check each of the 7 conditions optionally, and
then I apply my ternary operator to the final result.  But here I can't do
that, because the condition is made up of all the little conditions that 
may
or may not be applicable.



PS. 
Ok, so I see from the other thread that a rule template is meant to place
whatever text you give it, like a text pre-processor.  I'll see if that is
correct, thanks.  I thought it might not be, because if you provide a 
blank
cell, it deletes your entire condition, instead of providing a "" or a 
null,
like you'd expect from a text pre-processor.

-- 
View this message in context: 
http://n3.nabble.com/Negating-a-result-tp212559p212797.html
Sent from the Drools - User mailing list archive at Nabble.com.


------------------------------

Message: 3
Date: Wed, 17 Feb 2010 11:33:14 +0100
From: Wolfgang Laun <wolfgang.laun at gmail.com>
Subject: Re: [rules-users] Negating a result
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
 <17de7ee81002170233s62e0353fs50d439c532c75e82 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Wed, Feb 17, 2010 at 11:02 AM, djb <dbrownell83 at hotmail.com> wrote:

>
> Ok, so I see from the other thread that a rule template is meant to 
place
> whatever text you give it, like a text pre-processor.  I'll see if that 
is
> correct, thanks.


I implemented this, so I hope I still know what I did. :-)


>  I thought it might not be, because if you provide a blank
> cell, it deletes your entire condition, instead of providing a "" or a
> null,
> like you'd expect from a text pre-processor.
>

The idea of the interface for generating rules from object collection
is to avoid the constraints of spreadsheet translation.

-W

> --
> View this message in context:
> http://n3.nabble.com/Negating-a-result-tp212559p212797.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.jboss.org/pipermail/rules-users/attachments/20100217/ea6ec91f/attachment-0001.html 


------------------------------

Message: 4
Date: Wed, 17 Feb 2010 12:33:10 +0200
From: Toni Rikkola <trikkola at redhat.com>
Subject: Re: [rules-users] guvnor - dsl rule editor - using ":" in
                 text box
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID: <4B7BC5E6.6040704 at redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Tested it and this is a bug.
I made a Jira for it so you can follow it.
https://jira.jboss.org/jira/browse/GUVNOR-505

Toni

John Walker wrote:
> All,
>
> I have a DSL sentence that looks like this:
> [when]- and var9 matches {v9}=field9!=null, field9 matches "{v9}"
>
> When using the Guvnor guided rule editor, I add the "- and var9 
> matches {v9}" DSL sentence to the rule, giving me a WHEN condition 
> like this:
> - and var9 matches [text box]
>
> I want to put a URL in the text box, but anytime I use a value 
> containing a colon":",
> I get a popup box with error message "The value [some value with a 
> colon] is not valid for this field"
>
> Example:
> DSL in rule, using guvnor guided editor:  "- and var9 matches 
> [http://google.com]"
> Popup error message:   "The value http://google.com is not valid for 
> this field"
>
> What needs to happen to allow a value with a colon?  I did not have 
> this problem with drools4 and JBRMS.
>
> Thanks,
> John
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 



------------------------------

Message: 5
Date: Wed, 17 Feb 2010 13:59:03 +0100
From: Wolfgang Laun <wolfgang.laun at gmail.com>
Subject: Re: [rules-users] getWorkingMemoryEntryPoint returns NULL
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
 <17de7ee81002170459y5c64fe34p2922245f510decfc at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Do you use "global" in your rules? This would be the "declaration" of an
entry point.

Also, KnowledgeSessionConfiguration should be passed to the method call
creating a session, which I don't see in your code.

-W

On Wed, Feb 17, 2010 at 2:16 AM, Malinda Kaushalye 
<kaushalye at yahoo.com>wrote:

> Dear All,
> It appears to be that the getWorkingMemoryEntryPoint() method returns 
NULL
> in my code given below.
> Note that EventProcessingOption = STREAM and ClockType = "realtime" if 
that
> is of any importance.
> Cheers,
> Malinda
>
> public class EventKnowledgeBase { private  KnowledgeBase kbase = null;
> private  StatefulKnowledgeSession ksession = null; private
>  WorkingMemoryEntryPoint globalStream = null;
> public EventKnowledgeBase() throws Exception {
> super();
> kbase = readKnowledgeBase();
> ksession = kbase.newStatefulKnowledgeSession();
> KnowledgeBaseConfiguration config =
> KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
> config.setOption( EventProcessingOption.STREAM );
> KnowledgeSessionConfiguration kbSessionConfig =
> KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
> kbSessionConfig.setOption( ClockTypeOption.get("realtime") );
> globalStream = ksession.getWorkingMemoryEntryPoint( "global" );
> if(null == globalStream){
> System.out.println("WorkingMemoryEntryPoint is Null"); //YEAH..!  IT
> RETURNS NULL
> }
> }
>
>
> }
>
>
>
>
>
> _______________________________________________
> 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/20100217/23fa4cdc/attachment-0001.html 


------------------------------

Message: 6
Date: Wed, 17 Feb 2010 08:25:37 -0800 (PST)
From: Malinda Kaushalye <kaushalye at yahoo.com>
Subject: [rules-users] Insert new facts from RHS
To: rules-users at lists.jboss.org
Message-ID: <817565.1542.qm at web56503.mail.re3.yahoo.com>
Content-Type: text/plain; charset=utf-8

Hi All,
How do I insert new facts/events to the working memory from RHS?

rule "myrule"
when 
//Some condition
then 
 
//Create and Insert some new events/facts to the working memory 
end

Cheers,
Malinda


 




------------------------------

Message: 7
Date: Wed, 17 Feb 2010 13:35:40 -0300
From: Mauricio Salatino <salaboy at gmail.com>
Subject: Re: [rules-users] Insert new facts from RHS
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
 <efac615a1002170835q3ee9c0d8o8d1efada0ef1e310 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

just calling
insert(new Person());
in the RHS

On Wed, Feb 17, 2010 at 1:25 PM, Malinda Kaushalye 
<kaushalye at yahoo.com>wrote:

> Hi All,
> How do I insert new facts/events to the working memory from RHS?
>
> rule "myrule"
> when
> //Some condition
> then
>
> //Create and Insert some new events/facts to the working memory
> end
>
> Cheers,
> Malinda
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.jboss.org/pipermail/rules-users/attachments/20100217/f380292f/attachment-0001.html 


------------------------------

Message: 8
Date: Wed, 17 Feb 2010 16:38:35 +0000
From: Enda J Diggins <ejdiggins at gmail.com>
Subject: Re: [rules-users] Insert new facts from RHS
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
 <55587e551002170838u27e625efqa41ca3973564c91 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Malinda,

rule "myrule"
 when
   //some condition
  then
   insert(new Object());
   // or
   Variable var = new Variable();
   insert(var);
end



On Wed, Feb 17, 2010 at 4:25 PM, Malinda Kaushalye 
<kaushalye at yahoo.com>wrote:

> Hi All,
> How do I insert new facts/events to the working memory from RHS?
>
> rule "myrule"
> when
> //Some condition
> then
>
> //Create and Insert some new events/facts to the working memory
> end
>
> Cheers,
> Malinda
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Enda J Diggins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.jboss.org/pipermail/rules-users/attachments/20100217/f4adb2cf/attachment.html 


------------------------------

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


End of rules-users Digest, Vol 39, Issue 45
*******************************************


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100218/7efcf055/attachment.html 


More information about the rules-users mailing list