[rules-users] rules-users Digest, Vol 80, Issue 34

pritha.ghosh at wipro.com pritha.ghosh at wipro.com
Wed Jul 17 10:52:39 EDT 2013


I have only one rule employeemaprule
________________________________________
From: rules-users-bounces at lists.jboss.org [rules-users-bounces at lists.jboss.org] on behalf of rules-users-request at lists.jboss.org [rules-users-request at lists.jboss.org]
Sent: Wednesday, July 17, 2013 8:13 PM
To: rules-users at lists.jboss.org
Subject: rules-users Digest, Vol 80, Issue 34

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: help on drools guvnor (rjr201)
   2. Re: DRL always posting the format as txt instead of       model.drl
      (learnbrms)
   3. Re: rules-users Digest, Vol 80,   Issue 33 - help on drools
      guvnor (pritha.ghosh at wipro.com)
   4. Re: rules-users Digest, Vol 80, Issue 33 - help on drools
      guvnor (rjr201)
   5. Re: Problems with the Mrs Manners Benchmark (Mark Proctor)


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

Message: 1
Date: Wed, 17 Jul 2013 06:28:45 -0700 (PDT)
From: rjr201 <rich.j.riley at gmail.com>
Subject: Re: [rules-users] help on drools guvnor
To: rules-users at lists.jboss.org
Message-ID: <1374067725846-4024977.post at n3.nabble.com>
Content-Type: text/plain; charset=us-ascii

What are your rules?



--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-help-on-drools-guvnor-tp4024975p4024977.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


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

Message: 2
Date: Wed, 17 Jul 2013 06:32:18 -0700 (PDT)
From: learnbrms <srivats.rayaprolu at gmail.com>
Subject: Re: [rules-users] DRL always posting the format as txt
        instead of      model.drl
To: rules-users at lists.jboss.org
Message-ID: <1374067938811-4024978.post at n3.nabble.com>
Content-Type: text/plain; charset=us-ascii

Can anyone please advise to my above problem ?

Thanks,
Sri



--
View this message in context: http://drools.46999.n3.nabble.com/DRL-always-posting-the-format-as-txt-instead-of-model-drl-tp4024952p4024978.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


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

Message: 3
Date: Wed, 17 Jul 2013 13:34:10 +0000
From: <pritha.ghosh at wipro.com>
Subject: Re: [rules-users] rules-users Digest, Vol 80,  Issue 33 - help
        on drools guvnor
To: <rules-users at lists.jboss.org>
Message-ID:
        <6374181C9192E7459C135FEE70E5E16509F1E31F at CHN-SNR-MBX-8.wipro.com>
Content-Type: text/plain; charset="us-ascii"

The same code runs fine with

urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
                                .newUrlResource(new java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/OBSPOC/OBSSNAP/EmployeeMapRule.drl"));

And resourse type "DRL"

Please find below the source code of the rule

rule "EmployeeMapRule"
            no-loop true
            enabled true
            dialect "mvel"
            when
                EmployeeMap : EmployeeMap( employeeID : EmployeeID != null , employeeName : EmployeeName != null , employeeCountry : EmployeeCountry in ( "INDIA", "Australia", "USA" ) )
            then
                EmployeeMap.setEmployeeName( employeeName+" Success" );
                EmployeeMap.setEmployeeCountry( employeeCountry );
                EmployeeMap.setEmployeeID( employeeID );
                update( EmployeeMap );
        end

I have written the rule in guvnor.
Drools version 5.5


Please find below the source code for my model employeemap

        declare EmployeeMap
            EmployeeName: String
            EmployeeCountry: String
            EmployeeID: Integer
        end
I have attached the pojo class I am using to fire the rule

Thanks,
Pritha


-----Original Message-----
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of rules-users-request at lists.jboss.org
Sent: Wednesday, July 17, 2013 6:50 PM
To: rules-users at lists.jboss.org
Subject: rules-users Digest, Vol 80, Issue 33

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: help on drools guvnor (Stephen Masters)


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

Message: 1
Date: Wed, 17 Jul 2013 14:19:21 +0100
From: Stephen Masters <stephen.masters at me.com>
Subject: Re: [rules-users] help on drools guvnor
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID: <93FD4B72-09E1-4AEB-8ACD-CFC3B4BD36A9 at me.com>
Content-Type: text/plain; charset="us-ascii"

Have you tested that the rules fire when you load them as DRL?

It would probably be worth showing us what EmployeeMap looks like and the rule which you expect to fire if there is an EmployeeMap in working memory.

The Drools version would also be useful.

Steve


On 17 Jul 2013, at 14:04, pritha.ghosh at wipro.com wrote:

> Hi,
>
> I am not able to run rules from .pkg resources.
>
> Knowledgesession is getting populated with package and rules inside the packages but when I am firing ksession.fireAllRules(); no rules are getting executed.
>
> Below is my program
>
> final KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
>         // Use this line if calling rule defined using guvnor package
>         org.drools.io.impl.UrlResource urlResource;
>             try {
>                   urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
>                   .newUrlResource(new
> java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Gu
> vnor/package/OBSPOC/OBSSNAP/OBSPOC_OBSSNAP.pkg"));
>
>
>                   urlResource.setBasicAuthentication("enabled");
>                   urlResource.setUsername("admin");
>                   urlResource.setPassword("admin");
>                   kbuilder.add(urlResource,ResourceType.PKG);
>             }
>              catch (MalformedURLException e) {
>                         System.out.println("malformed URL");
>                         e.printStackTrace();
>                   }
>             catch (Exception e) {
>                   // TODO Auto-generated catch block
>                   e.printStackTrace();
>             }
>             // create the knowledge base
>             KnowledgeBase kbase =
> KnowledgeBaseFactory.newKnowledgeBase();
>
>
>
>
>         // Check the builder for errors
>         if (kbuilder.hasErrors()) {
>                         System.out.println(kbuilder.getErrors().toString() + "********");
>                         throw new RuntimeException("Unable to compile the rule file.");
>        }else{
>                         System.out.println(".....Rule File is Read Successfully....");
>         }
>
>         // get the compiled packages (which are serializable)
>         final Collection pkgs = kbuilder
>                                         .getKnowledgePackages();
>
>         // add the packages to a knowledgebase (deploy the knowledge packages).
>       //  final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
>          kbase.addKnowledgePackages(pkgs);
>
>
>         final StatefulKnowledgeSession ksession = kbase
>
> .newStatefulKnowledgeSession();
>
>         ksession.addEventListener(new DebugAgendaEventListener());
>         ksession.addEventListener(new
> DebugWorkingMemoryEventListener());
>
>          EmployeeMap employeeMap = new EmployeeMap();
>         employeeMap.setEmployeeCountry("INDIA");
>         employeeMap.setEmployeeID(1);
>         employeeMap.setEmployeeName("USERP");
>
>         ksession.insert(employeeMap);
>      ksession.fireAllRules();
>
>
>         ksession.dispose();
>
>
> Thanks,
> Pritha
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.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/20130717/6d327e7a/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 80, Issue 33
*******************************************

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EmployeeMap.java
Type: application/octet-stream
Size: 1042 bytes
Desc: EmployeeMap.java
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20130717/5b7cbcef/attachment-0001.obj

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

Message: 4
Date: Wed, 17 Jul 2013 07:02:45 -0700 (PDT)
From: rjr201 <rich.j.riley at gmail.com>
Subject: Re: [rules-users] rules-users Digest, Vol 80, Issue 33 - help
        on drools guvnor
To: rules-users at lists.jboss.org
Message-ID: <1374069765030-4024980.post at n3.nabble.com>
Content-Type: text/plain; charset=us-ascii

Why have you declared the class in a POJO and in the .DRL format?

I'm assuming you've uploaded the POJO into guvnor, and the used that to
declare your rules?



--
View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-rules-users-Digest-Vol-80-Issue-33-help-on-drools-guvnor-tp4024979p4024980.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


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

Message: 5
Date: Wed, 17 Jul 2013 15:43:34 +0100
From: Mark Proctor <mproctor at codehaus.org>
Subject: Re: [rules-users] Problems with the Mrs Manners Benchmark
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID: <3B1C888E-2CCD-4CCF-B6D3-016D2E8FA6E8 at codehaus.org>
Content-Type: text/plain; charset="iso-8859-1"

manners is a pretty terrible benchmark, and should probably not be used. Most vendors cheat it, and it doesn't really tell you much. Also to work it expects an OPS5 execution order, which we've attempted to emulate in the past, we may not in the future - which is probably why you have the infinite loop now.

Mark
On 17 Jul 2013, at 10:58, Sven B?cherer <Sven.Boecherer at EXXETA.com> wrote:

> Hello,
>
> I am writing my dissertation on BRMS. I want to analyze the performance of different systems. Drools is one of them.
> I installed Drools 6 and wanted to start the Mrs Manners Benchmark for a first analysis.
> Unfortunately if I chose anything else but 5 guests, I get an infinite loop where the program is never able to find the seating arrangement.
> Attached you find a screenshot of what the console looks like.
> I really hope you can help me with this problem.
>
> Best regards,
>
> Sven B?cherer
>
>
>
> Sven B?cherer
> Bachelorthesis
>
> EXXETA AG
> Albert-Nestler-Str. 11
> 76131 Karlsruhe
>
> fon       +49 721 6105-1500
> fax       +49 721 6105-1599
> mail      Sven.Boecherer at EXXETA.com
> web      www.EXXETA.com
>
>
> Sitz der Gesellschaft:
>
> EXXETA AG
> Albert-Nestler-Str. 11, 76131 Karlsruhe
> Vorst?nde: Achim Kirchg?ssner, Andreas Ritter
> Aufsichtsratsvorsitzender: Ulrich A. G?tz
> Ust-IdNr. DE813026499
> Eingetragen beim Amtsgericht Mannheim HRB 702566
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte
> Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind,
> informieren Sie bitte sofort den Absender und loeschen Sie diese E-Mail.
> Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der
> enthaltenen Informationen ist nicht gestattet.
> The information contained in this message is confidential or protected by law.
> If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorized copying of this message or
> unauthorized distribution of the information contained herein is prohibited.
>
> <Unbenannt.JPG><Unbenannt1.JPG>_______________________________________________
> 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/20130717/45b6698b/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 80, Issue 34
*******************************************

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com



More information about the rules-users mailing list