Re: [rules-users] Reg: ACTION cell in decision table
Make sure that the top row entries in the preceding condition columns are syntactically correct. Watch out for unbalanced parentheses. If you don't find it, you'll have to show us the spreadsheet, reduced but still producing your problem. -W On 23/01/2012, srikanth_sunny sunny8...@gmail.com wrote: Hi, The last column in my decision table is an ACTION column, And I'm using java utility method to execute some code. But when I'm trying to run the application I'm getting the Predicate: javaclass.doSomething() must be a Boolean expression. Please help me out. Thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/Reg-ACTION-cell-in-decision-table-tp3681062p3681062.html Sent from the Drools: User forum 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reg: ACTION cell in decision table
Hi Laune, Thank you very much for the reply, After your comment i cross checked the decision table and i think i have MyUtilityClass.doSomething(fact, $param) instead of MyUtilityClass.doSomething(fact,$param); where i think i missed the semi-column at the end. After i added it now I am getting the error as stack trace shown below: Exception in thread main java.lang.IndexOutOfBoundsException: Error trying to access field at position 0 at org.drools.factmodel.ClassDefinition.getField(ClassDefinition.java:164) at org.drools.rule.builder.PatternBuilder.processPositional(PatternBuilder.java:424) at org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:384) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:305) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:129) at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65) at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:81) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1981) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:792) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:354) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:585) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:34) at com.sample.drools.Test.main(Test.java:35) Please Let me know whether i am still missing any thing -- View this message in context: http://drools.46999.n3.nabble.com/Reg-ACTION-cell-in-decision-table-tp3681062p3681334.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reg: ACTION cell in decision table
Wolfgang wrote If you don't find it, you'll have to show us the spreadsheet, reduced but still producing your problem. On 23 January 2012 09:15, srikanth_sunny sunny8...@gmail.com wrote: Hi Laune, Thank you very much for the reply, After your comment i cross checked the decision table and i think i have MyUtilityClass.doSomething(fact, $param) instead of MyUtilityClass.doSomething(fact,$param); where i think i missed the semi-column at the end. After i added it now I am getting the error as stack trace shown below: Exception in thread main java.lang.IndexOutOfBoundsException: Error trying to access field at position 0 at org.drools.factmodel.ClassDefinition.getField(ClassDefinition.java:164) at org.drools.rule.builder.PatternBuilder.processPositional(PatternBuilder.java:424) at org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:384) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:305) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:129) at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65) at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:81) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1981) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:792) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:354) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:585) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:34) at com.sample.drools.Test.main(Test.java:35) Please Let me know whether i am still missing any thing -- View this message in context: http://drools.46999.n3.nabble.com/Reg-ACTION-cell-in-decision-table-tp3681062p3681334.html Sent from the Drools: User forum 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reg: ACTION cell in decision table
On 23/01/2012, Michael Anstis michael.ans...@gmail.com wrote: Wolfgang wrote If you don't find it, you'll have to show us the spreadsheet, reduced but still producing your problem. Indeed. And the new stack trace confirms my suspicion. (The semicolon is OK, keep it.) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reg: ACTION cell in decision table
http://drools.46999.n3.nabble.com/file/n3681430/test.xls test.xls Hi, Please find my attached spread sheet -- View this message in context: http://drools.46999.n3.nabble.com/Reg-ACTION-cell-in-decision-table-tp3681062p3681430.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reg: ACTION cell in decision table
Do not span the pattern across CONDITION and ACTION columns (row 8). Make sure to read the documentation as to what may be written below CONDITION and ACTION, respectively. -W On 23/01/2012, srikanth_sunny sunny8...@gmail.com wrote: http://drools.46999.n3.nabble.com/file/n3681430/test.xls test.xls Hi, Please find my attached spread sheet -- View this message in context: http://drools.46999.n3.nabble.com/Reg-ACTION-cell-in-decision-table-tp3681062p3681430.html Sent from the Drools: User forum 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools flow - how to crate a human task form?
Hi salaboy, I want to change the css properties of the ftl files generated by Guvnor( I'm using JBPM 5.2 installer s/w). Is there any way to change the css properties of ftl files generated by Guvnor Oryx designer? And also i want to know the folder location (in jbpm 5.2 installer software) where these ftl files are stored by Guvnor when we click on Generate Task Form Template link in the Guvnor-Oryx Designer. please suggest me if there any way to modify the ftl files and its css properties. Thanks yoganand -- View this message in context: http://drools.46999.n3.nabble.com/drools-flow-how-to-crate-a-human-task-form-tp2424123p3681490.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reg: ACTION cell in decision table
Hi laune, Thank you very much, It worked. -- View this message in context: http://drools.46999.n3.nabble.com/Reg-ACTION-cell-in-decision-table-tp3681062p3681680.html Sent from the Drools: User forum 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] Which version of Guvnor is compatible with Websphere Application Server 6.1 ???
I can't able deploy guvnor 5.1 in WAS 6.1. getting lots of error. can u please let me khon which version of guvnor is most compatible with WAS 6.1??? Erros: [1/23/12 18:51:26:015 IST] 0022 WebAppE [Servlet Error]-[/index.jsp]: java.lang.NullPointerException at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:39) at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:226) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:285) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) -- View this message in context: http://drools.46999.n3.nabble.com/Which-version-of-Guvnor-is-compatible-with-Websphere-Application-Server-6-1-tp3681797p3681797.html Sent from the Drools: User forum 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] DSL translation handing - what is the most stable version?
I've built rules using DSL's before and with 5.3 I am seeing Eclipse hang intermitently during builds. I've seen this in previous versions of DROOLS so wondered what/where is the most stable version of DROOLS? I downloaded, but have not yet installed the product version (this is for a lartge US firm, so buying the product is feasible). They could not accept needing to kill off processes when they build. The schedule is VERY tight so I am asking this question while I install the product version (5.2). The rules, XOM, and DSL are simple, so I think the parser is intermitently generating some infinitely deep tree during builds. -- View this message in context: http://drools.46999.n3.nabble.com/DSL-translation-handing-what-is-the-most-stable-version-tp3681932p3681932.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Code Coverage
Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction It is very useful however in showing a way to test rules individually. Thank you Mike 2012/1/17 Toni Rikkola toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. Test Scenarios get all the rule names for the rules in one package and then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html . Toni On Jan 16, 2012, at 5:49 PM, mike wrote: Hi there, I was wondering if its possible to measure code coverage on test running against a set of rules. Thank you Mike ___ 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Code Coverage
It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to 'tick' rules off when they have been triggered - the blog entry should have you achieve this. If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of mike Sent: 23 January 2012 14:34 To: Rules Users List Subject: Re: [rules-users] Code Coverage Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction It is very useful however in showing a way to test rules individually. Thank you Mike 2012/1/17 Toni Rikkola toni.rikk...@gmail.commailto:toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. Test Scenarios get all the rule names for the rules in one package and then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html. Toni On Jan 16, 2012, at 5:49 PM, mike wrote: Hi there, I was wondering if its possible to measure code coverage on test running against a set of rules. Thank you Mike ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Code Coverage
Thank you very much Thomas ... yes, what i need is standard code coverage ... my company is all over that metric cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to ‘tick’ rules off when they have been triggered – the blog entry should have you achieve this. ** ** If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 14:34 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction ** ** It is very useful however in showing a way to test rules individually. ** ** Thank you Mike ** ** 2012/1/17 Toni Rikkola toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. ** ** Test Scenarios get all the rule names for the rules in one package and then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html . ** ** Toni ** ** On Jan 16, 2012, at 5:49 PM, mike wrote: ** ** Hi there, ** ** I was wondering if its possible to measure code coverage on test running against a set of rules. ** ** Thank you Mike ___ 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 ** ** -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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] Code Coverage
It is highly recommended as best practice to have RHS code that doesn't contain any branching instructions. Then, executing means full coverage. In case it is necessary to have more complex code I'd not put it into a RHS anyway (where it isn't really OO any more) but I'd code it in Java files and just call from the RHS. For the LHS you can also argue that firing proves coverage; although it won't be full *expression* logic coverage, due to potentially skipped subexpressions in disjunctions. -W On 23/01/2012, mike mike...@gmail.com wrote: Thank you very much Thomas ... yes, what i need is standard code coverage ... my company is all over that metric cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to ‘tick’ rules off when they have been triggered – the blog entry should have you achieve this. ** ** If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 14:34 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction ** ** It is very useful however in showing a way to test rules individually. ** ** Thank you Mike ** ** 2012/1/17 Toni Rikkola toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. ** ** Test Scenarios get all the rule names for the rules in one package and then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html . ** ** Toni ** ** On Jan 16, 2012, at 5:49 PM, mike wrote: ** ** Hi there, ** ** I was wondering if its possible to measure code coverage on test running against a set of rules. ** ** Thank you Mike ___ 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 ** ** -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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] Code Coverage
I could argue this left and right with my managers ... but in reality when we mention code coverage we mean looking at a report in CI showing lines of code in green or red ... anything short of that is something else Thank you very much for the response Cheers Mike On Mon, Jan 23, 2012 at 10:47 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: It is highly recommended as best practice to have RHS code that doesn't contain any branching instructions. Then, executing means full coverage. In case it is necessary to have more complex code I'd not put it into a RHS anyway (where it isn't really OO any more) but I'd code it in Java files and just call from the RHS. For the LHS you can also argue that firing proves coverage; although it won't be full *expression* logic coverage, due to potentially skipped subexpressions in disjunctions. -W On 23/01/2012, mike mike...@gmail.com wrote: Thank you very much Thomas ... yes, what i need is standard code coverage ... my company is all over that metric cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to ‘tick’ rules off when they have been triggered – the blog entry should have you achieve this. ** ** If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 14:34 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction ** ** It is very useful however in showing a way to test rules individually. ** ** Thank you Mike ** ** 2012/1/17 Toni Rikkola toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. ** ** Test Scenarios get all the rule names for the rules in one package and then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html . ** ** Toni ** ** On Jan 16, 2012, at 5:49 PM, mike wrote: ** ** Hi there, ** ** I was wondering if its possible to measure code coverage on test running against a set of rules. ** ** Thank you Mike ___ 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 ** ** -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Code Coverage
There is nothing stopping you taking the output and producing a report in your CI showing lines (Rules) in red and green as to whether they have been touched as part of the tests - if you separate out your rules into a separate module you could probably output the report in the exact same format as the standard java report xml and get the standard tools to output an almost identical report. Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of mike Sent: 23 January 2012 16:14 To: Rules Users List Subject: Re: [rules-users] Code Coverage I could argue this left and right with my managers ... but in reality when we mention code coverage we mean looking at a report in CI showing lines of code in green or red ... anything short of that is something else Thank you very much for the response Cheers Mike On Mon, Jan 23, 2012 at 10:47 AM, Wolfgang Laun wolfgang.l...@gmail.commailto:wolfgang.l...@gmail.com wrote: It is highly recommended as best practice to have RHS code that doesn't contain any branching instructions. Then, executing means full coverage. In case it is necessary to have more complex code I'd not put it into a RHS anyway (where it isn't really OO any more) but I'd code it in Java files and just call from the RHS. For the LHS you can also argue that firing proves coverage; although it won't be full *expression* logic coverage, due to potentially skipped subexpressions in disjunctions. -W On 23/01/2012, mike mike...@gmail.commailto:mike...@gmail.com wrote: Thank you very much Thomas ... yes, what i need is standard code coverage ... my company is all over that metric cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.commailto:tswinde...@nds.com It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to 'tick' rules off when they have been triggered - the blog entry should have you achieve this. ** ** If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 14:34 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction ** ** It is very useful however in showing a way to test rules individually. ** ** Thank you Mike ** ** 2012/1/17 Toni Rikkola toni.rikk...@gmail.commailto:toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. ** ** Test Scenarios get all the rule names for the rules in one package and then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html . ** ** Toni ** ** On Jan 16, 2012, at 5:49 PM, mike wrote: ** ** Hi there, ** ** I was wondering if its possible to measure code coverage on test running against a set of rules. ** ** Thank you Mike ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** ** ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** ** -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.commailto:postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list
Re: [rules-users] Code Coverage
I was wondering if there was any blog post or tutorial on how to set that up in jenkins or teamcity or things like that ... it's not a trivial thing to do ... also, based on the responses here, doesn't seem like a common practice I don't know enough to figure out how to set it up ... as far as i know i need to instrument the code ... now, the code, would be whatever drools generates ... i don't know how to pickup the package that drools generates n' them how to instrument it thank you very much four your time and answers cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com There is nothing stopping you taking the output and producing a report in your CI showing lines (Rules) in red and green as to whether they have been touched as part of the tests – if you separate out your rules into a separate module you could probably output the report in the exact same format as the standard java report xml and get the standard tools to output an almost identical report. ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 16:14 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** I could argue this left and right with my managers ... but in reality when we mention code coverage we mean looking at a report in CI showing lines of code in green or red ... anything short of that is something else ** ** Thank you very much for the response Cheers Mike On Mon, Jan 23, 2012 at 10:47 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: It is highly recommended as best practice to have RHS code that doesn't contain any branching instructions. Then, executing means full coverage. In case it is necessary to have more complex code I'd not put it into a RHS anyway (where it isn't really OO any more) but I'd code it in Java files and just call from the RHS. For the LHS you can also argue that firing proves coverage; although it won't be full *expression* logic coverage, due to potentially skipped subexpressions in disjunctions. -W On 23/01/2012, mike mike...@gmail.com wrote: Thank you very much Thomas ... yes, what i need is standard code coverage ... my company is all over that metric cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to ‘tick’ rules off when they have been triggered – the blog entry should have you achieve this. ** ** If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 14:34 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction ** ** It is very useful however in showing a way to test rules individually. ** ** Thank you Mike ** ** 2012/1/17 Toni Rikkola toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. ** ** Test Scenarios get all the rule names for the rules in one package and* *** then compares that list to the rules that fired. Edson's blog entry might help you http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html . ** ** Toni ** ** On Jan 16, 2012, at 5:49 PM, mike wrote: ** ** Hi there, ** ** I was wondering if its possible to measure code coverage on test running against a set of rules. ** ** Thank you Mike ___ 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 ** ** -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the
Re: [rules-users] Code Coverage
Awesome!! thank you very much ... this give me enough ammo for this battle :) Cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com I don’t think anybody else has bothered to do this. Drools generates the classes in memory and they aren’t written on disk – this makes linking with the standard instrumentation methods extremely hard if not impossible. You may be able to hook into the classloader and/or class creation code to pass the bytecode through the instrumentation library if this is really needed, but if you tell your manager the cost of doing this they may be happy with the alternatives proposed – or just not doing coverage on code. ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 16:25 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** I was wondering if there was any blog post or tutorial on how to set that up in jenkins or teamcity or things like that ... it's not a trivial thing to do ... also, based on the responses here, doesn't seem like a common practice ** ** I don't know enough to figure out how to set it up ... as far as i know i need to instrument the code ... now, the code, would be whatever drools generates ... i don't know how to pickup the package that drools generates n' them how to instrument it ** ** thank you very much four your time and answers cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com There is nothing stopping you taking the output and producing a report in your CI showing lines (Rules) in red and green as to whether they have been touched as part of the tests – if you separate out your rules into a separate module you could probably output the report in the exact same format as the standard java report xml and get the standard tools to output an almost identical report. Thomas *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 16:14 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage I could argue this left and right with my managers ... but in reality when we mention code coverage we mean looking at a report in CI showing lines of code in green or red ... anything short of that is something else Thank you very much for the response Cheers Mike On Mon, Jan 23, 2012 at 10:47 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: It is highly recommended as best practice to have RHS code that doesn't contain any branching instructions. Then, executing means full coverage. In case it is necessary to have more complex code I'd not put it into a RHS anyway (where it isn't really OO any more) but I'd code it in Java files and just call from the RHS. For the LHS you can also argue that firing proves coverage; although it won't be full *expression* logic coverage, due to potentially skipped subexpressions in disjunctions. -W On 23/01/2012, mike mike...@gmail.com wrote: Thank you very much Thomas ... yes, what i need is standard code coverage ... my company is all over that metric cheers Mike 2012/1/23 Swindells, Thomas tswinde...@nds.com It depends what you are asking for, If you just want to know what proportion of rules you have written have actually activated then that can be simply achieved by having a AgendaEventListener and using it to ‘tick’ rules off when they have been triggered – the blog entry should have you achieve this. ** ** If you actually want to integrate it with standard java code coverage reports then this is a different question and is likely to be much harder, if not impossible, ** ** Thomas ** ** *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *mike *Sent:* 23 January 2012 14:34 *To:* Rules Users List *Subject:* Re: [rules-users] Code Coverage ** ** Thank you very much ... as far as i know in order to do code coverage i need to instrument the packages i'm interested in covering ... this recommendation doesn't take me in that direction ** ** It is very useful however in showing a way to test rules individually. ** ** Thank you Mike ** ** 2012/1/17 Toni Rikkola toni.rikk...@gmail.com You need to write the coverage tests for JUnit yourself. Test Scenarios in Guvnor do this, but you can't use them outside Guvnor. ** ** Test Scenarios get all the rule names for the rules in one package and* *** then compares that list to the rules that fired. Edson's blog entry might help you
[rules-users] jBPM 5.2 and Drools 5.3
I am working with jBPM for the first time since it was rewritten based on Drools flow. I have a set up rules(separated with rule rule flow groups), which need to be executed at different part of a process. If I just start the process as such(with parameters) ProcessInstance processInstance = this.session.startProcess( com.sample.process, vars); My rules are ignored. The only thing I can do is insert the objects into session then do the following: ProcessInstance processInstance = this.session.startProcess( com.nasdaq.billing.core, vars); session.fireAllRules(); Is this the correct way to handle this or am I missing something(the documentation is lacking in this area). -- View this message in context: http://drools.46999.n3.nabble.com/jBPM-5-2-and-Drools-5-3-tp3682896p3682896.html Sent from the Drools: User forum 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] changeset schema error
I have some issues using changeset... *Test - 1* 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 drools-change-set-5.0.xsd' add resource source='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set when i use the above changeset (thanks to user forum)...the program works fine no issues but i got the following warning messages... (null: 1, 201): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 201): cvc-elt.1: Cannot find the declaration of element 'change-set'. (null: 1, 207): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 285): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 374): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 446): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 534): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. *Question: how to get rid of this? I completely google the web including user forum no answer.If it is available in the forum, my apologies for missing that info...some one could forward me to that info location.* *Test - 2* 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='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set when i use the above changeset (grepcode drools-compiler 5.2.1 Final)...after 1 minute it gives the following error message and the thread is open for ever...nothing happen. INFO: KnowledgeDefinitionBuilder: changeset == 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='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set (null: 1, 285): schema_reference.4: Failed to read schema document 'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-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. (null: 1, 285): cvc-elt.1: Cannot find the declaration of element 'change-set'. *Question: I copied the schemaLocation from the src, why it is not working? please advise me?* - with kind regards, -- View this message in context: http://drools.46999.n3.nabble.com/changeset-schema-error-tp3682951p3682951.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] changeset schema error
Test 1 will not work because the xs:schemaLocation does not point to valid location for the schema. You can work around this by configuring an XML Catalog in your IDE so it treats drools-change-set-5.0.xsd as an alias. Checkout the widely available xs:schemaLocation documentation for details of its syntax. Test 2 *should* be OK. The referenced schema does exist and is valid. guvnor-examples uses the exact same and works well (or at least for me!) Can you provide a self-contained unit test to replicate the issue? On 23 January 2012 20:43, domingo sprabak...@gmail.com wrote: I have some issues using changeset... *Test - 1* 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 drools-change-set-5.0.xsd' add resource source='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set when i use the above changeset (thanks to user forum)...the program works fine no issues but i got the following warning messages... (null: 1, 201): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 201): cvc-elt.1: Cannot find the declaration of element 'change-set'. (null: 1, 207): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 285): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 374): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 446): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 534): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. *Question: how to get rid of this? I completely google the web including user forum no answer.If it is available in the forum, my apologies for missing that info...some one could forward me to that info location.* *Test - 2* 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='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set when i use the above changeset (grepcode drools-compiler 5.2.1 Final)...after 1 minute it gives the following error message and the thread is open for ever...nothing happen. INFO: KnowledgeDefinitionBuilder: changeset == 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='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set (null: 1, 285): schema_reference.4: Failed to read schema document ' http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-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. (null: 1, 285): cvc-elt.1: Cannot find the declaration of element 'change-set'. *Question: I copied the schemaLocation from the src, why it is not working? please advise me?* - with kind regards, -- View this message in context: http://drools.46999.n3.nabble.com/changeset-schema-error-tp3682951p3682951.html Sent from the Drools: User forum 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] NPE for any @role( event )
I am using Drools version 5.4.0.Beta1. My rules are defined in a drl file. I cannot get a type with @role(event) to run correctly. In every case I've tried, I get the following error at runtime: - java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56) at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:80) at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:65) at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:740) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:286) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:122) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:52) at test.DroolsTest.main(DroolsTest.java:62) Looking at the source: ReteooFactHandleFactory.java:56: if ( type.getTimestampExtractor() != null ) { type is null, hence the NPE. Tracing through in Eclipse, I find that in ReteooFactHandleFactory.java, on line 54, is the following: TypeDeclaration type = conf.getTypeDeclaration(); getTypeDeclaration() returns null. Stepped in, goes to AbstractRuleBase.java:745: public TypeDeclaration getTypeDeclaration( Class ? clazz ) { TypeDeclaration typeDeclaration = this.classTypeDeclaration.get( clazz ); if ( typeDeclaration == null ) { // check super classes and keep a score of how up in the hierarchy is there a declaration TypeDeclarationCandidate candidate = checkSuperClasses( clazz ); // now check interfaces candidate = checkInterfaces( clazz, candidate, 1 ); if ( candidate != null ) { typeDeclaration = candidate.candidate; } } return typeDeclaration; } On line 746, TypeDeclaration typeDeclaration = this.classTypeDeclaration.get( clazz ); this.classTypeDeclaration is type MapClasslt; ? , TypeDeclaration. Map is empty (size = 0), so the get() returns null. checkSuperClasses() and checkInterfaces() also attempt to retrieve a TypeDeclaration from this same (empty) map. So, a null typeDeclaration is returned. Checking classTypeDeclaration references, the put() occurs in AbstractRuleBase.addPackages() (AbstractRuleBase.java:476), and in AbstractRuleBase.populateTypeDeclarationMaps() (AbstractRuleBase.java:336). The latter is not called before the NPE. Execution in addPackages() do not get to the classTypeDeclaration.put() because newPkg.getTypeDeclarations() is empty. So, apparently, the TypeDeclaration is never put into the Map. Attached is the minimal testcase that exhibits the same behavior. http://drools.46999.n3.nabble.com/file/n3683063/TestRules.zip TestRules.zip -- View this message in context: http://drools.46999.n3.nabble.com/NPE-for-any-role-event-tp3683063p3683063.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] proxy config for change-set schema fetch?
I have found a work-around for this problem, thought I would share it in case anyone else runs into it. It does appear to be caused by our proxy server and we could find no way to correctly pass credentials to get around it. I did find that schema validation for the changeset.xsd could be turned off by setting the following system property: drools.schema.validating=false -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-proxy-config-for-change-set-schema-fetch-tp2952812p3683482.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] changeset schema error
On 23/01/2012, domingo sprabak...@gmail.com wrote: I have some issues using changeset... *Test - 1* 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 drools-change-set-5.0.xsd' add resource source='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set I assume you don't have a local copy of the change set XML schema. You might consider getting the .xsd and keep it in your file system and then: xs:schemaLocation='/where/it/is/drools-change-set-5.0.xsd' when i use the above changeset (thanks to user forum)...the program works fine no issues but i got the following warning messages... (null: 1, 201): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 201): cvc-elt.1: Cannot find the declaration of element 'change-set'. (null: 1, 207): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 285): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 374): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 446): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. (null: 1, 534): schema_reference.4: Failed to read schema document 'drools-change-set-5.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. *Question: how to get rid of this? I completely google the web including user forum no answer.If it is available in the forum, my apologies for missing that info...some one could forward me to that info location.* *Test - 2* 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='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set when i use the above changeset (grepcode drools-compiler 5.2.1 Final)...after 1 minute it gives the following error message and the thread is open for ever...nothing happen. I don't have 5.2.1, but my test program using change-set like this runs using 5.3.0. (It fails with 5.2.0.) Consider upgrading. -W INFO: KnowledgeDefinitionBuilder: changeset == 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='classpath:dir1/dir2/filename.drl' type='DRL' / /add /change-set (null: 1, 285): schema_reference.4: Failed to read schema document 'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-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. (null: 1, 285): cvc-elt.1: Cannot find the declaration of element 'change-set'. *Question: I copied the schemaLocation from the src, why it is not working? please advise me?* - with kind regards, -- View this message in context: http://drools.46999.n3.nabble.com/changeset-schema-error-tp3682951p3682951.html Sent from the Drools: User forum 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users