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