[rules-users] Multiple worksheet decision tables

2009-10-01 Thread Swindells, Thomas
Is it possible to get Drools to load all the rules table within an excel spreadsheet if they are spread across multiple worksheets? From the documentation I have read it appears drools will only load the rules from the first/a specified worksheet. The only way I have found to do it is to load

[rules-users] Decision Tables agenda group

2009-10-02 Thread Swindells, Thomas
I've been trying to get agenda groups working and after a bit of poking around have realised that agenda group support is broken. Looking on jira somebody has already raised the bug and supplied a simple patch (https://jira.jboss.org/jira/browse/JBRULES-2208) when is this patch likely to be

Re: [rules-users] Execution time for drools5.0 against large data size

2009-11-04 Thread Swindells, Thomas
Have you tried removing the System.out.println statement from the rule? Writing to the console can be very very slow. You could also get rid of the audit logger which could be spitting out a lot of data into a file (or it may not, I've not actually tried it). Thomas -Original Message-

Re: [rules-users] Suppressing reciprocal matches

2009-11-09 Thread Swindells, Thomas
There is a bug here though if the hashcodes are equals. You need to make it $w : Widget( $name : name ) Widget( this != $w, hashCode = $w.hashCode, name == $name ) And live with the fact there is a chance that the rule does fire twice - which is probably a better scenario that it failing

Re: [rules-users] Multiple Excel decisiontables - a bug

2009-11-18 Thread Swindells, Thomas
My advice is always to include a rulename (NAME) column and explicitly specify all the rule names. That way the name of the rule is deterministic and doesn't suddenly change if someone happens to insert a rule in the row above - this is particularly useful if you log or audit the rules that

Re: [rules-users] Multiple Excel decisiontables - a bug

2009-11-19 Thread Swindells, Thomas
on it but as it is currently running behind I'm not sure if that is going to happen or not. Thomas Swindells, Thomas wrote: My advice is always to include a rulename (NAME) column and explicitly specify all the rule names. That way the name of the rule is deterministic

[rules-users] from clause in decision table.

2009-11-19 Thread Swindells, Thomas
I've got a fact which contains a collection (a set of strings to be precise). I want to write a rule which fires if there are any invalid values (where the valid values are defined as a list). What I'm trying to do is express this within a decision table. Expressed as a drl rule the following

[rules-users] Activation groups (xor-group)

2009-11-25 Thread Swindells, Thomas
Please could someone clarify exactly how activation-groups work. My understanding of them is that if a set of rules are all in the same activation group then only one of them will fire. Is this correct? In particular what happens if a rule becomes deactivated, can another rule in the same

Re: [rules-users] Can we use 'from' CE in Decision Tables ?

2009-12-03 Thread Swindells, Thomas
Hi Gurvinder. Not sure where new lines have gone from your email - it makes it very hard to read! I've also been working on a project which uses decision tables and I couldn't find any way to use from statements either. I'm hoping to get some time within the project to work on the drools

Re: [rules-users] Need help related to collection of data accessingin rule file.

2009-12-04 Thread Swindells, Thomas
I'd agree, and to join up with the other thread is the exact reason why we need some decent 'design pattern' documentation to explain what does and doesn't easily work in drools. Depending what you are trying to do you may be able to use eval to perform the logic for you, though this will

Re: [rules-users] Need help related to collection of data accessingin rule file.

2009-12-04 Thread Swindells, Thomas
doesn't work easily in drools. I think this is the most important category. Every framework has a degree of flexibility and whilst drools is extremely flexible, the consequences may not be that pleasant. 2009/12/4 Swindells, Thomas tswinde...@nds.com I’d agree, and to join up

Re: [rules-users] rule on Array of custom Object

2009-12-14 Thread Swindells, Thomas
Have you tried making your classes beans? Eg adding getters and setters. (As a style guide in java you should generally avoid public fields and class names should start with a capital letter). This would give you the following: public class Message { private Numbers[] numbersArray;

Re: [rules-users] A quick survey of application areas

2009-12-18 Thread Swindells, Thomas
Broadcast: asset metadata manipulation and validation From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 17 December 2009 08:24 To: Rules Users List Subject: [rules-users] A quick survey of application areas Folks who have a

Re: [rules-users] Re-sending : Unexpected MVEL plus operator behavior(string-to-double), in consequence block

2009-12-21 Thread Swindells, Thomas
My gut instinct would say that this is possibly correct. I've not looked at the mvel code but if all your types are strings then it makes sense for it to pick the most type specific operator first. Multiplication only works on numbers so it attempts to convert them but the + operator is defined

Re: [rules-users] verifying 'is not null' in decision table?

2009-12-22 Thread Swindells, Thomas
priority is Date 1. If Date 1 and Date 2 are not null and the rest are null then my priority is Date 2 and so no.so we are looking at 16 different possibilites and the prioritieshow can i set the priority in this case... Thanks Swindells, Thomas wrote: The key thing

Re: [rules-users] compiling DROOLS 5

2010-01-06 Thread Swindells, Thomas
This looks to be a maven issue. The most likely cause is probably that your networks proxy hasn't been configured properly in your maven settings.xml file, alternatively your proxy may be blocking the downloads or you were just unlucky and the site was down! Thomas From:

Re: [rules-users] Drools Guvnor installation on weblogic

2010-01-06 Thread Swindells, Thomas
I believe currently you can only apply rules on POJO, you could use JAXB to convert from XML to POJO but this doesn't work very well on deeply nested or complex data structures if you wish to perform updates on the data. XML support is something I've been pondering over as to how easy it would

Re: [rules-users] Hashmap in rules

2010-01-06 Thread Swindells, Thomas
It would help if you specify what the exact error message you are getting. Have you imported the required classes? From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Da Sun Sent: 06 January 2010 14:31 To: rules-users@lists.jboss.org Subject:

Re: [rules-users] Planner/solver - POSITIVE scoring...

2010-01-08 Thread Swindells, Thomas
I'd vote to keep it on here, the traffic isn't that high and people like me can learn about what other features exist. Plus it makes searching for answers so much easier. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-

Re: [rules-users] Decision table accessing my own methods

2010-01-08 Thread Swindells, Thomas
Have you tried using 'this.hasStudent($param)'? Or just writing 'hasStudent($param). Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of djb Sent: 08 January 2010 16:30 To: rules-users@lists.jboss.org

Re: [rules-users] Decision table accessing my own methods

2010-01-11 Thread Swindells, Thomas
The most likely reason for this is that your rule action goes and updates classroom which then causes the rule to be evaluated and matched again. -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of djb Sent: 11

Re: [rules-users] infinite loop in decision table

2010-01-20 Thread Swindells, Thomas
The easiest pattern is to create a GroupLatch helper object has a name. Then add two columns, a Condition column which checks that there doesn't exist a Latch with the given name, and an action column which inserts a new Latch with the given name into the working memory. If multiple rules have

Re: [rules-users] infinite loop in decision table

2010-01-26 Thread Swindells, Thomas
As I see it you have a number of options, As you have said you could scope your latches so that they only apply to a particular object, rather than generating a UUID you can probably get away with using the object reference itself; however you will also need to watch out for memory leaks, this

Re: [rules-users] Checking in one rule the result of another rule

2010-02-01 Thread Swindells, Thomas
Sounds like you want to use truthmaintenance and probably insertlogical. There's a good tutorial/description on it here http://feeds.athico.com/~r/DroolsRSS/~3/BbuYJS41FDc/drools-inference-and-truth-maintenance.html Basically, in your cases, you would insert a 'result' object with a given name

Re: [rules-users] Weblogic rules to Drools rules.

2010-02-01 Thread Swindells, Thomas
Is there any documentation on how to write these custom evaluators anywhere? I don't recall seeing them mentioned anywhere before. Thanks, Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: 31 January 2010 16:24 To:

Re: [rules-users] Are XOR-GROUP and AGENDA-GROUP supported in DecisionTables ?

2010-02-02 Thread Swindells, Thomas
XOR-Groups are supported using a column of ACTIVATION-GROUP. AGENDA-GROUP is meant to be supported but in fact isn't - the column name works but in fact aren't https://jira.jboss.org/jira/browse/JBRULES-2208. There is a patch against the issue so I don't know if it has been fixed in trunk, I've

Re: [rules-users] Reading DRL file with large number of rules

2010-02-08 Thread Swindells, Thomas
But isn't the way Rete work is that it creates a decision tree to work out which rules to evaluate. Right at the top of the tree will be a check on the fact type that is being inserted, as the fact being inserted doesn't match against any of the 20k rules (it is a totally different object

Re: [rules-users] Rules writing best practice?

2010-02-09 Thread Swindells, Thomas
Sounds like a sensible document to have. The hints that I have picked up (which may or may not be accurate). Make facts as small and isolated as possible - the more fields a fact has then the more rules that may be effected if any one of those fact fields are updated. From (and even more so

Re: [rules-users] Stumped by error in rule

2010-02-09 Thread Swindells, Thomas
Have you tried: Applicant ( $ApplicantNumber : applicantNumber ) Eg your field should start with a lower case letter? Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of tom.e.mur...@wellsfargo.com Sent: 09 February 2010 11:44 To:

[rules-users] Flow Work Items - SOAP

2010-02-09 Thread Swindells, Thomas
Does drools have a work item which is able to act as a client to a soap service? Also what other work items dose flow support and where is it documented. In eclipse I just see work items for email and log but on the main drools flow page (http://jboss.org/drools/drools-flow.html) it mentions a

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Swindells, Thomas
If it works fine with an and operator then I’d imagine that startDate $regDate returns false, with an this would abort evaluation immediately but with an or it would mean that startDate endDate is evaluated and so presumably it is this bit that is throwing the NPE. I’d imagine that the most

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Swindells, Thomas
Have you got the stack trace, that may give a clue? Also what are the actual values of start date and end date? Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of dhari Sent: 23 February 2010 11:30 To: rules-users@lists.jboss.org

Re: [rules-users] memberOf mvel list

2010-02-23 Thread Swindells, Thomas
Am I being blind or are in and not in not actually documented in the drools expert user guide? In particular the fact that the syntax for the list is to put it in round brackets (1,2,3) and not the square brackets [1,2,3] which you would expect from the mvel documentation. Also why can't

Re: [rules-users] from keyword does not actually check types?

2010-03-03 Thread Swindells, Thomas
I'm not convinced about the silent failure argument as I don't see how it is any different from the silent failure you get if the type doesn't exist in the 'main' knowledge base - this is probably because the way I conceptualize the from keyword is to say don't use the normal knowledge base but

Re: [rules-users] Drools Roadmap - Planned Release 5.1 release date

2010-03-04 Thread Swindells, Thomas
From what Mark Proctor posted in another thread: Edson has just merged the Rete algorithm updates into trunk, we have one remaining issue with planner and after that we 5.1M2. If thins go well we should 5.1 final this month. -Original Message- From:

Re: [rules-users] How to traverse the Collection by index

2010-03-08 Thread Swindells, Thomas
One of the big challenges of using drools is thinking declaratively and not the iterative method of normal programming. Your first paragraph actually pretty much sums up your rules nicely. One thing to comment on is that working on collections (using the from keyword) isn't a particularly

Re: [rules-users] Exception during insert

2010-03-19 Thread Swindells, Thomas
What output do you get if you do System.out.println(ucells[i].getClass().getName())? My guess is that you either don't actually have an array of type UtranCell's or you haven't imported UtranCell correctly. Thomas From: rules-users-boun...@lists.jboss.org

Re: [rules-users] Exception during insert

2010-03-19 Thread Swindells, Thomas
Odd, Looks like it is a problem in the internal of mvel, there's two things I'd suggest you could try: Firstly try change it to be something similar to: for (int i=0; iucells.length; i++) { UnltranCell toInsert = ucells[i]; insert( toInsert ); } If you are lucky this may

Re: [rules-users] Mechanism to prevent redundant inferences

2010-03-22 Thread Swindells, Thomas
Presumably all your RHS do is insert your Proven objects. If this is the case then my first question is do you actually need to put in an optimisation here? How much is the work of evaluating a few extra rule nodes compared to the work and memory that will be required to evaluate the shadow

Re: [rules-users] NullPointerException while inserting Facts

2010-03-23 Thread Swindells, Thomas
The most likely reason for this is that one of your rules is trying to evaluate a value which is null. The when part of a rule is evaluated as the fact is inserted and may be evaluated even if the then part will never be reached. Looking at your stack trace it looks like the rule involved may

Re: [rules-users] Combined OR/NOT Rules results in NullPointerException

2010-03-29 Thread Swindells, Thomas
Have you tried removing the or and just splitting it into two separate rules? From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Sebastian Furth Sent: 29 March 2010 09:37 To: Rules Users List Subject: [rules-users] Combined OR/NOT Rules results in

Re: [rules-users] question about subscription to mailing list

2010-04-08 Thread Swindells, Thomas
It's not a forum it is a mailing with a forum user interface bolted on the front. One option is for you to use the digest mode which sends you all the messages in a single digest format, the other option is to setup mail rules to delete everything you don't care about. You can see more here

Re: [rules-users] call drools rules from java servlet or jsp

2010-04-08 Thread Swindells, Thomas
The same way you call it from any other code? Create a knowledge session and start using it as per the documentation here: http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e237 If you want to share the knowledge session then using it is just the

Re: [rules-users] Drools Flow: Skipping some LHS evaluations attime of insert

2010-04-08 Thread Swindells, Thomas
If the aim is purely optimization then in that case it won't work (even ignoring the fact you haven't told drools you are updating $co). Activations are evaluated first then rules are fired. If an activation updates an object then activations are recalculated. Are you actually having

Re: [rules-users] How to do operator such as is one of (xx, yy, zz) in a decision tablee

2010-04-09 Thread Swindells, Thomas
The easiest way to do this is to use regular expressions with matches Eg state matches AZ|CA|NV if you don't care about the case then use (?i)AZ|CA|NV You can find details of regex here http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html There are also the in and memberof

Re: [rules-users] Tuples in Agenda Item.

2010-04-09 Thread Swindells, Thomas
Presumably ConcreteType1 extends BaseType. In this case the rule will evaluate true as ConcreateType1 IS A BaseType and therefore the same object matches both the o1 condition and the o2 conditions. This is why the tuple contains only 1 entry as there was only one unique object matched (o1 ==

Re: [rules-users] How to do Exception Handling???

2010-04-12 Thread Swindells, Thomas
I'm not convinced that converting a java exception to a process fault with the same name is a solid behaviour. In java it is perfectly permissible and valid for a piece of code to change the exception it throws to a subclass of that exception (eg throw a FileNotFoundException instead of a

Re: [rules-users] high memory usage for rules with more than 6 facts ascondition

2010-04-14 Thread Swindells, Thomas
What conditions are you placing on the rule? If you haven't got any conditions on them then the number of possible combinations (and so activations) that the rule can match will grow exponentially. If you rule has 10 objects all of the same type and no conditions preventing them from being set

Re: [rules-users] Resuming Flow: NPE when completing a work item

2010-04-14 Thread Swindells, Thomas
What is in your hashmap? Hashmap is only serializable if all the keys and values within it are also serializable. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of slawlor Sent: 14 April 2010 12:26 To:

Re: [rules-users] DRools with FLEX LCDS

2010-04-14 Thread Swindells, Thomas
This is probably better asked on the LCDS mailing lists, as you correctly say you can just treat drools as any other java application. What you will probably need to do is make sure you have all the drools jar you project depends on in the classpath of lcds, you may get away with putting them

Re: [rules-users] Rules Not executing

2010-04-20 Thread Swindells, Thomas
And are you actually using drools flow? If not you should remove the ruleflow-group. Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 20 April 2010 08:14 To: Rules Users List Subject: Re: [rules-users] Rules Not

Re: [rules-users] Newbie on drools and servlets

2010-04-22 Thread Swindells, Thomas
As ever the answer is it depends on how you want to do it and where you want to put the logic. I'm not convinced that necessarily need to use flow, instead just use a stateful knowledge session (one per client session). Your servlet populate it with your constraints and whatever, runs a query

Re: [rules-users] Drools Flow: Another problem with Human Task

2010-04-23 Thread Swindells, Thomas
Probably not relevant but the standard language code for the UK is en-GB not en-UK, Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino Sent: 22 April 2010 17:22 To: Rules Users List Subject: Re: [rules-users] Drools

Re: [rules-users] How to make this rule more memory efficient?

2010-04-26 Thread Swindells, Thomas
You should probably restrict it so that $cell2 : Cell(this != $cell1) Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Ryan Fitzgerald Sent: 26 April 2010 15:34 To: rules-users@lists.jboss.org Subject: [rules-users] How to make this rule

Re: [rules-users] How to make this rule more memory efficient?

2010-04-28 Thread Swindells, Thomas
than 50% of the original, but still quadratic. -W 2010/4/26 Swindells, Thomas tswinde...@nds.com: You should probably restrict it so that $cell2 : Cell(this != $cell1) Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org

Re: [rules-users] Challenge! Using javassist and drools presents an issue with drl

2010-04-29 Thread Swindells, Thomas
Isn't the simplest solution just to add the imports at the start of the imported drl file? That is the users don't need to worry about writing the imports but before you feed the files into your code simply prepends the required imports. You can do this easily in memory with something like the

Re: [rules-users] Parallelization

2010-05-11 Thread Swindells, Thomas
I'm not a guru but I'm pretty certain all modern JVMs support multiple cores well. You will probably make sure you are using the server VM (-server) and not the client VM (assuming you are using the standard VM). Depending on what you current machine is and whether or not you have 2 cpu's or

Re: [rules-users] possible bug in latest SNAPSHOT -AccumulateFunction.init() is called when calling modify()

2010-05-12 Thread Swindells, Thomas
Why is it an issue? Your rule modifies holder so that the accumulate is no longer needed for that particular holder, presumably init is called so that the accumulator can restart its state from scratch and so release the memory it no longer needs. I don't know if it does but this would then

Re: [rules-users] Jbilling Drools performance

2010-05-17 Thread Swindells, Thomas
My advice is to try just having a single column: strValue matches $param.* you could also compare the performance of that to eval(strValue.startsWith($param)) Also presumably you are only wanting the first matching rule in your table to fire, looking at the table below drools will fire all of

Re: [rules-users] Is it possible to access created Object inside RHS???

2010-05-17 Thread Swindells, Thomas
Yes, How you do it depends on what you are wanting to do. If you just want to use the newly created object from other rules then you should insert it into the knowledge base. If you just want to pass back your newly created object into your application then the easiest way is to insert a global

Re: [rules-users] error while executing business rules

2010-05-18 Thread Swindells, Thomas
You've got a problem. Probably with what your rules are trying to do, possibly with the design of your fact class. Use a process of elimination to work out which rule is the problem and construct the simplest example you can which causes this problem. Then try working out if there is anything in

Re: [rules-users] removeKnowledgePackage Call Hangs!!

2010-05-18 Thread Swindells, Thomas
Why are you trying to remove a knowledge package while you are in the middle of running rules? I'm not a drools developer and don't know whether it has been designed to allow this area of code to be re-entrant but to me it seems like you are trying to pull the rug (or at least part of it) out

Re: [rules-users] Drools Rule Engine

2010-05-21 Thread Swindells, Thomas
-Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of ramram Sent: 21 May 2010 09:25 To: rules-users@lists.jboss.org Subject: Re: [rules-users] Drools Rule Engine Hi, I have checked the rule template. I have

Re: [rules-users] Drools Road Map ????????????

2010-05-21 Thread Swindells, Thomas
I might be wrong but I think the answer is there isn't a roadmap and concrete dates can't really exist when its a subjective of when the code has reached the milestone (there are no artificial constraints of customer deadlines to force a particular release date). What the more important

Re: [rules-users] Detecting two instances of the same eventwithFusion Rules

2010-05-26 Thread Swindells, Thomas
You can solve this if you are able to put an ordering on the Things. Eg you could have $that : Thing(...) $other : Thing(this != $that, name $that.name) This assumes that names are unique. Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf

[rules-users] Export workflow diagram.

2010-05-26 Thread Swindells, Thomas
Hi everyone, Is there any easy way to convert a workflow into an image file. The only way I've found of doing it so far is to take a screenshot of it opened in eclipse but I was wondering if anyone had any better ways of doing it? Thanks Thomas

Re: [rules-users] Export workflow diagram.

2010-05-26 Thread Swindells, Thomas
associated with the editor...next to the buttons allowing you to automatically reorganize your nodes. It exports in png De : rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] De la part de Swindells, Thomas Envoyé : mercredi 26 mai

[rules-users] Using pipelines

2010-05-30 Thread Swindells, Thomas
I've been trying to learn how to use pipelines to execute some rules. I've had a look at the JaxbSimpleJmsMessengerTest as that seemed a good place to start and copy the code from (using drools 5.0.1). However running the test doesn't seem to actually run any of the rules - I've tried adding

Re: [rules-users] Calling a rule within a rule

2010-06-02 Thread Swindells, Thomas
You can't call one rule from another as rule evaluation isn't procedural, when working with rules you are declaring what should happen in different circumstances and it's up to the rules engine to decide how to evaluate it. One very important thing to remember is that rule evaluation happens

Re: [rules-users] Using pipelines

2010-06-02 Thread Swindells, Thomas
I've still not managed to work this out, How do I actually get my rules to fire when using a pipeline? Thanks, Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Swindells, Thomas Sent: 30 May 2010 18:47 To: Rules Users List Subject

Re: [rules-users] Using pipelines

2010-06-02 Thread Swindells, Thomas
. 2010/6/2 Swindells, Thomas tswinde...@nds.commailto:tswinde...@nds.com I've still not managed to work this out, How do I actually get my rules to fire when using a pipeline? Thanks, Thomas From: rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org [mailto:rules-users

Re: [rules-users] Using pipelines

2010-06-03 Thread Swindells, Thomas
Proctor Sent: 03 June 2010 07:28 To: rules-users@lists.jboss.org Subject: Re: [rules-users] Using pipelines On 02/06/2010 11:15, Swindells, Thomas wrote: I'm not trying to fire a particular rule, I'm trying to get the pattern matching inside the knowledge session to actually run, eg the equivalent

Re: [rules-users] Using pipelines

2010-06-03 Thread Swindells, Thomas
...@lists.jboss.org] On Behalf Of Mark Proctor Sent: 03 June 2010 11:47 To: rules-users@lists.jboss.org Subject: Re: [rules-users] Using pipelines On 03/06/2010 11:05, Swindells, Thomas wrote: I tried looking for one but couldn't see one in the PipelineFactory that can be used when I've received

Re: [rules-users] Object Referencing Error

2010-06-04 Thread Swindells, Thomas
In fact in your case you when condition doesn't make any sense - B will never equal the empty string as B isn't a string. You probable want the following: rule foo when $a :A(Type == Prod , objectB == null) then B bobject = new B(); bobject.setType(Prod);

Re: [rules-users] Error Loading Multiple Input Files

2010-06-07 Thread Swindells, Thomas
This isn't really a Drools question just a basic java programming question. You are trying to read your input files from the current working directory (which defaults to the root of your project in eclipse). What you probably want to be doing is reading your files from the classpath instead.

[rules-users] Flow exception handling

2010-06-08 Thread Swindells, Thomas
Hi Everyone, I'm trying to get my head round how to use Drools Flow in a reliable manner. In particular I'm trying to understand how to defensively program against exceptions thrown within Action Nodes (eg NullPointerException). In 5.0.1 it is absolutely horrendous as if the action throws an

Re: [rules-users] alerts in drools

2010-06-09 Thread Swindells, Thomas
Or just add a global AlertNotifier alertNotifier and in your rules call alertNotifier.raiseAlert(...). Of course you will have to actually write AlertNotifier yourself to do whatever you want it to do but that is trivial as it's just a POJO. Thomas From: rules-users-boun...@lists.jboss.org

Re: [rules-users] uploading rule files dynamically

2010-06-09 Thread Swindells, Thomas
Look into the drools KnowledgeAgent api (do a google you should find old discussion/blog posts about it). Alternatively if you know where your drl files live and just want to do it at startup just use the standard File methods to list all the *.drl files in that particular directory. Thomas

Re: [rules-users] depicting array in rules

2010-06-10 Thread Swindells, Thomas
Generally the advice when using drools is that if you are wanting to use an array (or other type of collection) then you should probably be normalising your data and putting the values of the collection into the working memory as their own object (pretend that drools is a relational database

Re: [rules-users] How to break the rules execution if one has been satisfied ??

2010-06-11 Thread Swindells, Thomas
You technical description isn't at all accurate. You need to read up on Rete Trees, I'm still a bit vague on them myself but a hopefully slightly more accurate description is as follows: When the rules are compiled each of their conditions is converted to a node on the graph. If rules share the

Re: [rules-users] rules-users Digest, Vol 43, Issue 60

2010-06-11 Thread Swindells, Thomas
] Write Drools Books - Packt Publishing. (Mark Proctor) 2. How to break the rules execution if one has been satisfied ?? (Nikhil S. Kulkarni) 3. Re: How to break the rules execution if one has been satisfied ?? (Swindells, Thomas

Re: [rules-users] Error with conversion from .brl to .drl file

2010-06-14 Thread Swindells, Thomas
Looks like your classpath is missing a jar that contains org.drools.brms.server.util.BRXMLPersistence Your either missing a dependency that you need or you may have a mix of different versions causing problems. What's in your classpath and how are you managing it? Thomas -Original

Re: [rules-users] Weird error with rule files

2010-06-16 Thread Swindells, Thomas
Why are you trying to read it from your classpath? As it wasn't in your classpath when you loaded java doesn't know about it. You already have the File object so you can just make a FileReader object from that. Reader source = new FileReader(drlFile); Don't forget to close your reader when

Re: [rules-users] Accessing collections in conditional statements (inside/outside working memory)

2010-06-18 Thread Swindells, Thomas
The key difference of using collections over working memory is what happens when you update a fact. When you use update/modify you tell drools that that object has changed. Drools then works out which rules are affected by the change and re-computes the affected part of the rule and triggers

Re: [rules-users] HELP Drools Guvnor

2010-06-18 Thread Swindells, Thomas
What you are asking for is incredibly insecure and bad for so many reasons... If you really want to be passing around your passwords in the url for anybody to see then what you may be able to do is to use the standard http method of embedding the credentials:

Re: [rules-users] creating and integrating a specific output using drools

2010-06-18 Thread Swindells, Thomas
Rather maintaining global lists have you looked into using queries against the working memory to get out what you need? Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Fnu Mahalakshmi Sent: 18 June 2010 14:58 To:

Re: [rules-users] rules-users Digest, Vol 43, Issue 117

2010-06-21 Thread Swindells, Thomas
Download the drools source code, there are loads of examples in the drools-decisiontables unit tests. Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of amit bhardwaj Sent: 19 June 2010 20:21 To: rules-users@lists.jboss.org Subject: Re:

Re: [rules-users] Not exists on at least one element from the set

2010-06-23 Thread Swindells, Thomas
So what you are trying to say is that you want a rule to fire if there exists a name from (a, b, c) such that there are no object with that name? Which is probably something like the following: global $collection (which is set to the list exists ( $name: String from $collection not Object(name

Re: [rules-users] Not exists on at least one element from the set

2010-06-23 Thread Swindells, Thomas
I don't think you can unfortunately. You've got a number of options: 1. define a global (in sheet headers) and insert the actual values from code (perhaps reading from the spreadsheet). 2. Define a custom datatype Name, have a table with which each row inserts a Name object with associated value

Re: [rules-users] Not exists on at least one element from the set

2010-06-23 Thread Swindells, Thomas
in the grammar we could not get rid of this limitation yet. Maybe in the future. Edson 2010/6/23 Swindells, Thomas tswinde...@nds.commailto:tswinde...@nds.com I don't think you can unfortunately. You've got a number of options: 1. define a global (in sheet headers) and insert the actual values from

Re: [rules-users] execution using java -jar x.jar ... fails

2010-06-23 Thread Swindells, Thomas
What's in your manifest in your jar file? Also should it be CP=drools/*:drools/lib/*:. Rather than droos? Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 23 June 2010 15:45 To: rules-users@lists.jboss.org Subject:

Re: [rules-users] Request for help to execute rule using drools5.0 from excel file

2010-06-30 Thread Swindells, Thomas
You don't access rules in excel, you define rules in excel which are generated and loaded into the knowledge base as you have done below. You then need to create a session, add some facts to it and execute it: Eg: If collection is a collection of the facts you want to run through your model

Re: [rules-users] Problem Setting globals in drools session

2010-07-06 Thread Swindells, Thomas
Having the same JAR containing the same class in the classpath within the same classloader shouldn't make a difference. However having different jars (or other sources) containing potentially different versions of the same class can cause significant problems. Furthermore drools doesn't

Re: [rules-users] Drools Flow - Human Task

2010-07-14 Thread Swindells, Thomas
You can write your own custom work item handler which can handle performing all the necessary glue however you want that part of the system to work. The drools workflow docs provide details on how to go about doing this - plus I think you may be able to find some further tutorials and blog posts

Re: [rules-users] Drools Flow - Human Task

2010-07-14 Thread Swindells, Thomas
want to write a custom work item that helps me to pass some of the data from the process to some other application through its interface. Will I be able to do that?? Thanks. Santosh Mukherjee. On Wed, Jul 14, 2010 at 5:22 PM, Swindells, Thomas tswinde...@nds.commailto:tswinde...@nds.com wrote

Re: [rules-users] Drools Flow - Human Task

2010-07-14 Thread Swindells, Thomas
Your missing something - the human task handler is just a 'standard' custom work item handler, it doesn't do anything special that nobody elee can do. What you basically need to do is ensure that your flows are persisted, your work item handler doesn't complete immediately instead it

Re: [rules-users] Retrieve rule names fired from StatefulknowledgeSession

2010-07-15 Thread Swindells, Thomas
You probably want to read up on agenda listeners - this will let you get the information you want. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of G3 Sent: 15 July 2010 14:16 To:

Re: [rules-users] Error while executing business Rule

2010-07-15 Thread Swindells, Thomas
Your rules are probably written wrong, or your application, or you have a dodgy computer, or you have a race condition, or it is doing exactly what it should be doing and your expectations are wrong. There's also possibly a small chance that there is a bug in drools but with absolutely no

Re: [rules-users] ParseException: MessageFormat parse error!

2010-07-21 Thread Swindells, Thomas
I think I answered this on the mailing list before, From what I can remember the currency parser that is being used is locale specific, you either need to configure your locale or change your dat file to make sure the prices are in your local currency. Hopefully that will fix it, Thomas

Re: [rules-users] Rules not firing when expected after retracting object in list

2010-07-21 Thread Swindells, Thomas
Why is rule 1 written the way it is? Why can't you just do: rule Rule 1 - Remove all A's that have property set to 123 salience 1000 when $anA : A( property == 123 ) then retract ($anA) end Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org]

  1   2   3   >