[rules-users] rules-users Digest, Vol 43, Issue 117

amit bhardwaj amitbdj1481 at gmail.com
Sat Jun 19 15:20:51 EDT 2010


Is anyone have working example with drool decision table. Please provide the
example

On Sat, Jun 19, 2010 at 11:08 PM, <rules-users-request at lists.jboss.org>wrote:

> 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: MVEL strict mode -- when, why? (Barry Kaplan)
>   2. Re: JBoss password required to connect a PKG via a Agent
>      (Jervisliu)
>   3. Connection with Active Directory multiple organizational
>      units (G3)
>   4. Re: [Knowledge Agent Question (Mahalakshmi)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 19 Jun 2010 09:08:06 -0700 (PDT)
> From: Barry Kaplan <groups1 at memelet.com>
> Subject: Re: [rules-users] MVEL strict mode -- when, why?
> To: rules-users at lists.jboss.org
> Message-ID: <1276963686581-907803.post at n3.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hey Edson,
>
> If I don't explicitly set strict to false my rules fail to compile. I will
> create a simple example. Or maybe this two phase is post 5.0.1?
>
> -barry
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/MVEL-strict-mode-when-why-tp95666p907803.html
> Sent from the Drools - User mailing list archive at Nabble.com.
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 20 Jun 2010 00:47:43 +0800
> From: Jervisliu <jliu at redhat.com>
> Subject: Re: [rules-users] JBoss password required to connect a PKG
>        via a Agent
> To: Rules Users List <rules-users at lists.jboss.org>
> Message-ID: <4C1CF4AF.5010503 at redhat.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> You can include username/pwd in your ChangeSet, see below:
>
>        <add>
>            <resource
> source='
> http://localhost:8081/jboss-brms/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST
> '
> type='PKG' basicAuthentication='enabled' username='admin' password='pwd'/>
>         </add>
>
> Details can be found from
>
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/xml/changeset/ChangeSetTest.java
>
> Cheers,
> Jervis
>
> mmquelo massi wrote:
> > Hi everybody,
> >
> > I am using Guvnor 501M2 on JBoss standalone.
> >
> > I am accessing the PKG resource from my java code as follows:
> >
> >
> >
> >     ResourceBundle resourceBundle =
> >     ResourceBundle.getBundle("guvnoragent"); Properties props = new
> >     Properties();
> >     props.setProperty("drools.resource.scanner.interval",
> >     resourceBundle.getString("poll")); ResourceChangeScanner service =
> >     ResourceFactory.getResourceChangeScannerService();
> >     ResourceChangeScannerConfiguration rconf =
> >     service.newResourceChangeScannerConfiguration(props);
> >     service.configure( rconf ); //Agent Conf
> >     KnowledgeAgentConfiguration aconf =
> >     KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
> >     aconf.setProperty("drools.agent.scanDirectories",
> >     resourceBundle.getString("scanDir"));
> >     aconf.setProperty("drools.agent.scanResources",
> >     resourceBundle.getString("scanRsc")); BufferedReader bfr=null; try
> >     { bfr = new BufferedReader(new FileReader(new
> >     File("......Changeset.xml"))); } catch (Exception e) { ... }
> >     //Agent configurato e con Packages guvnor aggiunti KnowledgeAgent
> >     kagent = KnowledgeAgentFactory.newKnowledgeAgent("AgentPOC",
> >     aconf); Resource csReader =
> >     ResourceFactory.newReaderResource(bfr);
> >
> kagent.applyChangeSet(csReader);<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >
> > Here I get the following exception:
> >
> >     *Caused by: java.io.IOException: Server returned HTTP response
> >     code: 401 for URL:
> >
> http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Test/LATEST*
> >     at
> >
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1187)
> >     at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:194)
> >     at
> >     org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:130)
> >     at
> >
> org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:574)
> >     ... 7 more [2010:06:160 19:06:671:debug] KnowledgeAgent obtaining
> >     pkg resource=[UrlResource
> >     path='
> http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Test/LATEST
> ']
> >     [2010:06:160 19:06:671:exception] java.lang.RuntimeException:
> >     KnowledgeAgent exception while trying to deserialize
> >     KnowledgeDefinitionsPackage at
> >
> org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:829)
> >     at
> >
> org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:627)
> >     at
> >
> org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:513)
> >     at
> >
> org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:145)
> >     at
> >
> org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:130)
> >     at
> >
> com.reply.alitalia.mm.poc.engine.RuleService.exeRules(RuleService.java:74)
> >     at Main.main(Main.java:113)
> >
> >
> > *This is why the server is asking Java the JBoss credentials!!!*
> >
> > How can I pass them?
> > Should I define them in the changeset.xml?
> > If it is so where can I fine the XSD file ???? I guess there is a tag
> > or an attribute like "password" or something
> > that will contain date that the Agent has to send to the server....
> > Should I remove the password check from JBoss?
> >
> > Please let me know.
> >
> > As far as I know there are other people on the IRC CHAT with the same
> > issue.
> >
> > Thank you 4 any help u can give me.
> >
> > Bye,
> >
> > Massi.
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 19 Jun 2010 10:17:51 -0700 (PDT)
> From: G3 <charmz05 at gmail.com>
> Subject: [rules-users] Connection with Active Directory multiple
>        organizational units
> To: rules-users at lists.jboss.org
> Message-ID: <1276967871426-907892.post at n3.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> I am able to authenticate with Active Directory but with only a single
> organizational unit but not with users of multiple organizational units
> This is my organizational structure
> +cn=test,cn=con
> --+ou=Sample1
> -----uid:user1,uid:user2
> --+ou=Sample2
> -----uid:user3,uid:user4
> --+roles
> -----admin:uid:user1,user3
> -----user:uid:user2,user4
>
> I have set the admin rights accordingly in Guvnor.
> I am using Jboss Guvnor standalone 4.2.3  and I am trying to connect
> multiple organizational units using JAAS
>  my login-config.xml
> ---------------------
> <application-policy name="adConnection">
>  <authentication>
>  <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule"
> flag="required" >
>  <module-option
> name="java.naming.provider.url">ldap://c.test.com:389/</module-option>
>  <module-option
> name="java.naming.security.authentication">simple</module-option>
>  <module-option
> name="bindDN">CN=Administrator,CN=Users,dc=test,dc=com</module-option>
>  <module-option name="bindCredential">password</module-option>
>  <module-option name="baseCtxDN">OU=Sample1,dc=test,dc=com</module-option>
>  <module-option name="baseFilter">(CN={0})</module-option>
>  <module-option name="rolesCtxDN">OU=roles,dc=test,dc=com</module-option>
>  <module-option name="uidAttributeID">member</module-option>
>  <module-option name="matchOnUserDN">true</module-option>
>  <module-option name="roleFilter">(member={1})</module-option>
>  <module-option name="roleAttributeID">CN</module-option>
>  <module-option name="roleRecursion">-1</module-option>
>  </login-module>
> <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule"
> flag="required" >
>  <module-option
> name="java.naming.provider.url">ldap://c.test.com:389/</module-option>
>  <module-option
> name="java.naming.security.authentication">simple</module-option>
>  <module-option
> name="bindDN">CN=Administrator,CN=Users,dc=test,dc=com</module-option>
>  <module-option name="bindCredential">password</module-option>
>  <module-option name="baseCtxDN">OU=Sample2,dc=test,dc=com</module-option>
>  <module-option name="baseFilter">(CN={0})</module-option>
>  <module-option name="rolesCtxDN">OU=roles,dc=test,dc=com</module-option>
>  <module-option name="uidAttributeID">member</module-option>
>  <module-option name="matchOnUserDN">true</module-option>
>  <module-option name="roleFilter">(member={1})</module-option>
>  <module-option name="roleAttributeID">CN</module-option>
>  <module-option name="roleRecursion">-1</module-option>
>  </login-module>
>  </authentication>
> </application-policy>
>
> and my component.xml
> -------------------------
> <security:identity authenticate-method="#{authenticator.authenticate}"
>                      jaas-config-name="adConnection"/>
>
> I donot get any  errors in server console during deployment but when login
> ,I cannot login into Guvnor and I get password or user name incorrect.Can
> some one help me out
>
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Connection-with-Active-Directory-multiple-organizational-units-tp907892p907892.html
> Sent from the Drools - User mailing list archive at Nabble.com.
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 19 Jun 2010 13:38:26 -0400
> From: Mahalakshmi <mr2809 at nyu.edu>
> Subject: Re: [rules-users] [Knowledge Agent Question
> To: Rules Users List <rules-users at lists.jboss.org>
> Message-ID:
>        <AANLkTilLuK0xGcaRKmihD-VY4meA_Pg_d13hoyHmvTyy at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi,
> Thanks so much for the info.
> So then is there any way to actually add the dslr (created at runtime)
> files
> to be detected by the program??
> Because with eclipse we always need to keep refreshing the files everytime
> which totally defeats the purpose of using business rules !! Until ofcourse
> you have fixed set of rules!
> Any other ideas?
> Also is there a problem if we add multiple .dslr files to our rule base???
> When I do that only the first .dslr files actually executes and the others
> dont. I tried creating all the same files as .drl files and it works
> perfectly fine.
> Any idea why that happens??? I dont get any error stack.
>
> Please help.
>
> Thanks
> M
>
> 2010/6/19 Esteban Aliverti <esteban.aliverti at gmail.com>
>
> > If yo are using Kagent, you don't need to add the change set to kbuilder.
> > The steps you need to implement should be something like this:
> >
> > 1. Start ResourceChangeScanner and ResourceChangeMonitor services
> > 2. Create a changeset.xml file containing all the resources you want to
> add
> > to the kagent's kbase
> > 3. Create a new kagent
> > 4. kagent.applyChangeSet() <-- The agent will process each resource the
> xml
> > defines and add a monitor to detect further changes.
> > 5. kagent.getKnowledgeBase() <-- the agen't kbase will contain all the
> > rules now
> >
> > If you are looking for examples:
> >
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/agent/
> >
> > The bad new is that kagent can't manage dsl/dslr resouces yet. I'm
> working
> > on that right now. Please follow these issues to be inform:
> > https://jira.jboss.org/browse/JBRULES-2377 &
> > https://jira.jboss.org/browse/JBRULES-2350
> >
> > Best,
> >
> >
> > 2010/6/18 Fnu Mahalakshmi <FMahalakshmi at nyx.com>
> >
> >>  Hi guys,
> >>
> >>
> >>
> >> In my program I have couple of .brl, .drl and .dslr files which get
> added
> >> to the rulebase.
> >>
> >>
> >>
> >> Now my .brl files get converted to drl files and then have to be added
> to
> >> the rulebase.
> >>
> >>
> >>
> >> After creating my .drl or .dslr file I am using this code to update the
> >> resources in my change-set.xml
> >>
> >> *ResourceChangeScannerConfiguration sconf =
> >>
> ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
> >> *
> >>
> >> *sconf.setProperty( **"drools.resource.scanner.interval"**,*
> >>
> >> *                   **"30"** ); **// set the disk scanning interval to
> >> 30s, default is 60s*
> >>
> >> *ResourceFactory.getResourceChangeScannerService().configure*( sconf
> )*;*
> >>
> >> ResourceFactory.getResourceChangeNotifierService()*.*start(*);*
> >>
> >> *KnowledgeBuilder* kbuilder =
> >> KnowledgeBuilderFactory.newKnowledgeBuilder()*;*
> >>
> >> *kbuilder.add( ResourceFactory.newClassPathResource(
> **"change-set.xml"**,
> >> getClass()),ResourceType.CHANGE_SET );*
> >>
> >> *if* ( kbuilder.hasErrors() *)* *{*
> >>
> >> *   System.err.println( kbuilder.getErrors().toString() );*
> >>
> >> *}*
> >>
> >> * *
> >>
> >> *Now as per my understanding:*
> >>
> >> Since a new .drl file has been just created ? the resource notifier will
> >> update my change-set.xml file of the change.
> >>
> >>
> >>
> >> Now I need to load this new file to my rulebase along with my dsl file.
> >>
> >>
> >>
> >> *kbuilder.add( ResourceFactory.newClassPathResource(
> **"change-set.xml"**,
> >> getClass()),ResourceType.CHANGE_SET );*
> >>
> >>
> >>
> >> is adding my new created file to my knowledge pacakage.
> >>
> >> How can I specify my dsl file also to be added along with it???
> >>
> >>
> >>
> >> Can you please guide me in the right direction..??
> >>
> >> Please help.
> >>
> >>
> >>
> >> Thank you.
> >>
> >> M
> >>
> >> ------------------------------
> >>
> >> *Please consider the environment before printing this email.*
> >>
> >> *Visit our website at http://www.nyse.com
> >>
> *****************************************************************************
> >>
> >> Note: The information contained in this message and any attachment to it
> >> is privileged, confidential and protected from disclosure. If the reader
> of
> >> this message is not the intended recipient, or an employee or agent
> >> responsible for delivering this message to the intended recipient, you
> are
> >> hereby notified that any dissemination, distribution or copying of this
> >> communication is strictly prohibited. If you have received this
> >> communication in error, please notify the sender immediately by replying
> to
> >> the message, and please delete it from your system. Thank you. NYSE
> >> Euronext. *
> >>
> >>
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >>
> >>
> >
> >
> > --
> > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> >
> > Esteban Aliverti
> >
> > _______________________________________________
> > 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/20100619/9c5f98ce/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 43, Issue 117
> ********************************************
>



-- 
Amit  Bhardwaj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100620/01663d3f/attachment.html 


More information about the rules-users mailing list