[rules-users] issue with date comparison
Hi, I've a fact which is retrieved from database using hibernate. The date format that comes in is -mm-dd, java.util.Date. The fact has two variables *startDate* and *endDate. *I want to check if the the *current date* lies between these two. Since the current date is not constant I'm trying to use a global variable, which I would setbefore firing the rules. My question is what should be the datatype of this global variable. If I use Date the format is completely different. If I use String it says that date can't be compared with string. However if I hard code the value of current date in *dd-MMM-* rule fire fine. Can someone please suggest me a way to achieve this. Thanks in advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] unable to build expression for 'constraint' null': java.lang.NullPointerException with bpmn processes
Thanks for the responseYes... I did upload the model jar... On Tue, Jun 12, 2012 at 1:38 AM, Esteban Aliverti esteban.alive...@gmail.com wrote: Did you upload into Guvnor the jar where all the classes you are using in your processes are? Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Mon, Jun 11, 2012 at 9:17 PM, sumatheja sumath...@gmail.com wrote: Hi All, I've a set of bmpn2 processes. When I try to compile them locally, its compiles fine. But when I upload them to the Guvnor and try to build the package, I get the below mentioned error for *each and every process*. *unable to build expression for 'constraint' null': java.lang.NullPointerException* I tried validating each process using the jbpm designer and they show no errors. Can someone help me with this. Thanks in advance. -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] unable to build expression for 'constraint' null': java.lang.NullPointerException with bpmn processes
Thanks for the response.. I found that there was no condition for a branchout in the split condition and when I fixed it everything was fine. I have no idea how it is successfully compiling locally with this error. On Tue, Jun 12, 2012 at 8:34 AM, sumatheja sumath...@gmail.com wrote: Thanks for the responseYes... I did upload the model jar... On Tue, Jun 12, 2012 at 1:38 AM, Esteban Aliverti esteban.alive...@gmail.com wrote: Did you upload into Guvnor the jar where all the classes you are using in your processes are? Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Mon, Jun 11, 2012 at 9:17 PM, sumatheja sumath...@gmail.com wrote: Hi All, I've a set of bmpn2 processes. When I try to compile them locally, its compiles fine. But when I upload them to the Guvnor and try to build the package, I get the below mentioned error for *each and every process*. *unable to build expression for 'constraint' null': java.lang.NullPointerException* I tried validating each process using the jbpm designer and they show no errors. Can someone help me with this. Thanks in advance. -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how to use only updated value in drools
String b should be compare using 10 try with this On Tue, May 29, 2012 at 12:19 PM, bharadwaj2012 bharadwaj2...@gmail.comwrote: second rule condition is wrong b is a string it seems to be. then it should be e : Person(b != 10) -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-how-to-use-only-updated-value-in-drools-tp4017628p4017640.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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how to use only updated value in drools
Are you sure the first rule is fired? I tried out a similar program locally and it works fine. If the first rule is fired and you are updating the fact in the consequence of first rule, then certainly the second rule wont be fired. On Tue, May 29, 2012 at 12:23 PM, learner anandbabu6...@yahoo.com wrote: Modifying the condition does not fix the issue It seems even though the value of b was modified to 10 in the first rule. It considers b as only blank (initial value) in the When clause of second rule.However in sysout the value of b appears properly as 10 -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-how-to-use-only-updated-value-in-drools-tp4017628p4017641.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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] KnowledgeAgent exception while migrating from 5.4 CR1 to 5.4 final
:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.1.Final.jar:3.1.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31] Caused by: java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) [rt.jar:1.6.0_31] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) [rt.jar:1.6.0_31] at java.net.SocketOutputStream.write(SocketOutputStream.java:136) [rt.jar:1.6.0_31] at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:724) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:449) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:748) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:559) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.Response.doWrite(Response.java:594) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:398) [jbossweb-7.0.13.Final.jar:] ... 32 more However, when I replace the drools-core-5.4 final jar with drools-core-5.4-CR1 jar (just the one jar, leaving the remaining jars as it is) everything works fine again. Any idea If I'm missing something here? I'm using 1 Drools-guvnor 5.4 final 2 Drools Expert 5.4 Final 3 jbpm 5.3 final Any help is much appreciated.Thanks in Advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] KnowledgeAgent exception while migrating from 5.4 CR1 to 5.4 final
Thanks Michael... Thats fixed the issue... Didn't get the idea to try it once before posting. Thanks for your time On Tue, May 22, 2012 at 5:26 PM, Michael Anstis michael.ans...@gmail.comwrote: If your package in Guvnor was compiled before 5.4.0.Final you should try re-compiling it again first. Drools Expert had a big change to the serialization\de-serialization mechanism and, AFAIK, it is not backwardly compatible. This is worth trying before anything else. On 22 May 2012 17:21, sumatheja sumath...@gmail.com wrote: Hi, I've a drools application running on drools 5.4 cr1. It was working fine until I migrated to 5.4 final. Now When I try to get the StatefulKnowledgeSession from the Guvnor(5.4 final) I get the following exception 17:04:55,763 ERROR [stderr] (http--127.0.0.1-8380-2) java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage 17:04:55,767 ERROR [stderr] (http--127.0.0.1-8380-2) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:776) 17:04:55,771 ERROR [stderr] (http--127.0.0.1-8380-2) at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:955) 17:04:55,774 ERROR [stderr] (http--127.0.0.1-8380-2) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:675) 17:04:55,778 ERROR [stderr] (http--127.0.0.1-8380-2) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203) 17:04:55,781 ERROR [stderr] (http--127.0.0.1-8380-2) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182) 17:04:55,784 ERROR [stderr] (http--127.0.0.1-8380-2) at mattelli.re.ComplianceEngine.readKnowledgeBase(ComplianceEngine.java:2393) 17:04:55,787 ERROR [stderr] (http--127.0.0.1-8380-2) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:133) 17:04:55,790 ERROR [stderr] (http--127.0.0.1-8380-2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 17:04:55,792 ERROR [stderr] (http--127.0.0.1-8380-2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 17:04:55,795 ERROR [stderr] (http--127.0.0.1-8380-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 17:04:55,798 ERROR [stderr] (http--127.0.0.1-8380-2) at java.lang.reflect.Method.invoke(Method.java:597) 17:04:55,801 ERROR [stderr] (http--127.0.0.1-8380-2) at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111) 17:04:55,805 ERROR [stderr] (http--127.0.0.1-8380-2) at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181) 17:04:55,808 ERROR [stderr] (http--127.0.0.1-8380-2) at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127) 17:04:55,811 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) 17:04:55,815 ERROR [stderr] (http--127.0.0.1-8380-2) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 17:04:55,818 ERROR [stderr] (http--127.0.0.1-8380-2) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 17:04:55,821 ERROR [stderr] (http--127.0.0.1-8380-2) at java.util.concurrent.FutureTask.run(FutureTask.java:138) 17:04:55,823 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) 17:04:55,826 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) 17:04:55,830 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) 17:04:55,833 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) 17:04:55,836 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) 17:04:55,839 ERROR [stderr] (http--127.0.0.1-8380-2) at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91) 17:04:55,842 ERROR [stderr] (http--127.0.0.1-8380-2) at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169) 17:04:55,845 ERROR [stderr] (http--127.0.0.1-8380-2) at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87) 17:04:55,848 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) 17:04:55,851 ERROR [stderr] (http--127.0.0.1-8380-2) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost
[rules-users] how to loop back in bpmn process
Hi All, I'm trying to write a flow which will loop back (go back to particular node on a condition and start executing nodes from there) on passing a certain validation. I'm confused on how exactly to achieve this. I'm using an OR gateway to split and using XOR to join them back. But the problem is XOR expects always atleast one branch to be true which is not necessarily true here and, if I use AND both should be true which again is not valid here. Can someone suggest a way to achieve this behaviour. Thanks in advance. -- cheers Sumatheja Dasararaju attachment: loopback.png___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Issue while comparing BigDecimal and Long(only while using references)
Hi, I cam to know that we can compare BigDecimal, Long, Integer interchangeably in the LHS of rule like *when Message(Decimalstatus == Longstatus)* I found that this rule will fire as long as both Decimalstatus and Longstatus Values are same. But when I try to use this feature in the below mentioned way *when Message($dec:Decimalstatus) Message(longstatus == $dec)* This rule doesn't fire even though I have two Message object which satisfy the condition.However, when I try * when Message($dec:Decimalstatus) Message(longstatus == $dec.longValue())* It fires properly. Is this an issue or am I missing anything? Any suggestions for better approach are welcome.Thanks in advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Problem importing bpmn process into oryx designer
Hi, I've created a simple bpmn flow which has a start noden rule-flow task and end. When I try to import it from oryx designer and validate it it gives an error saying cannot find process image. Can anyone help me know what I'm missing. -- cheers Sumatheja Dasararaju sample.bpmn Description: Binary data ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem importing bpmn process into oryx designer
Thanks for the response. I've another doubt, can you let me know how to check the logic thats implemeted in an OR gate in the flow.In my case I'm using the name field in a Manufacturer fact to redirect the flow. I'm unable to find it in the properties tab in the designer. On Fri, May 11, 2012 at 4:20 PM, Tihomir Surdilovic tsurd...@redhat.comwrote: Hi, you could consider it a warning. Designer when validating checks Guvnor to see if there is a process image already available for your process. If there is not, it raises that warning. In the Designer you can generate the process image by clicking on the PNG button on the footer bar. Once you have generated your process image and re-validate this warning should no longer be there. Hope this helps. Tihomir On 5/11/12 10:45 AM, sumatheja wrote: Hi, I've created a simple bpmn flow which has a start noden rule-flow task and end. When I try to import it from oryx designer and validate it it gives an error saying cannot find process image. Can anyone help me know what I'm missing. -- cheers Sumatheja Dasararaju ___ rules-users mailing listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem importing bpmn process into oryx designer
Again Thanks a lot for the info. But for your response would have been stuck for a long time. :) On Fri, May 11, 2012 at 4:34 PM, Tihomir Surdilovic tsurd...@redhat.comwrote: The conditional expression attributes are actually part of the sequence flows that are coming out of the gateway, and not the gatewat itself. Click on the sequence flows and you will be able to set the logic there. The Eclipse plugin does this somewhat different in that the conditional expressions are part of the gateway itself...just notice this small difference between the editors. Thanks. Tihomir On 5/11/12 11:30 AM, sumatheja wrote: Thanks for the response. I've another doubt, can you let me know how to check the logic thats implemeted in an OR gate in the flow.In my case I'm using the name field in a Manufacturer fact to redirect the flow. I'm unable to find it in the properties tab in the designer. On Fri, May 11, 2012 at 4:20 PM, Tihomir Surdilovic tsurd...@redhat.comwrote: Hi, you could consider it a warning. Designer when validating checks Guvnor to see if there is a process image already available for your process. If there is not, it raises that warning. In the Designer you can generate the process image by clicking on the PNG button on the footer bar. Once you have generated your process image and re-validate this warning should no longer be there. Hope this helps. Tihomir On 5/11/12 10:45 AM, sumatheja wrote: Hi, I've created a simple bpmn flow which has a start noden rule-flow task and end. When I try to import it from oryx designer and validate it it gives an error saying cannot find process image. Can anyone help me know what I'm missing. -- cheers Sumatheja Dasararaju ___ rules-users mailing listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju ___ rules-users mailing listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] unable to write a function in guvnor with generic List as a parameter
Hi, I'm trying to write a function in guvnor like function int applyThresholds(ListInteger thresholdList, int totalPoints) It says the ListInteger ClassNotFound even though I've java.util.List in the imports. when i remove Integer generic it works fine. I'm using drools and guvnor 5.4 CR1. Am I missing anything? Thanks in advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] unable to write a function in guvnor with generic List as a parameter
Thanks for the response. so I guess I need to typecast and use it. :) On Thu, May 10, 2012 at 4:44 PM, FlyingEagle elisabeth.wi...@wincor-nixdorf.com wrote: Hi Sumatheja, bad news... Guvnor doesn't support generics. I had the same problem and now I am working without type safe definitions. I am working with the newest version 5.4.0, but this feature is missing. Sorry for not having better news. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-unable-to-write-a-function-in-guvnor-with-generic-List-as-a-parameter-tp3977450p3977475.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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] unable to write a function in guvnor with generic List as a parameter
Hi Michael, When I try to add a global variable like *global java.util.ListInteger tresholdList;* the package build properly without issues. On Thu, May 10, 2012 at 5:30 PM, Michael Anstis michael.ans...@gmail.comwrote: AFAIK Drools doens't support generics, so Guvnor can't be expected to either. Waiting for somebody to correct me... and having a heap of work to do on Guvnor. ;) On 10 May 2012 16:56, sumatheja sumath...@gmail.com wrote: Thanks for the response. so I guess I need to typecast and use it. :) On Thu, May 10, 2012 at 4:44 PM, FlyingEagle elisabeth.wi...@wincor-nixdorf.com wrote: Hi Sumatheja, bad news... Guvnor doesn't support generics. I had the same problem and now I am working without type safe definitions. I am working with the newest version 5.4.0, but this feature is missing. Sorry for not having better news. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-unable-to-write-a-function-in-guvnor-with-generic-List-as-a-parameter-tp3977450p3977475.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 -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] unable to write a function in guvnor with generic List as a parameter
Can you send me a link which guides through the process... I haven't raised one before. On Thu, May 10, 2012 at 7:08 PM, Michael Anstis michael.ans...@gmail.comwrote: Please raise a JIRA for Guvnor (not Drools) so we have a record of this requirement and can schedule for future consideration. Thanks. sent on the move On 10 May 2012 17:45, sumatheja sumath...@gmail.com wrote: Hi Michael, When I try to add a global variable like *global java.util.ListInteger tresholdList;* the package build properly without issues. On Thu, May 10, 2012 at 5:30 PM, Michael Anstis michael.ans...@gmail.com wrote: AFAIK Drools doens't support generics, so Guvnor can't be expected to either. Waiting for somebody to correct me... and having a heap of work to do on Guvnor. ;) On 10 May 2012 16:56, sumatheja sumath...@gmail.com wrote: Thanks for the response. so I guess I need to typecast and use it. :) On Thu, May 10, 2012 at 4:44 PM, FlyingEagle elisabeth.wi...@wincor-nixdorf.com wrote: Hi Sumatheja, bad news... Guvnor doesn't support generics. I had the same problem and now I am working without type safe definitions. I am working with the newest version 5.4.0, but this feature is missing. Sorry for not having better news. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-unable-to-write-a-function-in-guvnor-with-generic-List-as-a-parameter-tp3977450p3977475.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 -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Getting Current Date in LHS of a rule
Hi All, Can anyone tell me if there is a variable or standard way to get the *current date* and compare with the java.util.Date. I'm trying write the below rule but it doesn't work. It doesn't throw any error but the rule is not at all fired in any case rule new rule dialect java when Message(*testDate new Date()*) then System.out.println(Test); end Do I have to insert a seperate fact which will contain the current date? Thanks in advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Getting Current Date in LHS of a rule
Thanks for the response. I will follow that. On Wed, May 9, 2012 at 11:38 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: Don't do this: LHS code should not have any side effects and should not depend on the time a CE or constraint is evaluated. If your variable should represent a yyy-mm-dd 0:00:00, you should establish a global variable of type Date and initialize it after creating your session and before inserting any facts. -W On 09/05/2012, sumatheja sumath...@gmail.com wrote: Hi All, Can anyone tell me if there is a variable or standard way to get the *current date* and compare with the java.util.Date. I'm trying write the below rule but it doesn't work. It doesn't throw any error but the rule is not at all fired in any case rule new rule dialect java when Message(*testDate new Date()*) then System.out.println(Test); end Do I have to insert a seperate fact which will contain the current date? Thanks in advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Even to check if all the rules have been fired
Hi All, I'm using a stateful knowledge session in my project, where * ksession.fireUntilHalt()* will trigger the rules as and when the facts are inserted. I,m developing a functionaly where I need to insert some new facts and and retract them once the valid rules have been fired. I'm unable to find the exact event listener to check if all the valid rules have been fired. Do I need to handle this case(is it implicitly handled)? *AfterActivationFiredEvent *seems to be activated after successfully firing each rule, so I feel this wont serve the purpose. Thanks in advance. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Even to check if all the rules have been fired
Hi wolfgang, Thanks for the response. I've thousands of facts(fetched from DB) which wont be changing very frequently. So I'm loading them to the knowledgesession at the time of deploying the application and it stays live on the server. Whenever my application(a webservice) is called, I fetch this session(which is on the server jvm), add the new facts and validate them and retract the newly added facts so that my session will be intact(as it was before the webservice call). To achieve this I have used the fireUntilHalt. Correct me If I'm making a mistake here. On Thu, May 3, 2012 at 3:30 PM, Wolfgang Laun wolfgang.l...@gmail.comwrote: You don't say why you are using fireUntilHalt(). What you want to know, i.e., that all rules due to the insertion of some facts have been fired, is naturally provided by fireAllRules(). You could come up with some hack to achieve your intent with fireUntilHalt(), but why do it in a roundabout way? -W On 3 May 2012 15:11, sumatheja sumath...@gmail.com wrote: Hi All, I'm using a stateful knowledge session in my project, where * ksession.fireUntilHalt()* will trigger the rules as and when the facts are inserted. I,m developing a functionaly where I need to insert some new facts and and retract them once the valid rules have been fired. I'm unable to find the exact event listener to check if all the valid rules have been fired. Do I need to handle this case(is it implicitly handled)? *AfterActivationFiredEvent *seems to be activated after successfully firing each rule, so I feel this wont serve the purpose. Thanks in advance. -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Even to check if all the rules have been fired
Thanks wolfgang for the response. I will use fireAllRules, seems that is the way to go. On Thu, May 3, 2012 at 5:09 PM, Wolfgang Laun wolfgang.l...@gmail.comwrote: For each WS request, you should call fireAllRules(). Nothing is gained by calling fireUntilHalt(). Of course, your rules may determine when to call halt, in all possible circumstances. Then, and only then, it would be the same thing. But using halt is more compulsive: you must not miss calling halt(). -W On 3 May 2012 16:50, sumatheja sumath...@gmail.com wrote: Hi wolfgang, Thanks for the response. I've thousands of facts(fetched from DB) which wont be changing very frequently. So I'm loading them to the knowledgesession at the time of deploying the application and it stays live on the server. Whenever my application(a webservice) is called, I fetch this session(which is on the server jvm), add the new facts and validate them and retract the newly added facts so that my session will be intact(as it was before the webservice call). To achieve this I have used the fireUntilHalt. Correct me If I'm making a mistake here. On Thu, May 3, 2012 at 3:30 PM, Wolfgang Laun wolfgang.l...@gmail.comwrote: You don't say why you are using fireUntilHalt(). What you want to know, i.e., that all rules due to the insertion of some facts have been fired, is naturally provided by fireAllRules(). You could come up with some hack to achieve your intent with fireUntilHalt(), but why do it in a roundabout way? -W On 3 May 2012 15:11, sumatheja sumath...@gmail.com wrote: Hi All, I'm using a stateful knowledge session in my project, where * ksession.fireUntilHalt()* will trigger the rules as and when the facts are inserted. I,m developing a functionaly where I need to insert some new facts and and retract them once the valid rules have been fired. I'm unable to find the exact event listener to check if all the valid rules have been fired. Do I need to handle this case(is it implicitly handled)? *AfterActivationFiredEvent *seems to be activated after successfully firing each rule, so I feel this wont serve the purpose. Thanks in advance. -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Existing StateFulKnowledgeSession not taking the changes in the Guvnor
HI figured out the mistake.. I was not starting the following serives ResourceFactory.getResourceChangeNotifierService().start(); ResourceFactory.getResourceChangeScannerService().start(); Everything works fine now. Thanks On Tue, May 1, 2012 at 6:35 PM, sumatheja sumath...@gmail.com wrote: Hi All, I have a problem refreshing the sateful knowledge session whenever there is a change in the rules assets int he guvnor. Below is my code used for configuration StatefulKnowledgeSession ksession = null; KnowledgeAgentConfiguration kconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration(); KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); config.setOption( EventProcessingOption.STREAM ); KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( config ); kconf.setProperty(drools.agent.newInstance , false); KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(MyAgent1,kbase, kconf); kagent.applyChangeSet(ResourceFactory.newUrlResource( http://127.0.0.1:8380/drools-guvnor/LDIChangeSet.xml;)); kbase = kagent.getKnowledgeBase(); ksession = kbase.newStatefulKnowledgeSession(); I've a session where I've inserted thousands of facts. Whenever there is change in the rule base Do I need to reinsert all the facts using the new knowledgeBase? Any help would be appreciated. Thanks in advance. -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] jbpm and rule flow
Hi All, I'm a bit confused regarding the differences between the two. I understand that JBPM is a complete workflow with full workflow capabilities. But will the rule-flows continue to work? I've created a sample rule-flow, but it doesn't work until I put the jbpm jars in the classpath. I can remember in older versions of drools I never used to import these jars seperately. Is it recommended to continue writing rule-flows with the latest versions?? I'll be grateful if someone can provide me a link where I can get my confusions cleared. Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init while unmarshalling statefulknowledgesession
Thanks everyone for the help :)Its working fine with jbpm 5.3 development snapshot and drools 5.4 cr1... cheers!! On Mon, Apr 16, 2012 at 3:08 PM, sumatheja sumath...@gmail.com wrote: Thanks Edson... I expected this could be a ersion issue... can you send me the link for the latest snapshot for jBPM... The latest that I could find is 5.2 final. 2012/4/16 Edson Tirelli ed.tire...@gmail.com The error means a version incompatibility due to changes we made to the marshalling framework. Until both projects have their releases out, you will have to use snapshots. jBPM 5.3 requires Drools 5.4 and vice-versa. You can't use Drools 5.4 with jBPM 5.2. I think jBPM 5.3 has not released any binaries after Drools 5.4.CR1, so you need to use the snapshot until it is. Please note that this is temporary as we are talking about development (i.e., non-final) versions. Edson 2012/4/16 sumatheja sumath...@gmail.com Hi Michael... Thanks for the response I'm getting this exception even without a guvnor i.e. when I use a local project which has jbpm process and a drl file but without the jbpm process everything works fine. I'm using jbpm 5.2 final. 2012/4/16 Michael Anstis michael.ans...@gmail.com There was a dramatic change to the marshalling of binary packages for 5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would need to be rebuilt. Downgrading JARs to older versions would effectively remove the marshalling change and hence restore compatibility of older binary assets. Edson, I think I am right? We need to call this loud and clear in the release notes. sent on the move On 16 Apr 2012 12:33, sumatheja sumath...@gmail.com wrote: I'm getting the same issue when I try to unmarshall a sample application which has the jbpm process (which moves out guvnor as possible cause). can someone guide if this is some bug? or should I change the jbpm jar version? On Mon, Apr 16, 2012 at 11:37 AM, sumatheja sumath...@gmail.comwrote: Hi, I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which were not executing so I imported the jars from jbpm 5.2 final. The marshalling and unmarshalling works fine if I have knowledge base without rule-flows. I hope this gives some hint.. On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: This kind of error indicates some confusion between compilation and execution of the code where this is thrown. Also, which versions of Drools do you used for marshalling and unmarshalling? There's no line 287 in the versions of org.drools.marshalling.impl.PersisterHelper.java available to me. -W On 16/04/2012, sumatheja sumath...@gmail.com wrote: Hi All, I ran across an issue while unmarshalling StatefulKnowledgeSession. First I'm marshalling the session using the following code which works fine Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); File file = new File( C:\\Users\\Sumatheja\\ workingmemory.info); FileOutputStream fos = new FileOutputStream(file); ByteArrayOutputStream baos = new ByteArrayOutputStream(); marshaller.marshall(baos, workingMemory); baos.writeTo(fos); baos.close(); When I try to unmarshall the session using Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); FileInputStream fis = new FileInputStream(C:\\Users\\Sumatheja\\workingmemory.info); workingMemory = marshaller.unmarshall(fis); I'm getting the Error: java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V at org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287) at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219) at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84) No Idea what I'm missing out... any help will be appreciated... Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju
[rules-users] java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init while unmarshalling statefulknowledgesession
Hi All, I ran across an issue while unmarshalling StatefulKnowledgeSession. First I'm marshalling the session using the following code which works fine Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); File file = new File( C:\\Users\\Sumatheja\\workingmemory.info); FileOutputStream fos = new FileOutputStream(file); ByteArrayOutputStream baos = new ByteArrayOutputStream(); marshaller.marshall(baos, workingMemory); baos.writeTo(fos); baos.close(); When I try to unmarshall the session using Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); FileInputStream fis = new FileInputStream(C:\\Users\\Sumatheja\\workingmemory.info); workingMemory = marshaller.unmarshall(fis); I'm getting the Error: java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V at org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287) at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219) at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84) No Idea what I'm missing out... any help will be appreciated... Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init while unmarshalling statefulknowledgesession
Hi, I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which were not executing so I imported the jars from jbpm 5.2 final. The marshalling and unmarshalling works fine if I have knowledge base without rule-flows. I hope this gives some hint.. On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: This kind of error indicates some confusion between compilation and execution of the code where this is thrown. Also, which versions of Drools do you used for marshalling and unmarshalling? There's no line 287 in the versions of org.drools.marshalling.impl.PersisterHelper.java available to me. -W On 16/04/2012, sumatheja sumath...@gmail.com wrote: Hi All, I ran across an issue while unmarshalling StatefulKnowledgeSession. First I'm marshalling the session using the following code which works fine Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); File file = new File( C:\\Users\\Sumatheja\\workingmemory.info); FileOutputStream fos = new FileOutputStream(file); ByteArrayOutputStream baos = new ByteArrayOutputStream(); marshaller.marshall(baos, workingMemory); baos.writeTo(fos); baos.close(); When I try to unmarshall the session using Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); FileInputStream fis = new FileInputStream(C:\\Users\\Sumatheja\\workingmemory.info); workingMemory = marshaller.unmarshall(fis); I'm getting the Error: java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V at org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287) at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219) at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84) No Idea what I'm missing out... any help will be appreciated... Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init while unmarshalling statefulknowledgesession
I'm getting the same issue when I try to unmarshall a sample application which has the jbpm process (which moves out guvnor as possible cause). can someone guide if this is some bug? or should I change the jbpm jar version? On Mon, Apr 16, 2012 at 11:37 AM, sumatheja sumath...@gmail.com wrote: Hi, I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which were not executing so I imported the jars from jbpm 5.2 final. The marshalling and unmarshalling works fine if I have knowledge base without rule-flows. I hope this gives some hint.. On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: This kind of error indicates some confusion between compilation and execution of the code where this is thrown. Also, which versions of Drools do you used for marshalling and unmarshalling? There's no line 287 in the versions of org.drools.marshalling.impl.PersisterHelper.java available to me. -W On 16/04/2012, sumatheja sumath...@gmail.com wrote: Hi All, I ran across an issue while unmarshalling StatefulKnowledgeSession. First I'm marshalling the session using the following code which works fine Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); File file = new File( C:\\Users\\Sumatheja\\workingmemory.info ); FileOutputStream fos = new FileOutputStream(file); ByteArrayOutputStream baos = new ByteArrayOutputStream(); marshaller.marshall(baos, workingMemory); baos.writeTo(fos); baos.close(); When I try to unmarshall the session using Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); FileInputStream fis = new FileInputStream(C:\\Users\\Sumatheja\\workingmemory.info); workingMemory = marshaller.unmarshall(fis); I'm getting the Error: java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V at org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287) at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219) at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84) No Idea what I'm missing out... any help will be appreciated... Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init while unmarshalling statefulknowledgesession
Hi Michael... Thanks for the response I'm getting this exception even without a guvnor i.e. when I use a local project which has jbpm process and a drl file but without the jbpm process everything works fine. I'm using jbpm 5.2 final. 2012/4/16 Michael Anstis michael.ans...@gmail.com There was a dramatic change to the marshalling of binary packages for 5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would need to be rebuilt. Downgrading JARs to older versions would effectively remove the marshalling change and hence restore compatibility of older binary assets. Edson, I think I am right? We need to call this loud and clear in the release notes. sent on the move On 16 Apr 2012 12:33, sumatheja sumath...@gmail.com wrote: I'm getting the same issue when I try to unmarshall a sample application which has the jbpm process (which moves out guvnor as possible cause). can someone guide if this is some bug? or should I change the jbpm jar version? On Mon, Apr 16, 2012 at 11:37 AM, sumatheja sumath...@gmail.com wrote: Hi, I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which were not executing so I imported the jars from jbpm 5.2 final. The marshalling and unmarshalling works fine if I have knowledge base without rule-flows. I hope this gives some hint.. On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: This kind of error indicates some confusion between compilation and execution of the code where this is thrown. Also, which versions of Drools do you used for marshalling and unmarshalling? There's no line 287 in the versions of org.drools.marshalling.impl.PersisterHelper.java available to me. -W On 16/04/2012, sumatheja sumath...@gmail.com wrote: Hi All, I ran across an issue while unmarshalling StatefulKnowledgeSession. First I'm marshalling the session using the following code which works fine Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); File file = new File( C:\\Users\\Sumatheja\\workingmemory.info ); FileOutputStream fos = new FileOutputStream(file); ByteArrayOutputStream baos = new ByteArrayOutputStream(); marshaller.marshall(baos, workingMemory); baos.writeTo(fos); baos.close(); When I try to unmarshall the session using Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); FileInputStream fis = new FileInputStream(C:\\Users\\Sumatheja\\workingmemory.info); workingMemory = marshaller.unmarshall(fis); I'm getting the Error: java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V at org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287) at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219) at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84) No Idea what I'm missing out... any help will be appreciated... Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init while unmarshalling statefulknowledgesession
Thanks Edson... I expected this could be a ersion issue... can you send me the link for the latest snapshot for jBPM... The latest that I could find is 5.2 final. 2012/4/16 Edson Tirelli ed.tire...@gmail.com The error means a version incompatibility due to changes we made to the marshalling framework. Until both projects have their releases out, you will have to use snapshots. jBPM 5.3 requires Drools 5.4 and vice-versa. You can't use Drools 5.4 with jBPM 5.2. I think jBPM 5.3 has not released any binaries after Drools 5.4.CR1, so you need to use the snapshot until it is. Please note that this is temporary as we are talking about development (i.e., non-final) versions. Edson 2012/4/16 sumatheja sumath...@gmail.com Hi Michael... Thanks for the response I'm getting this exception even without a guvnor i.e. when I use a local project which has jbpm process and a drl file but without the jbpm process everything works fine. I'm using jbpm 5.2 final. 2012/4/16 Michael Anstis michael.ans...@gmail.com There was a dramatic change to the marshalling of binary packages for 5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would need to be rebuilt. Downgrading JARs to older versions would effectively remove the marshalling change and hence restore compatibility of older binary assets. Edson, I think I am right? We need to call this loud and clear in the release notes. sent on the move On 16 Apr 2012 12:33, sumatheja sumath...@gmail.com wrote: I'm getting the same issue when I try to unmarshall a sample application which has the jbpm process (which moves out guvnor as possible cause). can someone guide if this is some bug? or should I change the jbpm jar version? On Mon, Apr 16, 2012 at 11:37 AM, sumatheja sumath...@gmail.comwrote: Hi, I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which were not executing so I imported the jars from jbpm 5.2 final. The marshalling and unmarshalling works fine if I have knowledge base without rule-flows. I hope this gives some hint.. On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: This kind of error indicates some confusion between compilation and execution of the code where this is thrown. Also, which versions of Drools do you used for marshalling and unmarshalling? There's no line 287 in the versions of org.drools.marshalling.impl.PersisterHelper.java available to me. -W On 16/04/2012, sumatheja sumath...@gmail.com wrote: Hi All, I ran across an issue while unmarshalling StatefulKnowledgeSession. First I'm marshalling the session using the following code which works fine Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); File file = new File( C:\\Users\\Sumatheja\\ workingmemory.info); FileOutputStream fos = new FileOutputStream(file); ByteArrayOutputStream baos = new ByteArrayOutputStream(); marshaller.marshall(baos, workingMemory); baos.writeTo(fos); baos.close(); When I try to unmarshall the session using Marshaller marshaller = MarshallerFactory .newMarshaller(workingMemory.getKnowledgeBase()); FileInputStream fis = new FileInputStream(C:\\Users\\Sumatheja\\workingmemory.info); workingMemory = marshaller.unmarshall(fis); I'm getting the Error: java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V at org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287) at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219) at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117) at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84) No Idea what I'm missing out... any help will be appreciated... Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Issue deploying 2.1 oryxdesigner on guvnor 5.4 CR1 and jboss 7.1.1 final
Hi I deployed the designer 2.1 war in standalone/deployments afetr changing the url in the jbpm.xml to the appropriate port. * externalloadurl protocol=http host=localhost:8380 subdomain=drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor usr=admin pwd=admin/* When I create a new jbpm and save it nothing happens.. I get the following server log Can anyone let me knoe if it is a bug or If I'm missing anything. *17:00:14,356 INFO [stdout] (http--127.0.0.1-8380-2) (null: -1, -1): Premature end of file. 17:00:17,997 INFO [org.jbpm.designer.server.EditorHandler] (http--127.0.0.1-8380-10) Performing diagram information pre-processing steps. 17:00:18,027 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:18,251 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:18,369 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:18,598 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:18,682 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:18,765 INFO [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http--127.0.0.1-8380-10) Successfully deleted file :C:\Users\Sumatheja\mywork\jboss- as-7.1.1.Final\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json 17:00:18,821 INFO [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http--127.0.0.1-8380-10) Created file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final \standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json 17:00:18,827 INFO [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http--127.0.0.1-8380-10) Successfully deleted file :C:\Users\Sumatheja\mywork\jboss- as-7.1.1.Final\standalone\deployments\designer.war\stencilsets\bpmn2.0jbpm\view\activity\workitems\Email.svg 17:00:18,833 INFO [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http--127.0.0.1-8380-10) Successfully deleted file :C:\Users\Sumatheja\mywork\jboss- as-7.1.1.Final\standalone\deployments\designer.war\stencilsets\bpmn2.0jbpm\view\activity\workitems\Log.svg 17:00:18,860 INFO [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http--127.0.0.1-8380-10) Created file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final \standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/view/activity/workitems/Log.svg 17:00:18,874 INFO [org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] (http--127.0.0.1-8380-10) Created file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final \standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/view/activity/workitems/Email.svg 17:00:19,647 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:19,660 INFO [stdout] (http--127.0.0.1-8380-5) (null: -1, -1): Premature end of file. 17:00:20,478 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:20,744 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:21,134 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:21,436 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8380-5) Demo login for user (admin) succeeded. 17:00:21,439 WARNING [org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper] (http--127.0.0.1-8380-5) WebApplicationException has been caught : javax.jcr.PathNotFoundE xception: processdictionary 17:00:21,443 INFO [org.jbpm.designer.web.server.DictionaryServlet] (http--127.0.0.1-8380-2) check connection response code: 500* Appreciate any help. thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Runtime jitting exception while inserting facts
Hi Mario... This exactly, seems to be the problem. I'm getting the exception exactly at 21st record. I'll try it on CR1 in a while. On Thu, Apr 12, 2012 at 7:59 AM, Mario Fusco mario.fu...@gmail.com wrote: In the 5.4 we decided to do the (biggest part of) constraints evaluation with MVEL. Then, for performance reason, after a constraint has been evaluated a given amount of times (20 at the moment), we JIT the constraint transforming it in a proper Java class via ASM. You got an exception during this last JITting process. Sorry if I cannot be more precise, but I'd need to reproduce your problem to exactly figure out what was wrong. Anyway, give it a try with the CR1 and if the problem persists please let me know, possibly also sending at least the rule containing the constraint that generated the problem (metricclass == PROCESSOR in your case), and the Java bean or declared type related to the constraint itself. Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Runtime-jitting-exception-while-inserting-facts-tp3903386p3904671.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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Runtime jitting exception while inserting facts
(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31] Caused by: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:403) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:426) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:415) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83) [jbossweb-7.0.13.Final.jar:] at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:274) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:58) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] ... 25 more Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) [rt.jar:1.6.0_31] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) [rt.jar:1.6.0_31] at java.net.SocketOutputStream.write(SocketOutputStream.java:136) [rt.jar:1.6.0_31] at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:724) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:449) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:748) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:559) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.Response.doWrite(Response.java:594) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:398) [jbossweb-7.0.13.Final.jar:] ... 32 more Can you let me know if I missed anything while migrating to CR1?? Thanks in advance. On Thu, Apr 12, 2012 at 8:29 AM, sumatheja sumath...@gmail.com wrote: Hi Mario... This exactly, seems to be the problem. I'm getting the exception exactly at 21st record. I'll try it on CR1 in a while. On Thu, Apr 12, 2012 at 7:59 AM, Mario Fusco mario.fu...@gmail.comwrote: In the 5.4 we decided to do the (biggest part of) constraints evaluation with MVEL. Then, for performance reason, after a constraint has been evaluated a given amount of times (20 at the moment), we JIT the constraint transforming it in a proper Java class via ASM. You got an exception during this last JITting process. Sorry if I cannot be more precise, but I'd need to reproduce your problem to exactly figure out what was wrong. Anyway, give it a try with the CR1 and if the problem persists please let me know, possibly also sending at least the rule containing the constraint that generated the problem (metricclass == PROCESSOR in your case), and the Java bean or declared type related to the constraint itself. Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Runtime-jitting-exception-while-inserting-facts-tp3903386p3904671.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 -- cheers Sumatheja Dasararaju -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Runtime jitting exception while inserting facts
Thanks Toni. Eagerly awaiting for your response :) 2012/4/12 Toni Rikkola toni.rikk...@gmail.com I'll check if there is a bug in Guvnor. It could cause the SocketException. Toni On Apr 12, 2012, at 12:06 PM, sumatheja wrote: Hi Mario, I moved to 5.4 CR1. I replaced the drools library with CR1 and deployed the rules on guvnor 5.4 CR1 but when I try to read the knowledge base I get the following error on Jboss log 09:57:33,784 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8280-2) Demo login for user (admin) succeeded. 09:57:34,142 WARN [org.jboss.seam.security.permission.SecurityRuleLoader] (http--127.0.0.1-8280-2) No security rules configured - rule base permissions will be unavaila ble. 09:57:34,145 INFO [org.drools.guvnor.server.files.AuthorizationHeaderChecker] (http--127.0.0.1-8280-2) admin authenticated for rest api 09:57:34,153 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageName: mattelli.re 09:57:34,154 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageVersion: LATEST 09:57:34,156 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageIsLatest: true 09:57:34,157 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageIsSource: false 09:57:34,218 ERROR [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) null: ClientAbortException: java.net.SocketException: Connection r eset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:403) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:426) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:415) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83) [jbossweb-7.0.13.Final.jar:] at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:274) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:58) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:141) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.0.Final.jar:3.1.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.0.Final.jar:3.1.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke
Re: [rules-users] Runtime jitting exception while inserting facts
Yeah I can download the package... I'll try by using the pkg file... Thanks for the help :) 2012/4/12 Toni Rikkola toni.rikk...@gmail.com About the connection error. I can't find a way to reproduce it. I'll keep trying and let you know if I find something. Can you download the package directly from Guvnor? You could test the jitting error with that. Toni On Apr 12, 2012, at 12:30 PM, sumatheja wrote: Thanks Toni. Eagerly awaiting for your response :) 2012/4/12 Toni Rikkola toni.rikk...@gmail.com I'll check if there is a bug in Guvnor. It could cause the SocketException. Toni On Apr 12, 2012, at 12:06 PM, sumatheja wrote: Hi Mario, I moved to 5.4 CR1. I replaced the drools library with CR1 and deployed the rules on guvnor 5.4 CR1 but when I try to read the knowledge base I get the following error on Jboss log 09:57:33,784 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8280-2) Demo login for user (admin) succeeded. 09:57:34,142 WARN [org.jboss.seam.security.permission.SecurityRuleLoader] (http--127.0.0.1-8280-2) No security rules configured - rule base permissions will be unavaila ble. 09:57:34,145 INFO [org.drools.guvnor.server.files.AuthorizationHeaderChecker] (http--127.0.0.1-8280-2) admin authenticated for rest api 09:57:34,153 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageName: mattelli.re 09:57:34,154 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageVersion: LATEST 09:57:34,156 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageIsLatest: true 09:57:34,157 INFO [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) PackageIsSource: false 09:57:34,218 ERROR [org.drools.guvnor.server.files.PackageDeploymentServlet] (http--127.0.0.1-8280-2) null: ClientAbortException: java.net.SocketException: Connection r eset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:403) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:426) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:415) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83) [jbossweb-7.0.13.Final.jar:] at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:274) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:58) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:141) [guvnor-webapp-core-5.4.0.CR1.jar:5.4.0.CR1] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.0.Final.jar:3.1.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.0.Final.jar:3.1.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter
Re: [rules-users] Runtime jitting exception while inserting facts
Hi I tried deploying guvnor 5.4 CR1 on jboss 7.1.1 final. I downloaded the package and tried running the program using it. I'm getting the following exception: java.lang.RuntimeException: java.io.InvalidClassException: org.drools.rule.MVELDialectRuntimeData; local class incompatible: stream classdesc serialVersionUID = -64624826351992706, local class serialVersionUID = 5166066541265170937 at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:692) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37) at mattelli.re.TestGuvnor.main(TestGuvnor.java:19) Caused by: java.io.InvalidClassException: org.drools.rule.MVELDialectRuntimeData; local class incompatible: stream classdesc serialVersionUID = -64624826351992706, local class serialVersionUID = 5166066541265170937 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:560) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at java.util.HashMap.readObject(HashMap.java:1030) 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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:59) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.drools.rule.Package.readExternal(Package.java:197) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:618) ... 2 more I doubted if my code was causing the issue, so I took a fresh guvnor 5.4 CR1 and installed the sample repository (mortgages) and tried to run sample code to check. I'm getting the same issue code I used to get the knowledgebase KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newUrlResource( http://127.0.0.1:8380/drools-guvnor/mortgages.pkg;), ResourceType.PKG ); KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() 0) { for (KnowledgeBuilderError error: errors) { System.err.println(error); } throw new IllegalArgumentException(Could not parse knowledge.); } Can someone guide me through this. On Thu, Apr 12, 2012 at 12:11 PM, sumatheja sumath...@gmail.com wrote: Yeah I can download the package... I'll try by using the pkg file... Thanks for the help :) 2012/4/12 Toni Rikkola toni.rikk...@gmail.com About the connection error. I can't find a way to reproduce it. I'll keep trying and let you know if I find something. Can you download the package directly from Guvnor? You could test the jitting error with that. Toni On Apr 12, 2012, at 12:30 PM, sumatheja wrote: Thanks Toni. Eagerly awaiting for your response :) 2012/4/12 Toni Rikkola toni.rikk...@gmail.com I'll check if there is a bug in Guvnor. It could cause the SocketException. Toni On Apr 12, 2012, at 12:06 PM, sumatheja wrote: Hi Mario, I moved to 5.4 CR1. I replaced the drools library with CR1 and deployed the rules on guvnor 5.4 CR1 but when I try to read the knowledge base I get the following error on Jboss log 09:57:33,784 INFO [org.drools.guvnor.server.security.DemoAuthenticator] (http--127.0.0.1-8280-2) Demo login for user (admin) succeeded. 09:57:34,142 WARN [org.jboss.seam.security.permission.SecurityRuleLoader] (http
Re: [rules-users] Runtime jitting exception while inserting facts
Hi Michael The issue is fixed... I think it was mismatch of jar versions Now I'm able to run the rules properly...Mario, In CR1 jittime issue is also gone Thanks for all the help... really appreciate that :) One final doubt... when I build rules on the guvnor I get some warnings on the server log saying: WARN [org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint] (http--127.0.0.1-8380-3) validation of reference constraint is not yet implemented 14:45:41,161 WARN [org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint] (http--127.0.0.1-8380-3) validation of reference constraint is not yet implemented 14:45:41,164 WARN [org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint] (http--127.0.0.1-8380-3) validation of reference constraint is not yet implemented I get hundreds of similar logs.. Although its not affecting my functionality, jus wanted to know anout it 2012/4/12 Michael Anstis michael.ans...@gmail.com Did you build the binary package in Guvnor? There was a big change to the serialization of packages in Drools Expert. On 12 April 2012 14:08, sumatheja sumath...@gmail.com wrote: Hi I tried deploying guvnor 5.4 CR1 on jboss 7.1.1 final. I downloaded the package and tried running the program using it. I'm getting the following exception: java.lang.RuntimeException: java.io.InvalidClassException: org.drools.rule.MVELDialectRuntimeData; local class incompatible: stream classdesc serialVersionUID = -64624826351992706, local class serialVersionUID = 5166066541265170937 at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:692) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37) at mattelli.re.TestGuvnor.main(TestGuvnor.java:19) Caused by: java.io.InvalidClassException: org.drools.rule.MVELDialectRuntimeData; local class incompatible: stream classdesc serialVersionUID = -64624826351992706, local class serialVersionUID = 5166066541265170937 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:560) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at java.util.HashMap.readObject(HashMap.java:1030) 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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:59) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.drools.rule.Package.readExternal(Package.java:197) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:618) ... 2 more I doubted if my code was causing the issue, so I took a fresh guvnor 5.4 CR1 and installed the sample repository (mortgages) and tried to run sample code to check. I'm getting the same issue code I used to get the knowledgebase KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newUrlResource( http://127.0.0.1:8380/drools-guvnor/mortgages.pkg;), ResourceType.PKG ); KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() 0) { for (KnowledgeBuilderError error: errors) { System.err.println(error); } throw new
[rules-users] Runtime jitting exception while inserting facts
Hi All, I'm getting some wierd exception while trying to insert a fact. I'm trying to compare a string field in a rule, like metricclass == PROCESSOR java.lang.RuntimeException: Exception jitting: metricclass == PROCESSOR at org.drools.rule.constraint.MvelConstraint.jitEvaluator(MvelConstraint.java:168) at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:137) at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:99) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:458) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:386) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:211) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:239) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:336) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:297) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:887) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:846) at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:259) at mattelli.re.ComplianceEngine.loadProductMetricDB(ComplianceEngine.java:1644) at mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:196) at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:80) Caused by: java.lang.IllegalAccessError: tried to access field org.drools.rule.builder.dialect.asm.ClassGenerator$MethodBody.mv from class org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitMethodInvocation(ASMConditionEvaluatorJitter.java:463) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitInvocation(ASMConditionEvaluatorJitter.java:447) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitEvaluatedExpression(ASMConditionEvaluatorJitter.java:335) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitExpression(ASMConditionEvaluatorJitter.java:324) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitObjectBinary(ASMConditionEvaluatorJitter.java:132) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitBinary(ASMConditionEvaluatorJitter.java:107) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitSingleCondition(ASMConditionEvaluatorJitter.java:66) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.jitCondition(ASMConditionEvaluatorJitter.java:54) at org.drools.rule.constraint.ASMConditionEvaluatorJitter$EvaluateMethodGenerator.body(ASMConditionEvaluatorJitter.java:48) at org.drools.rule.builder.dialect.asm.ClassGenerator$MethodDescr.write(ClassGenerator.java:478) at org.drools.rule.builder.dialect.asm.ClassGenerator.generateBytecode(ClassGenerator.java:50) at org.drools.rule.builder.dialect.asm.ClassGenerator.generateClass(ClassGenerator.java:58) at org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance(ClassGenerator.java:64) at org.drools.rule.constraint.ASMConditionEvaluatorJitter.jit(ASMConditionEvaluatorJitter.java:30) at org.drools.rule.constraint.MvelConstraint.jitEvaluator(MvelConstraint.java:166) ... 15 more Can someone tell me the possible causes. This happens with very few facts making it even more confusing. Thanks in advance -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Runtime jitting exception while inserting facts
Hi Mario Thanks for the response I'm using 5.4 beta2... I'll check with 5.4 CR1 and let you know very soon The exact steps to replicate are complicated... as I'm loading hundreds of different facts and don't know what exactly is causing the issue I'll be grateful if you can let me know, what exactly the exception means and any possible scenario when it can occur On Wed, Apr 11, 2012 at 7:42 PM, Mario Fusco mario.fu...@gmail.com wrote: Hi Sumatheja, thanks for reporting this, but I'd need to have some more informations in order to reproduce your problem. Which version of Drools are you using? It cannot be the CR1 we just released because the line numbers in your stack trace don't correspond. Can you give a try with the CR1 and see if you still have that problem? If so can you send a small test case to allow me to reproduce it too? Thanks again, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Runtime-jitting-exception-while-inserting-facts-tp3903386p3903436.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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Usings joins in decision tables
Thanks a lot michael. It works fine now. :) 2012/4/5 Michael Anstis michael.ans...@gmail.com Hi, I assume you mean XLS decision tables, but if you mean in Guvnor the same principle applies. Something like this should be OK:- CONDITION | CONDITION Header | SubHeader $a : id != {param} | $b : id == {param} null| $a null| $a null| $a null| $a Please note null above is the word null (no quotatioin marks) and not an empty value. You could use any other check in the Header column that is always true (e.g. id 0 in which case 0 would become the row value, etc). With kind regards, Mike On 3 April 2012 14:39, sumatheja sumath...@gmail.com wrote: Hi All, I'm new to using decision tables. I'm trying to create a join in the condition column like when Header($a:id) SubHeader($b:id==$a) How to achieve this in decision tables. Any help will be appreciated. -- cheers ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Usings joins in decision tables
Hi All, I'm new to using decision tables. I'm trying to create a join in the condition column like when Header($a:id) SubHeader($b:id==$a) How to achieve this in decision tables. Any help will be appreciated. -- cheers ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Unable to parse changeset of guvnor-5 in jboss-4
Hi All, I'm using changeset.xml to access the rules repository of guvnor-5.1. When i deploy it in jboss-5 everything goes on fine but when i try deploying it in jboss 4 and try to use changeset it gives an exception saying unable to parse changeset.xml. My changeset looks something like below: 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-setdrools-change-set-5.0.xsd' add resource source='http://127.0.0.1:7070/drools-guvnor/xyz.pkg' type='PKG' / /add /change-set Any help will be much appreciated. Thanks. -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Unable to use StatefulKnowledgeSession inside a webservice
Hi All, I'm trying to expose a class as a web service using jax ws. The class has methods using StatefulKnowledgeSession . Everything goes on well if i omit those fields. Any idea on this?? -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Performance effect due to eval?
Hi All, Is it true that the performance of RETE algorithm gets affected if we use eval function in the rules conditions? Can anyone explain if this is true. -- cheers ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Performance effect due to eval?
Thanks for the reply. Got it. On Mon, Oct 18, 2010 at 6:14 PM, Wolfgang Laun wolfgang.l...@gmail.com wrote: A simplified explanation is this: An eval() contains a general Boolean expression; it is, in general, not possible to re-engineer one or more Contraints from it. A Constraint relates a fact field to another value. Here, indexing techniques can be applied, which greatly improve the Rete algorithm. Also, certain factoring steps (contraction of repeated Constraints from different left hand sides) are possible with several Constraint forms. Rete - even without indexing - is still better than naive or brute force searches. -W On 18 October 2010 08:47, sumatheja sumath...@gmail.com wrote: Hi All, Is it true that the performance of RETE algorithm gets affected if we use eval function in the rules conditions? Can anyone explain if this is true. -- cheers ___ 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 -- cheers ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Exception Handling in the rule consequence
Hi swapnil, Thanks for your reply. My problem is solved.It was a dialect issue. On Fri, Oct 15, 2010 at 5:28 PM, Swapnil Sawant swapnil.saw...@lntinfotech.com wrote: Re-replying to this question I am not sure if this would help you. Try creating object of Driver class(similar to Car object) like following : rulemy rule when $c:Car() $d:Driver() then //ur logic for action end -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Exception-Handling-in-the-rule-consequence-tp1694378p1707269.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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Exception Handling in the rule consequence
Hi All, I have a set of rules. After firing the rules if an exception occurs in a rule the following rules are not getting evaluated. So i tried writing a try catch block inside the consequence part of the rule, but then i get an error saying 'unable to build the consequence.[Error:was expecting type: java.lang.Object but found type:null] Here follows my code *rule 'Test rule' ruleflow-group Test Ruleflow no-loop when $c:Car() Driver() then try{ $c.getModel() } catch (Exception Ee) { System.out.println(caught an exception: +Ee.toString()); } end* However if i remove the try catch block it buils fine. Can anyone let me know if i'm missing something here. Thanks in advance :) -- cheers Sumatheja ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Exception Handling in the rule consequence
Hi leandro, Thanks for replying. I didn't forget the ; in the actual code. The code i have pasted is the sample one similar to my original code. sorry for the typo. 2010/10/13 Leandro Romero leandro.s.rom...@gmail.com I dont know if this will fix your problem, but you forgot a ; after $c.getModel(). ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Exception Handling in the rule consequence
Hi Michael, I have written this rule in the guvnor editor, i did import java.lang.Exception. 2010/10/13 Michael Anstis michael.ans...@gmail.com Did you import the Exception class? 2010/10/13 sumatheja sumath...@gmail.com Hi All, I have a set of rules. After firing the rules if an exception occurs in a rule the following rules are not getting evaluated. So i tried writing a try catch block inside the consequence part of the rule, but then i get an error saying 'unable to build the consequence.[Error:was expecting type: java.lang.Object but found type:null] Here follows my code *rule 'Test rule' ruleflow-group Test Ruleflow no-loop when $c:Car() Driver() then try{ $c.getModel() } catch (Exception Ee) { System.out.println(caught an exception: +Ee.toString()); } end* However if i remove the try catch block it buils fine. Can anyone let me know if i'm missing something here. Thanks in advance :) -- cheers Sumatheja ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Exception Handling in the rule consequence
Hi Wolfgang, Whats the advantage of option 2 over 1? Can you give sample code for option 2?? 2010/10/13 Wolfgang Laun wolfgang.l...@gmail.com In drl, you could use dialect java at outermost level, but one never does, because that's the default. I'd use option (2). -W 2010/10/13 sumatheja sumath...@gmail.com Hi Wolfgang, I am actually writing all the rules in a .drl and importing them into a guvnor. I didn't mention the dialect explicitly anywhere in the code. Is the default dialect MVEL. Is there a way to make one time declaration of dialect in my case instead of declaring it for all the rules. 2010/10/13 Wolfgang Laun wolfgang.l...@gmail.com I'd say you are using dialect mvel There is no try/catch statement in MVEL. You have the options: (1) Use Java, not MVEL. (2) Surround the fireAllRules() with try/catch and put it in a loop that's terminated if there is no exception. -W 2010/10/13 sumatheja sumath...@gmail.com Hi All, I have a set of rules. After firing the rules if an exception occurs in a rule the following rules are not getting evaluated. So i tried writing a try catch block inside the consequence part of the rule, but then i get an error saying 'unable to build the consequence.[Error:was expecting type: java.lang.Object but found type:null] Here follows my code *rule 'Test rule' ruleflow-group Test Ruleflow no-loop when $c:Car() Driver() then try{ $c.getModel() } catch (Exception Ee) { System.out.println(caught an exception: +Ee.toString()); } end* However if i remove the try catch block it buils fine. Can anyone let me know if i'm missing something here. Thanks in advance :) -- cheers Sumatheja ___ 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 -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Variable Notation in rule Condition
Hi All, I have this doubt regarding the notation used inside the rule's condition. I have a fact HOST having the variables* HostName* and * CPUSockets*. I have the following rule rule Test when HOST(HostName!=null, CPUSockets3) then # do something Is throws an error saying cannot extract field *HostName*. It works fine when i use *hostName*. Can anyone explain me the concept behind this. Thanks in advance :) -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Variable Notation in rule Condition
Should not be using according to convention but yes i used it that way. In the below case CPUSockets is not giving any error. 2010/10/14 Salaboy sala...@gmail.com In your beans Do you use caps for attributes ? - CTO @ http://www.plugtree.comhttp://www.plugtree.com - MyJourney @ http://salaboy.wordpress.comhttp://salaboy.wordpress.com - Co-Founder @ http://www.jbug.com.arhttp://www.jbug.com.ar - Mauricio Salaboy Salatino - On 13/10/2010, at 22:20, sumatheja sumath...@gmail.com wrote: Hi All, I have this doubt regarding the notation used inside the rule's condition. I have a fact HOST having the variables* HostName* and * CPUSockets*. I have the following rule rule Test when HOST(HostName!=null, CPUSockets3) then # do something Is throws an error saying cannot extract field *HostName*. It works fine when i use *hostName*. Can anyone explain me the concept behind this. Thanks in advance :) -- cheers Sumatheja Dasararaju ___ 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 -- cheers Sumatheja Dasararaju ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] How to import standard java classe(eg: wrapper classes) inside a drools guvnor.
Hi I am new to drools. Forgive me if the question iam asking is too dumb :P. I want to write java code inside the rules in the drools-guvnor using the standard classes, like parsing a string using wrapper classes. How can i import these java classes? -- Thanks and Regards, Sumatheja Dasararaju Human Being :P ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users