[rules-users] drools guvnor 5.1 - oracle database issue (java.sql.SQLException: ORA-22275)
Hi, I have deployed drools-5.1.1-guvnor.war in jboss-5.1.0.GA application server. Also, I have changed the repository.xml, workspace.xml in default and security folders to use oracle database. When I start the server, all the tables are getting created in the database application is working fine. But, when I restart the server, it is not able to start properly and everytime I am getting the following error .. .. .. Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.jackrabbit.core.util.db.ResultSetWrapper.invoke(ResultSetWrapper.java:66) ... 116 more Caused by: java.sql.SQLException: ORA-22275: invalid LOB locator specified at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278) at oracle.jdbc.driver.T4C8TTILob.receiveReply(T4C8TTILob.java:930) at oracle.jdbc.driver.T4C8TTILob.getChunkSize(T4C8TTILob.java:329) at oracle.jdbc.driver.T4CConnection.getChunkSize(T4CConnection.java:2015) at oracle.sql.BLOB.getChunkSize(BLOB.java:389) at oracle.sql.BLOB.getBufferSize(BLOB.java:410) at oracle.sql.BLOB.getBinaryStream(BLOB.java:229) at oracle.jdbc.driver.BlobAccessor.getBinaryStream(BlobAccessor.java:209) at oracle.jdbc.driver.OracleResultSetImpl.getBinaryStream(OracleResultSetImpl.java:886) at org.apache.commons.dbcp.DelegatingResultSet.getBinaryStream(DelegatingResultSet.java:222) at org.apache.commons.dbcp.DelegatingResultSet.getBinaryStream(DelegatingResultSet.java:222) ... 121 more Any ideas to resolve this issue? =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Date Condition in Decision tables
Is now a pseudo date\time or really the date\time when the pattern is evaluated? If now is a pseudo date\time and can be inserted into WorkingMemory as a Fact then your rules are quite simple. If however now is the date\time when the pattern is evaluated I think you're probably looking at using CEP (Fusion) which IIRC is not supported in the XLS Decision Tables (and definitely not in Guvnor's guided dtable). With kind regards, Mike On 24 February 2011 07:52, sdinoo sdi...@gmail.com wrote: I am new to drools. I've searched in this forum as well as in the documentation but I havent found any solution to the situation that I am facing I have a Claim object that has 1 date member variable called claimRequestDate I want to achieve a rule that if the claimRequestDate is 65 days old from now then fire that rule I want to achieve like if (now - claimRequestDate) 65 then fire the rule I want the 65 number to be in the rule data so that the business analyst can change it at will Has anyone tried this? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Date-Condition-in-Decision-tables-tp2565936p2565936.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] JBPM5(Drools Flow 5.2.0.M1) - Threading model
Hi, in our projects we use the HttpInvoker component of Spring to interact with our remote KnowledgeBase through HTTP, which means JBPM5 is deployed in a servlet container. Our Websphere admin is afraid that JBPM5 creates its own threads instead of using the thread provided by the container. In short: - Does JBPM5 always executes in the thread of the caller ? - What is the purpose of the 'multithread' element in drools-spring.xsd (drools-spring-5.2.0.M1.jar) ? I cannot find answers in the documentation :-( Also, it would be a good idea to document the XSD like Spring does with xsd:documentation / tags. Thanks to the community, Max -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/JBPM5-Drools-Flow-5-2-0-M1-Threading-model-tp2566627p2566627.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
Re: [rules-users] Date Condition in Decision tables
lets say instead of =now() I am using a user-specified date(usd). I want to calculate (usd - claimRequestDate) in the Condition something like usd - ClaimREquestDate) $param I the data for that condition I want to put an integer say 65 - the rule should fire when the condition is met -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Date-Condition-in-Decision-tables-tp2565936p2566732.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
Re: [rules-users] Date Condition in Decision tables
OK, in DRL terms this would be something like this (I've not checked the syntax, but it gives you an idea):- function boolean isTooOld(Calendar usd, Calendar crd, int age) { crd.add(Calendar.DAY_OF_YEAR, age); return crd.after(usd); } rule old claims when Parameters( $usd : userSpecifiedDate, $param : maxAge ) Claim( $crd : claimRequestDate ) eval(isTooOld( $usd, $crd, $param ) ) then System.out.println(that's an old claim); end I used a function to increase readibility. You could have placed the logic in-line or a helper function on a domain object. You should then be able to convert this into a decision table. With kind regards, Mike On 24 February 2011 11:08, sdinoo sdi...@gmail.com wrote: lets say instead of =now() I am using a user-specified date(usd). I want to calculate (usd - claimRequestDate) in the Condition something like usd - ClaimREquestDate) $param I the data for that condition I want to put an integer say 65 - the rule should fire when the condition is met -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Date-Condition-in-Decision-tables-tp2565936p2566732.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] spring-drools api exception: Invalid property 'knowledgeAgent'
kagent property of StatelessKnowledgeSessionImpl is only used by the kagent itself. This property is not even exposed through StatelessKnowledgeSession interface. So I'm not sure whether this should be configurable through spring or not. If you are trying to configure a Stateful session from a kbase that is updated by a kagent, you could try this configuration: drools:ksession id=ksession1 type=stateful kbase=kbase1/ drools:kbase id=kbase1/ drools:kagent id=kagent1 kbase=kbase1 new-instance=false drools:resources drools:resource type=DRL source=. / drools:resource type=DRL source=. / ... /drools:resources /drools:kagent Best, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Wed, Feb 23, 2011 at 5:29 PM, mmjose26 mmjos...@yahoo.com.mx wrote: Hi, Im runnung test cases in Spring Drools 5.2M1 and I have this exception: Exception in thread main org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ksession2': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'knowledgeAgent' of bean class [org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory]: Bean property 'knowledgeAgent' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? it happens with testAgents method If you change the source code located in the drools-spring component in class org.drools.container.spring.namespace.KnowledgeSessionDefinitionParser.java: // find any kagent's for the current kbase and assign for ( String beanName : parserContext.getRegistry().getBeanDefinitionNames() ) { BeanDefinition def = parserContext.getRegistry().getBeanDefinition( beanName ); if ( KnowledgeAgentBeanFactory.class.getName().equals( def.getBeanClassName() ) ) { PropertyValue pvalue = def.getPropertyValues().getPropertyValue( kbase ); RuntimeBeanReference tbf = (RuntimeBeanReference) pvalue.getValue(); if ( kbase.equals( tbf.getBeanName() ) ) { factory.addPropertyValue( knowledgeAgent, new RuntimeBeanReference( beanName ) ); } } } modifying: if ( kbase.equals( tbf.getBeanName() ) stateless.equals( sessionType ) ) it works, becasue only stateless sessions have knowledgeAgent property. is It Correct? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/spring-drools-api-exception-Invalid-property-knowledgeAgent-tp2562735p2562735.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Date Condition in Decision tables
It was suggested to have the usd as a fact. You could write UserParams( $usd: usd ) Claim( claimRequestDate before[65d] $usd ) This is easy to parameterize in a spreadsheet. The data for the UserParams fact could be defined in a special cell in the spreadsheet. A high-salience rule could be dedicated to its creation and insertion. -W On 24 February 2011 12:08, sdinoo sdi...@gmail.com wrote: lets say instead of =now() I am using a user-specified date(usd). I want to calculate (usd - claimRequestDate) in the Condition something like usd - ClaimREquestDate) $param I the data for that condition I want to put an integer say 65 - the rule should fire when the condition is met -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Date-Condition-in-Decision-tables-tp2565936p2566732.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Date Condition in Decision tables
Thanks Wolfgang, ultimately better than what I wrote :) 2011/2/24 Wolfgang Laun wolfgang.l...@gmail.com It was suggested to have the usd as a fact. You could write UserParams( $usd: usd ) Claim( claimRequestDate before[65d] $usd ) This is easy to parameterize in a spreadsheet. The data for the UserParams fact could be defined in a special cell in the spreadsheet. A high-salience rule could be dedicated to its creation and insertion. -W On 24 February 2011 12:08, sdinoo sdi...@gmail.com wrote: lets say instead of =now() I am using a user-specified date(usd). I want to calculate (usd - claimRequestDate) in the Condition something like usd - ClaimREquestDate) $param I the data for that condition I want to put an integer say 65 - the rule should fire when the condition is met -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Date-Condition-in-Decision-tables-tp2565936p2566732.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Check all elements of a list (Drools Expert)
Hi! I'm trying to write rules in Drools Expert. In the when part of the rule, I check some properties of an Application object. This object contains a List and I would like to check if a bunch of rules apply to all objects of SomeOtherType in this list. The rule should fire only when the constraints are valid for ALL objects in that list. How could this be done? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Check all elements of a list (Drools Expert)
Check out the forall conditional element: http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e4632 Good luck! Steve rules-users-boun...@lists.jboss.org wrote on 02/24/2011 09:45:16 AM: From: Petr Chelčický petr.chelci...@centrum.cz To: rules-users@lists.jboss.org Date: 02/24/2011 09:49 AM Subject: [rules-users] Check all elements of a list (Drools Expert) Sent by: rules-users-boun...@lists.jboss.org Hi! I'm trying to write rules in Drools Expert. In the when part of the rule, I check some properties of an Application object. This object contains a List and I would like to check if a bunch of rules apply to all objects of SomeOtherType in this list. The rule should fire only when the constraints are valid for ALL objects in that list. How could this be done? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Check all elements of a list (Drools Expert)
Thanks. The object from the list are not in working memory though. Is it possible to combine it with from keyword? __ Od: Steve Ronderos steve.ronde...@ni.com Komu: Rules Users List rules-users@lists.jboss.org Datum: 24.02.2011 16:58 Předmět: Re: [rules-users] Check all elements of a list (Drools Expert) Check out the forall conditional element: http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e4632 Good luck! Steve rules-users-boun...@lists.jboss.org wrote on 02/24/2011 09:45:16 AM: From: Petr Chelčický petr.chelci...@centrum.cz To: rules-users@lists.jboss.org Date: 02/24/2011 09:49 AM Subject: [rules-users] Check all elements of a list (Drools Expert) Sent by: rules-users-boun...@lists.jboss.org Hi! I'm trying to write rules in Drools Expert. In the when part of the rule, I check some properties of an Application object. This object contains a List and I would like to check if a bunch of rules apply to all objects of SomeOtherType in this list. The rule should fire only when the constraints are valid for ALL objects in that list. How could this be done? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Knowledge Agent example
Hi All, I was trying to get going with KnowledgeAgent and trying to understand how rules changes at runtime.Can anyone provide me a example or a basic tutorial for changing the rules at runtime so the knowledgebase is recreated. Any pseudocode can also be helpful. I tried to find googling, but there is only theory which is a bit complicated. Any help would be appreciated. RegardsVamshidhar ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Check all elements of a list (Drools Expert)
You can count (using the accumulate function) all objects of SomeOtherType. Then, you can count (again, using the accumulate function) all object of SomeOtherType meeting all the constraints. For better performance (if this is an issue) you might use the stepwise form of accumulate, ultimately returning a compound object containing both counts, or implement a custom accumulate function. -W 2011/2/24 Petr Chelčický petr.chelci...@centrum.cz Hi! I'm trying to write rules in Drools Expert. In the when part of the rule, I check some properties of an Application object. This object contains a List and I would like to check if a bunch of rules apply to all objects of SomeOtherType in this list. The rule should fire only when the constraints are valid for ALL objects in that list. How could this be done? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Knowledge Agent example
Here you can find some tests related to KnowledgeAgent: https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/test/java/org/drools/agent These tests show the expected behaviour of KnowledgeAgent. In the tests, the file scanning if on demand. If you want to scan resources periodically you can use ResourceChangeScannerService and ResourceChangeNotifierService: ResourceFactory.getResourceChangeNotifierService().start(); ResourceFactory.getResourceChangeScannerService().start(); Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2011/2/24 vamshidhar reddy chitti chvreddy2...@yahoo.de Hi All, I was trying to get going with KnowledgeAgent and trying to understand how rules changes at runtime. Can anyone provide me a example or a basic tutorial for changing the rules at runtime so the knowledgebase is recreated. Any pseudocode can also be helpful. I tried to find googling, but there is only theory which is a bit complicated. Any help would be appreciated. Regards Vamshidhar ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] WorkflowProcessInstance in DRL
Hello, I am having some problems using WorkflowProcessInstance in rules. I have searched and not been able to find an answer to my question. I am attempting to use rule flows to define business processes and rules both in ruleflow groups to be executed on demand of the process and outside of a ruleflow group for global rules and to potentially direct the ruleflow(/process) is to run. Many of these processes are comprised of subprocesses which I have been using sub flows to model. I have used flow variables to store some minimal information about the process such as what the process ID corresponds to in the existing data model I am working with. My intent was so that I could use a single rule flow group in many rule flows to extract information from the database for the corresponding process ID in the working memory (this extraction would also depend on other facts in the working memory). I've inserted the WorkflowProcessInstance by using an action node in the parent process and it seems to work fine. My problem arises when I am then in a child process/subflow and try to invoke this single rule flow group with a different process ID in the flow variable, there are no activations. I think this happens because the WorkflowProcessInstance has not been updated in working memory so it will not know that there might be a new process ID stored in the flow variable (it has the same name in both flows as it is meant to represent the same thing). If I insert the WorkflowProcessInstance again in the sub flow I get activations in the rule flow group for facts in the working memory associated with both the parent and child sub flow which almost makes sense except for this: We have added special logic to make sure that a variable processInstance of type WorkflowProcessInstance will only match to the current process instance and not to other process instances in the Working Memory. It seems that it is matching both instances of WorkflowProcessInstance. I use the convention of starting variable names from the LHS of a rule with a $ but I have tested it without and I get the same result. Is this expected behaviour? An alternative I've been trying to figure out is how to update the WorkflowProcessInstance in working memory in the child process. Since it is actually a different object I'm unsure how to do this. Should I retract all instances and then insert the current? Is there a way to do this more cleanly than looking through all working memory objects and checking their type in an action node? Finally (or perhaps firstly...), am I going about this correctly? Cheers, Gareth ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Question about in XML: literal-restriction on null value
Dear all, My system is transforming internal data structure to drools rule language XML file. For particular evaluation on a string field, how can I do so happen the evaluating value is one of the keywords? For example, I need to check if keyValue==null In rule language in XML, through the XmlDumper, field-constraint field-name=keyValue literal-restriction evaluator=== value=null / However, this is the same for evaluation of keyValue==null //check if keyValue is null or not Would someone know how to tell the engine the different scenario in rule language XML file, evaluate on the content, and nullable of the field? Thanks a lot for your help -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-in-XML-literal-restriction-on-null-value-tp2572293p2572293.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
Re: [rules-users] Question about in XML: literal-restriction on null value
Superficially, his is a bug in XmlDumper, but it cuts a little deeper - first look I don't see that the internal representation of String values such as null or true or false is possible for literal constraints. (I'll open a JIRA forthwith.) You have these two options as a workaround: (1) Create a global String strnull and initialize it with the String null ksession.setGlobal( strnull, null ); (2) Use keyValue== (null) which Xml-dumps into a different (correct) representation. -W On 25 February 2011 02:32, Christina Lau lau.christ...@hit.com.hk wrote: Dear all, My system is transforming internal data structure to drools rule language XML file. For particular evaluation on a string field, how can I do so happen the evaluating value is one of the keywords? For example, I need to check if keyValue==null In rule language in XML, through the XmlDumper, field-constraint field-name=keyValue literal-restriction evaluator=== value=null / However, this is the same for evaluation of keyValue==null //check if keyValue is null or not Would someone know how to tell the engine the different scenario in rule language XML file, evaluate on the content, and nullable of the field? Thanks a lot for your help -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-in-XML-literal-restriction-on-null-value-tp2572293p2572293.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Red Hat Accenture: BRMS BPMS Event (London)
http://blog.athico.com/2011/02/red-hat-accenture-brms-bpms-event.html --- Red Hat Accenture: BRMS BPMS Event (London) Posted by Mark Proctor Registration Page: https://engage.redhat.com/forms/UK_Event_Accenture290311 Join Red Hat and Accenture on Tuesday 29th March at Accenture Old Bailey to understand how Business Rules Management Systems (BRMS) and Business Process Management Systems (BPMS) can help businesses leverage technology more effectively and increase productivity. See how Enterprise Open Source is leading the way with powerful capabilities and industry-leading innovation. There will be 2.5 hours of technical talks. Speakers: Mark Proctor - Drools Co-Founder and Poject Lead Kris Verlaenen - jBPM Lead Michael Anstis Geoffrey de Smet Talks: Introduction to Rule Based Systems (Mark Proctor) Introduces Drools and explains what a rule based system is and how it works Why BPMN2 Matters (Kris Verlaenen) jBPM5 has just been released as premier Open Source BPMN2 implementation. Come and hear how this changes your whole legacy approach to BPM. Using Guvnor for Enterprise Systems (Geoffrey de Smet) Guvnor provides a web interface to your knowlege systems, such as rules and bpm. This talk provides a gentle introduction into Guvnor and how to use it. Decision Tables in Depth (Michael Anstis) Decision Tables is now a major focus for us, we want to show you why we'll have the slicket decision table environment out there. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users