Re: [rules-users] JBoss Rule Trace feature with 5.0
2010/9/19 Kinjal Khandhar kinjal.khand...@gmail.com Hi All, Can anybody help me with Drools Audit Log(Rule Trace) feature. import org.drools.audit.WorkingMemoryFileLogger; WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger( session ); logger.setFileName( event ); ... fireAllrules()... logger.writeToDisk(); Package org.drools.audit.event contains Filter classes; you may pass suitables instances to logger.addFilter() to reduce the volume on the log file. You should probably use an ActivationLogEventFilter permitting the creation and firing of Activations. The former will tell you which conditions were fully evaluated, and the latter which rules were fired. (A WorkingMemoryLogEventFilter permitting nothing will keep WM operations at bay.) Or, you could set up a event listener (implementorg.drools.event.rule.AgendaEventListener), and see org.drools.event.rule for the subinterfaces of ActivationEvent. This saves you the bother of processing the XML log file, and you'll get the Rule information easily enough: ((ActivationEvent)event).getActivation().getRule().getName() and ...getPackageName() Since you'll only need Sets of activations and firings, this approach may be preferable. To learn which rules were never activated, you can access the Knowledge Packages in your Knowledge Base, iterate over the rules and create a set of all rules; subtracting those from the log will give you the required information. -W My goal is to check which rule got executed,in what sequence and which conditions got evaluated and which did not. Any help/pointers greatly appreciated. Thanks in advance. Regards, Kinjal ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools quirks
1) Have a look at the examples; they return OK. You don't say much about your rules for any further help. 2) DSL would restrict what users could enter. On 18 September 2010 15:15, Matt Young so...@youngdev.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I just started using drools and this is my first time implementing a rules engine. Everything has been pretty smooth but I have some quirks that I am not sure I can live with. 1) for some reason, if I execute the Knowlege session against an object, the knowlege session never returns. The only way I can get the ksession to return is to make IF (obj == null) part of the LHS and make modify($input){setObj(complete)} part of the RHS This seems like a deficiency since I have users writing their own rules, I can see them forgetting this requirement. IS their a way to get the ksession to firerules only once? If so what does that look like? 2) It seems that any code I want can be executed in the RHS. I could literally execute something like the following in the RHS. byte[] b= new byte[10]; // Really big memory waste I also could just start a bunch of threads. The point is that I am intending to let the users write their own rules but I can't do that if there are no restrictions on how/what can be done inside the rules. Any suggestions? Are there sandboxes or filters I can activate to restrict the RHS? - -- Cheers, Matt Young so...@youngdev.net http://youngdev.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJMlMmHAAoJEO5jycTTPEzclUwQAJdLYF183A5fSo9cN0a1gkkR bRyIEgUBUZGQVZi+W7vezQMVqLtV1/+HkfDj5EdylD9fGS6/OsBzOKMCKb4IIuOe j8xgp4Z85G5JmowhWDh9AYfHMwcOJ/QSjrPm4ABs3ZQilBEeSKcYBNZ/YNX9WhVN ZMeLwx9+VJqK1Wj4Aue6zdG4XiSA+CTNL309xLgyGkoiWtnp3+wY4Q3q1WGArWti uIq0tN1xGk9mRkSGepdAjycv5mc+9BCjh6/5UqSIMsWSTqKzm6ce96YQIMgMV77m J6/ya91eTGiqXXpXsrSKJSHUFe7ExAJjjVZFzXT55FSNRBzrInCXDIyMfH6hX00E KFQyQWHi3lLRPSKnBpkBGQj1ZPB3WMBvq8Kfjjszzoa3MjmsfNy21YdrSdLUnJPC NNdBCwYmNbntRu+6fhk8D5OxlLXqAY+OcuVLjySKdBq6eA+Q20XN8+GLWwAjSD8K vc0/6HAICKzOXhpSiPEFsPSOxT/FSVBXPOmoO0fMoxjOLpEHU2G5CB6lIn8zZngQ GodDE6s9uOWLsEyxsBCp7Nb9uLNEFXVW91SsYcGQuzCrVgwPR4Dc/KUzOdYUPIaM RC1laZbdEfrhisZrHAkZDaMSzaYZO48Vb4ZpCJTqCVESdwjRbBLtTG7YNAFBKQQw BN9Qjq6IJUUJDzfawsrr =1xoA -END PGP SIGNATURE- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Flow Timer causes exception: Caused by: java.util.concurrent.RejectedExecutionException
http://drools-java-rules-engine.46999.n3.nabble.com/ http://drools-java-rules-engine.46999.n3.nabble.com/ On 18 September 2010 22:49, Aman boy1...@gmail.com wrote: Hello All, Why don't we have an community forum website like JBoss Drools forum where we can post questions/answers unlike this mailing list and if someone has to go back to old posts, how tough it gets to go thru email archives. No offence here. Thanks -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Gustavo Tenrreiro Sent: Saturday, September 18, 2010 5:37 PM To: Rules Users List Subject: [rules-users] Flow Timer causes exception: Caused by: java.util.concurrent.RejectedExecutionException Hi, I have a flow and a set of rules. In the flow I have a wait state. If the wait state has a timer, when the flow reaches the node it blows up with the following exception ( See Below ), if I remove the timer everything works. INFO 2010-09-18 16:26:28 [ERROR] com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsE ventsManager Could not commit session java.lang.RuntimeException: Could not commit session at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSes sionCommandService.java:292) at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.execute(Command BasedStatefulKnowledgeSession.java:434) at com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsE ventsManager.sendEvent(DroolsEventsManager.java:43) at com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadR eject_0.defaultConsequence(Rule_domainLeadReject_0.java:10) at com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadR eject_0DefaultConsequenceInvoker.evaluate(Rule_domainLeadReject_0DefaultCons equenceInvoker.java:34) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856) at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.j ava:785) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.j ava:751) at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeS essionImpl.java:218) at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesComm and.java:99) at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesComm and.java:33) at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSes sionCommandService.java:279) at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(Co mmandBasedStatefulKnowledgeSession.java:201) at com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCr eatedEventListener.onMessage(VoteCreatedEventListener.java:78) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer .java:854) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor .java:99) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor. java:166) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:11 7) at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java :26) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:619) Caused by: java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Thread PoolExecutor.java:1768) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767) at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThr eadPoolExecutor.java:216) at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoo lExecutor.java:379) at org.drools.time.impl.JDKTimerService.schedule(JDKTimerService.java:102) at org.drools.time.impl.JDKTimerService.scheduleJob(JDKTimerService.java:80) at org.drools.process.instance.timer.TimerManager.registerTimer(TimerManager.ja va:60) at org.drools.workflow.instance.node.StateBasedNodeInstance.internalTrigger(Sta teBasedNodeInstance.java:56) at org.drools.workflow.instance.node.CompositeNodeInstance.internalTrigger(Comp ositeNodeInstance.java:86)
[rules-users] rules priority
Hi Im using drools 5 with Guvnor 5 i set up 30 Technical rules and build a package to be used by my drools-sample application. my probelm is as followed, some rule may conflict, i want to set up a rule order and if one rule is caught then i want the drools to stop and not continue to try other rules. ive use salience but it hasnt really done the trick. example: my rules: rule Rule-01 salience 100 activation-group group1 ... System.Out.Println(caught rule 1) rule Rule-02 salience 100 activation-group group1 ... System.Out.Println(caught rule 2) rule Rule-03 activation-group group2 ... System.Out.Println(caught rule 3) rule Rule-04 activation-group group2 ... System.Out.Println(caught rule 4) actual result: lets say all 4 rules are cuaght, what i will see is as followed ACTIVATION CREATED rule:Rule-01 activationId:Rule-01 [1] declarations: BEFORE ACTIVATION FIRED caught rule 1 ACTIVATION CANCELLED rule:Rule-2 ACTIVATION CREATED rule:Rule-03 activationId:Rule-01 [1] declarations: BEFORE ACTIVATION FIRED caught rule 3 ACTIVATION CANCELLED rule:Rule-3 only one rule from each activation-group will be fired, and the first group with the higher salience will fire first. what i would like is it one rule was caught to stop trying? is it possible? Thanks, Nadav. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] calling a function from when
Hello, I need to know whether it is possible to call a function from within a when condition? I am currently trying with a simple print function just for checking but it is not working. Best Regards, Kripa This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. _ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules priority
You could consider using a guard condition e.g. rule 1 when not Solved() Your rule 1 then insert new Solved(); end rule 2 when not Solved() Your rule 2 then insert new Solved(); end If you only want one rule per group then have the grouping as a member of the guard condition. I'm not sure if you can cause the processing of activations to abort. 2010/9/20 Nadav Hashimshony nad...@gmail.com Hi Im using drools 5 with Guvnor 5 i set up 30 Technical rules and build a package to be used by my drools-sample application. my probelm is as followed, some rule may conflict, i want to set up a rule order and if one rule is caught then i want the drools to stop and not continue to try other rules. ive use salience but it hasnt really done the trick. example: my rules: rule Rule-01 salience 100 activation-group group1 ... System.Out.Println(caught rule 1) rule Rule-02 salience 100 activation-group group1 ... System.Out.Println(caught rule 2) rule Rule-03 activation-group group2 ... System.Out.Println(caught rule 3) rule Rule-04 activation-group group2 ... System.Out.Println(caught rule 4) actual result: lets say all 4 rules are cuaght, what i will see is as followed ACTIVATION CREATED rule:Rule-01 activationId:Rule-01 [1] declarations: BEFORE ACTIVATION FIRED caught rule 1 ACTIVATION CANCELLED rule:Rule-2 ACTIVATION CREATED rule:Rule-03 activationId:Rule-01 [1] declarations: BEFORE ACTIVATION FIRED caught rule 3 ACTIVATION CANCELLED rule:Rule-3 only one rule from each activation-group will be fired, and the first group with the higher salience will fire first. what i would like is it one rule was caught to stop trying? is it possible? Thanks, Nadav. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] calling a function from when
Yes, the LHS is just a block of Java (or MVEL depending on your rule dialect). Have you read Experts User Guide's section on functions? 2010/9/20 Kripa Nathwani kripa.nathw...@lntinfotech.com Hello, I need to know whether it is possible to call a function from within a “when” condition? I am currently trying with a simple print function just for checking but it is not working. Best Regards, Kripa -- This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. __ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] calling a function from when
A DRL function like this can be used on the LHS (e.g.. inside eval() ) function boolean print (){ System.out.println( print print print ); return true; } BUT, depending on where it is called and which Conditional Elements preceding it happen to match, it may get called or not. This may be the reason for your print failing to produce output. -W 2010/9/20 Kripa Nathwani kripa.nathw...@lntinfotech.com: Hello, I need to know whether it is possible to call a function from within a “when” condition? I am currently trying with a simple print function just for checking but it is not working. Best Regards, Kripa This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. __ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Schema Error with Drools spring xsd
Verifiy that you can access this XML schema without Eclipse. - Do you get the file in your browser? - Can you call xjc with this file? mkdir xxx cd xxx xjc http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd Both works for me. -W 2010/9/20 Mohod, Akash akash.mo...@morganstanley.com: Hi , I am using Drools 5.1 with Srping 3.0 . I am getting these errors working in Eclipse :- org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2541) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:2532) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1836) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:531) [na:1.6.0_19] Any help is appreciated. Regards, Akash NOTICE: If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools quirks
There is also Paul Browne's book, see https://www.packtpub.com/jboss-drools-business-rules/book Apparently it emphasizes Guvnor. Compare the (detailed) contents available for both books; you should be able to work out what's best for you. -W On 18 September 2010 21:40, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 18 September 2010 21:15, Matt Young so...@youngdev.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Wolfgang, The no-loop attribute fixed my crazy looping problem and your answer on knowing EVERYTHING the rule might ever have to do is a good answer. I guess there will be a certain amount of trust I have to place in the users. In the meantime, are there any books on drools you reccomend (other than the manual)? The standard (or only?) answer to this is: Michal Bali's book, see https://www.packtpub.com/drools-jboss-rules-5-0-developers-guide/book If you are new to Rules and Rule Based Systems, you might also profit from more general literature on RBS, even when a text is not direclty related to Drools. -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fixing the Discouraged access Eclipse warnings makes all org.drools.* import unresolved
Hi, still no help ? Sorry for asking again, but I'm new to Drools and who's working with Fusion and using SessionPseudoClock has surely already met this problem and likely found a solution/workaround. Changing the Internal rule classes setting in Eclipse-Windows-Preferences-Drools do not fix the Discourages access: ... annoying warnings, instead it makes all org.drools imports unresolved (a bug ?). I'm using Drools 5.1.1 and Eclipse Helios. Any help will be greatly appreciated. Thanks, m. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Fixing-the-Discouraged-access-Eclipse-warnings-makes-all-org-drools-import-unresolved-tp1515491p1528766.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Starting resource change scanner and notifier in drools-server.
Hi, I would like to ask for help with setting up drools-server with Guvnor. I am using version 5.1.1 of both. I am trying to set up an instance of drools-server in Tomcat that periodically loads new updates of packages published in Guvnor (both drools-server and Guvnor run in the same instance of Tomcat). My change set definition is as follows: ?xml version=1.0 encoding=UTF-8? change-set xmlns='http://drools.org/drools-5.0/change-set' xmlns:xs='http://www.w3.org/2001/XMLSchema-instance' xs:schemaLocation='http://drools.org/drools-5.0/change-set http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd' add resource source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/one of my packages/LATEST' type='PKG' basicAuthentication=enabled username=username password= / resource source=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/another of my packages/LATEST type=PKG basicAuthentication=enabled username=username password= / /add /change-set My knowledge-services.xml configuration is as follows (based on the unit test examples highlighted in http://article.gmane.org/gmane.comp.java.drools.user/20992/match=drools+spring): ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://drools.org/schema/drools-spring http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd; drools:resource-change-scanner id=s1 interval=5 / drools:execution-node id=node1 / drools:ksession id=ksession1 type=stateless kbase=kbase1 node=node1/ drools:kbase id=kbase1 node=node1 / drools:kagent id=kagent1 kbase=kbase1 drools:resources drools:resource type=CHANGE_SET source=classpath:changeset.xml / /drools:resources /drools:kagent /beans On loading drools-server, the resources listed in the change set are loaded and available. The problem is that when a new package built and published in Guvnor, drools-server does not detect this and update itself. The effect is the same as if a KnowledgeAgent were used locally and ResourceFactory.getResourceChangeNotifierService().start(); ResourceFactory.getResourceChangeScannerService().start(); were not called. This leads me to the assumption that drools-server does not start these services by default. My question is then can/how do I configure drools-server to start these services such that it will update new changes from Guvnor automatically? Thanks a lot for any help you can offer, Cheers, Graham. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Schema Error with Drools spring xsd
It's failing on the second part trying to run xjc. If I want to run this in eclipse what do I need to do ? Do I need to include some jar (jaxb or something) or do I need to run xjc on the schema first And then include those generated files in the path . Regards, Akash -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: Monday, September 20, 2010 3:53 PM To: Rules Users List Subject: Re: [rules-users] Schema Error with Drools spring xsd Verifiy that you can access this XML schema without Eclipse. - Do you get the file in your browser? - Can you call xjc with this file? mkdir xxx cd xxx xjc http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd Both works for me. -W 2010/9/20 Mohod, Akash akash.mo...@morganstanley.com: Hi , I am using Drools 5.1 with Srping 3.0 . I am getting these errors working in Eclipse :- org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2541) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:2532) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1836) [na:1.6.0_19] at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:531) [na:1.6.0_19] Any help is appreciated. Regards, Akash NOTICE: If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- NOTICE: If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Schema Error with Drools spring xsd
Hi I had a similar problem. Since the drools jars contain the xsd I tried referring to them with http://drools.org/schema/drools-spring-1.0.0.xsd;. Didn't work. Might be because spring.schemas in drools-container/drools-spring/src/main/resources/META-INF has not been updated. If I refer to drools-spring.xsd it's solved. -Evert beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:tx=http://www.springframework.org/schema/tx; xmlns:util=http://www.springframework.org/schema/util; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd; -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Schema-Error-with-Drools-spring-xsd-tp1527960p1529305.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] SAML 2.0 support ?
Hi, I try to find out how good SAML support in Jboss is. I would like to know if any of you as ever succesfully tested JBoss against a certified SAML 2.0 Identity Provider ? Thank you very much. Pierre ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Schema Error with Drools spring xsd
We do not maintain publicly accessible schemas. So take the xsds from the jar and host them somewhere locally and make the schemaLocation referenec that. Mark On 20/09/2010 15:35, Evert Penninckx wrote: Hi I had a similar problem. Since the drools jars contain the xsd I tried referring to them with http://drools.org/schema/drools-spring-1.0.0.xsd;. Didn't work. Might be because spring.schemas in drools-container/drools-spring/src/main/resources/META-INF has not been updated. If I refer to drools-spring.xsd it's solved. -Evert beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:tx=http://www.springframework.org/schema/tx; xmlns:util=http://www.springframework.org/schema/util; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd; ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow Events Not Working
Hi, The process instance should automatically be reconnected to the session (= working memory) when it is reloaded from the database. It is a little unclear however, from you stacktrace, how you get a reference to your process instance after it has been restored. Particularly: org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent (WorkflowProcessInstanceImpl.java:346) at com.my.poc.PocFlowServiceImpl.processFlow(PocFlowServiceImpl.java:120) Could you share how this PocFlowServiceImpl class gets the process instance it then tries to signal? Does it retrieve the session from the session? Or does it keep a reference from before? Kris - Original Message - From: jawa ago...@gmail.com To: rules-users@lists.jboss.org Sent: Friday, September 10, 2010 7:17 PM Subject: [rules-users] Drools Flow Events Not Working Hi, I am using drools flow 5.1.1 with JPA. I want my flow to stop at a certain point so I use an AND node with one incoming RuleGroup node and one incoming Event node. so as AND guarantees that It executes after both of the nodes are completed. So my flow stops there. Then i load the session from db and use following to raise an event on the session: StatefulKnowledgeSession session = JPAKnowledgeService.loadStatefulKnowledgeSession(9,knowledgeBase, null, environment); ProcessInstance p = session.getProcessInstance(9); System.out.println(Proc Found - + p); if (p != null p.getState()==ProcessInstance.STATE_ACTIVE) { p.signalEvent(Test, vo); } But it fails with following exception: Exception in thread main java.lang.NullPointerException at org.drools.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.getWorkflowProcess(WorkflowProcessInstanceImpl.java:185) at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:346) at com.my.poc.PocFlowServiceImpl.processFlow(PocFlowServiceImpl.java:120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69) at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73) at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72) at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_20004366.invoke(InvocationContextInterceptor_z_fillMethod_20004366.java) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88) at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_20004366.invoke(InvocationContextInterceptor_z_setup_20004366.java) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.tx.StatelessBMTInterceptor.handleInvocation(StatelessBMTInterceptor.java:106) at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68) at
[rules-users] Complete Solutions Tabu Question
Hello Drools Users. Do Solution objects need to implement equals() and hashCode() methods in order to take advantage of the completeSolutionsTabuSize configuration? I did a little digging through the code and it appears that Solution objects are being compared with their clones (implicitly that is, they are being used as map keys). AbstractTabuAcceptor:87 The documentation mentions that moves need to implement equals and hashCode, but doesn't talk about Solution needing it. Thanks in advance, Steve___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] ksession.dispose() and DroolsSpringJpaManager.dispose()
I have question on kession.dispose(), what is the best place to call this method? I have a code where in i call ksession.startProcess(someprocess, mapParam); ksession.fireAllRules(); finally{ ksession.dispose(); } If i invoke the kession.dispose() like the above, I always ended up in No value bound to the key - Transaction exception. My understanding is that all the calls to drools should be enclosed in a transactional unit. I have done that so. My observation is that DroolsSpringJpaManager.dispose() method is being invoked due to my call to ksession.dispose() after the transaction has begun from my app code and right before the transaction.aftercompletioncommit() call. I can see a line of code in DroolsJpaManager.dispose() method, TransactionSynchronizationManager.unbindResource(this.emf) // entityManagerFactory reference borrowed from application code. My question is that why the above line of code is necessary in dispose() method since this.emf is the reference obtained from Application code jpa manager, since this method unbinded this resource, transaction initiated from the application code is also trying to unbind the same resource once everything is completed results to No value found for this key exception. When i comment out ksession.dispose() call from my app code, it works fine. At this point, i am not sure when to invoke ksession.dispose() call and why the TransactionSynchronizationManager.unbindResource(this.emf) being made in DroolsSpringJpaManager.dispose() on a reference obtained from JpaTransactionManager ? -drooRam -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/ksession-dispose-and-DroolsSpringJpaManager-dispose-tp1531549p1531549.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users