[rules-users] Using object.getter in Decision table

2011-10-04 Thread jilani
Hi, I have a scenario, where for decision table I will inject one object which holds all facts. Using those facts the decision table has rules. How to retrieve the child fact from parent in decision table. sample for this is as follows Java Code snippet: DataObject dataObj = new DataObject();

Re: [rules-users] Is it possible to retrieve the collection of Conditions from DecisionTable?

2011-10-04 Thread Toni Rikkola
If you take a look at the Verifier it goes through the Drools AST with a visitor pattern. It starts by using getting the PackageDescr using DrlParser, this uses Drools internals so be warned that it might change in the future. Reader drlReader = new InputStreamReader( stream ); PackageDescr

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Wolfgang Laun
I have found that any serious Drools application should write and deploy a consequence exception handler of its own. Perhaps you look at my modest efforthttp://members.inode.at/w.laun/drools/CustomConsequenceExceptionHandlingHowTo.html- I think it is still compatible. Any feedback welcome ;-) -W

Re: [rules-users] Using object.getter in Decision table

2011-10-04 Thread Swindells, Thomas
Why are you using an extra data object -its far easier if your facts are actually facts in the working memory. What you have written as your rules is totally incorrect - you seem to be trying to write java method calls not rule statements. My advice is to a) try writing the same rule as a drl

Re: [rules-users] Is it possible to retrieve the collection of Conditions from DecisionTable?

2011-10-04 Thread Wolfgang Laun
Since Toni confirms me even before I post this on the list: Using the Verifier way to get at a column from some spreadsheet is not for the faint at heart. In addition to what Toni wrote: source code in the Drools AST corner isn't even commented. -W 2011/10/4 Toni Rikkola toni.rikk...@gmail.com

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Swindells, Thomas
That looks really useful, I didn't know that you could do that! Any chance you could submit it as a patch to get the default version enhanced to do that! Thanks, Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 04

Re: [rules-users] Guvnor and Axis2

2011-10-04 Thread Mario Viertel
Hi, thanks for the reply. I had it already done. Because of its the better way to interact with guvnor. Mario Am 01.10.2011 04:08, schrieb jliu: On 2011/9/29 15:46, Mario Viertel wrote: Hi, I am using an own web service (Axis2; tomcat 6) to interact with Guvnor. All drools related jars

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Mark Proctor
On 04/10/2011 08:56, Swindells, Thomas wrote: That looks really useful, I didn't know that you could do that! Any chance you could submit it as a patch to get the default version enhanced to do that! More than happy to except pull requests :) Mark Thanks, Thomas

Re: [rules-users] Embed BRL Editor in application

2011-10-04 Thread Michael Anstis
Have you read thishttp://www.plugtree.com/guvnor-embed-asset%E2%80%99s-editor-in-your-application/ ? On 4 October 2011 06:35, shubhranshu shubhranshu.sw...@gmail.com wrote: Hello everybody, I am new to drools. I want to embed the BRL Editor in our application. I have read somewhere that it

Re: [rules-users] Is it possible to retrieve the collection of Conditions from DecisionTable?

2011-10-04 Thread Swindells, Thomas
Looking at the SpreadsheetCompiler class you can do something like the following /** * Generates DRL from the input stream containing the spreadsheet. * * @param xlsStream *The stream to the spreadsheet. Uses the first worksheet found *for the

Re: [rules-users] Using object.getter in Decision table

2011-10-04 Thread jilani
Thank You for your reply. I am trying to access all the facts through one fact, actually the scenario is we have multiple screens in our application and each screen will have multiple fields where we want to show/hide the screen/field based on data provided in screens. So Instead of sending

Re: [rules-users] Using object.getter in Decision table

2011-10-04 Thread Swindells, Thomas
The best place to start is the drools documentation http://www.jboss.org/drools/documentation particularly the expert guide. This shows both drl and spreadsheet syntax and examples. You are getting the exception because the first line of the condition should just be an object restriction eg

Re: [rules-users] Embed BRL Editor in application

2011-10-04 Thread Tihomir Surdilovic
There is a blog and a video on this at http://blog.athico.com/2011/04/using-oryx-designer-and-guvnor-in-your.html. It includes the source for a sample application (seam2/richfaces) that is shown in the video and uses the embedded Guvnor editors. Hope this helps. On 10/4/11 4:19 AM, Michael

Re: [rules-users] Using object.getter in Decision table

2011-10-04 Thread jilani
Thomas, The best place to start is the drools documentation http://www.jboss.org/drools/documentation particularly the expert guide. This shows both drl and spreadsheet syntax and examples. - Yes. I have downloaded all the drools info from here. then I got one expert pdf document in reference

Re: [rules-users] DROOLS PLANNER - getting started - drools-eclipse-plugin

2011-10-04 Thread vik
:( what I have to do with this error: Exception in thread main java.lang.IllegalArgumentException: Problem reading unsolvedSolutionFile: data\travelingtournament\smart\unsolved\1-nl14.xml at

Re: [rules-users] DROOLS PLANNER - getting started - drools-eclipse-plugin

2011-10-04 Thread Geoffrey De Smet
Same cause: the working directory of a benchmarkerApp should be set to the directory container the data dir. Op 04-10-11 14:44, vik schreef: :( what I have to do with this error: Exception in thread main java.lang.IllegalArgumentException: Problem reading unsolvedSolutionFile:

[rules-users] IllegalStateException happens when ResourceChangeScanner working on Version 5.3.0.CR1

2011-10-04 Thread Oliver Liu
Hi Guys, I want to upgrade drools from 5.1.1 to 5.3.0 CR1, but i found ResourceChangeScanner could't work. In version 5.1.1, i wrote this code to get a KnowledgeAgent KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(ReleaseAgent);

Re: [rules-users] Guvnor - Operations with snapshots

2011-10-04 Thread Demian Calcaprina
Thanks Jervis. I currently use Guvnor 5.2, and saw that I can use version so I will try to use them. - Is there something I will be missing about versions, by using 5.2? - Do you know when a new version is created? With Snapshots, I could choose when to create a new one. How about versions?

[rules-users] Looping in When part

2011-10-04 Thread rahulkrishnan
Hi I want to match a string with the contents of hashmap. The process is like this. Let the string is abcd First it will search for abcd in the map if found i have to assign it to a variable else i has to remove the last alphabet (abc) and have to match with hashmap like is the process. My

Re: [rules-users] Looping in When part

2011-10-04 Thread Wolfgang Laun
You'll need 2 rules, one for truncating a key that does not match and another one for handling the match. If you have to handle absolute failure (not even a matches) you'll need a third rule and a more complex fact for storing the original and the truncated string. These 2 rules are untested:

[rules-users] Are retracted events garbage collected in stateful session?

2011-10-04 Thread John
I am inserting a high volume of relatively large objects into a long-running StatefulKnowledgeSession in Stream mode. I use a rule to start a jbpm process when each event is received, and the last step retracts the event. I assumed these were all being garbage collected until my app server

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Jamie
Thanks for all of the feedback. I haven't tried W's handler, but I'm planning to. I did take Edson's advice and was able to get some more info. It appears to involve the interaction between 3 rules. For background, this is a fraud detection application. Under certain conditions, we need to

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Wolfgang Laun
Just saw and fixed an invalid import for ConsequenceExceptionHandler. -W On 4 October 2011 18:00, Jamie js...@llbean.com wrote: Thanks for all of the feedback. I haven't tried W's handler, but I'm planning to. I did take Edson's advice and was able to get some more info. It appears to

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Edson Tirelli
The difference in that area from 5.2 to 5.3 is that in 5.3 the interaction between Terminal Nodes and the agenda was refactored into a listerner pattern . This is required for future features we are working on. It seems the change introduced the regression. This is probably enough info to

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread lhorton
definitely a much improved handler. in case someone who reads this is using spring to load droools, here is an example of loading a different handler for a knowledge base in the xml: drools:kbase id=workflowKnowledgeBase node=droolsClusterNode1

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-04 Thread Mark Proctor
On 04/10/2011 20:17, Edson Tirelli wrote: The difference in that area from 5.2 to 5.3 is that in 5.3 the interaction between Terminal Nodes and the agenda was refactored into a listerner pattern . This is required for future features we are working on. It seems the change introduced the

[rules-users] rule limit

2011-10-04 Thread Bobby Richards
Is it possible to limit the number of rules in a drl file? Thanks, Bobby ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-04 Thread alopez
Good news, I followed your advice and patched drools-core to prevent this, focusing on removing all listeners: AbstractWorkingMemory.java, line 1246: for ( Iterator it = this.__ruleBaseEventListeners.iterator(); it.hasNext(); ) { this.ruleBase.removeEventListener( (RuleBaseEventListener)

Re: [rules-users] rule limit

2011-10-04 Thread Ansgar Konermann
Am 04.10.2011 23:27, schrieb Bobby Richards: Is it possible to limit the number of rules in a drl file? Yes. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Guvnor: Rules compilation error

2011-10-04 Thread Prashanth
Hi, In-spite of having the jar loaded, and having them available in the Drools Guvnor and able to write rules with “zero ” errors in verification, Rule compilation fails during validation after writing rules, says “Cannot resolve classname” for all those classes that have been imported and

Re: [rules-users] Guvnor: Rules compilation error

2011-10-04 Thread Toni Rikkola
Hi, I suggest that you open a Jira for this. https://issues.jboss.org/browse/GUVNOR If possible, create a small repository export that we can use to reproduce this. Toni On Oct 5, 2011, at 6:45 AM, Prashanth wrote: Hi, In-spite of having the jar loaded, and having them available in the