Re: [rules-users] Decision Tables and modify
At the momemt 6.x only supports update columns (select an action and ensure the update engine checkbox is ticked). You can work around this, to get modify( x ) {...}, by using a BRL Fragment Action column and use a Free Form DRL Fragment entering the modify syntax. I am modifying Guided Rules, Guided Templates and Guided Decision Tables to generate modify syntax instead of update at the moment. It will be in 6.1.Final for sure. Did you mean this or the XLS variety? (I'd assume modify to already be supported as ACTIONs are free format DRL IIRC). Sent on the move On 11 Jun 2014 18:56, gboro54 gbor...@gmail.com wrote: What is the proper way to do modify in a decision table? I know this is a very generic question but was wondering if anyone has experience with this and could offer insight(I have a couple ways I think will work but they feel a bit hackey) -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-and-modify-tp4029995.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables and modify
Thanks and your assumption is correct manstis wrote At the momemt 6.x only supports update columns (select an action and ensure the update engine checkbox is ticked). You can work around this, to get modify( x ) {...}, by using a BRL Fragment Action column and use a Free Form DRL Fragment entering the modify syntax. I am modifying Guided Rules, Guided Templates and Guided Decision Tables to generate modify syntax instead of update at the moment. It will be in 6.1.Final for sure. Did you mean this or the XLS variety? (I'd assume modify to already be supported as ACTIONs are free format DRL IIRC). Sent on the move On 11 Jun 2014 18:56, gboro54 lt; gboro54@ gt; wrote: What is the proper way to do modify in a decision table? I know this is a very generic question but was wondering if anyone has experience with this and could offer insight(I have a couple ways I think will work but they feel a bit hackey) -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-and-modify-tp4029995.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-and-modify-tp4029995p4029997.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables conditional matching
Just some thoughts/comments... It looks like you are trying to solve a logic that has conditions that are dependent between rules. This usually gets messy like you have observed. I like to keep my rules atomic without ANY dependencies to other rules and I try to avoid controlling order of execution. As you stated, if you make every rule atomic, it has to account for all conditions - which is not necessarily bad, but your rules will have many conditions that seem redundant when you look at the other rules. There are many posts on this topic, you may want to scan through the posts. One approach is to use stated facts and let rete do its work. If your domain is to check eligibility, you can consider writing only the rules that evaluate for true or only the rules that evaluate to false. Typically, for eligibility, you only evaluate when eligibility would be false, that will reduce your rules. Otherwise, there will be plenty of gaps in your rules. I know I dint give an answer that you are looking for, but some things to consider. Good Luck :) -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-decision-tables-conditional-matching-tp4025603p4025645.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision tables - maintenance workflow - best practices
I am planning to load the decision tables into a KnowledgeBase and cache it in Infinispan so that it can be accessed by all app instances. Since the rules dont change frequently, the loader script can be run whenever there is an update. This makes the XLS files stay along with the loader and not scattered across instances, but i would like to know from the community how it's handled - without Guvnor. Please refer original question in thread. -ja -- View this message in context: http://drools.46999.n3.nabble.com/Decision-tables-maintenance-workflow-best-practices-tp4021191p4022698.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision Tables - Operators - starts with/end with??
This is not possible with 5.2. With 5.4 you can create a decision table with a column defined as a BRL fragment (guided rule editor). This will allow you to use matches or sounds like. Matches could also be used to emulate starts with or ends with given the correct regular expression. This JIRA https://issues.jboss.org/browse/GUVNOR-1086 will also be of interest to you. Otherwise, if 5.2 is your only choice, you could look at using a Rule Template instead. With kind regards, Mike On 4 July 2012 18:09, gok45 gary.william.ok...@citi.com wrote: Hi Guys, Have been using Guvnor to create some decision tables and got a few questions on the use of certain Operators in the Condition Columns - what value do you put in for matches and sounds like? Basically i want to create a condition where i can check starts with or end with in relation to a string, is this possible using the perdefined operators or how would i acheive this? so if i want to check Hello to see if it starts with He - what value would put in the field? Using Guvnor 5.2.0 Any help would be appreciated! Gary -- View this message in context: http://drools.46999.n3.nabble.com/decision-Tables-Operators-starts-with-end-with-tp4018473.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables Examples
The presentation merely pointed out that there are several forms about. A little later it says that only the vertical form is supported. -W On 21/12/2011, Juanker Atina juank...@gmail.com wrote: Hi there, I want to try some more examples of decision tables. - I have tried with the example from eclipse (drools plugin - create new decision table) - TeamAllocationExample.xls and CheckAccepted.xls too (easy to find on google). But all of them are created in horizontal way (each rule is one row). Could you please tell me where can i find vertical way examples ? As i'read it could be possible (see http://www.slideshare.net/manstis/buenos-aires-decision-table-presentation) but i can't find any example out there. Thanks. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables Examples
The horizontal implementation is in org.drools.decisiontable.parser.xls.ExcelParser. If you look at the processSheet method you'll see it scans rows to build the decision table. A vertical implementation would need to obviously scan columns (and a pull request for a community contribution would be welcome). We have vertical implementation on our roadmap, but its implementation is not scheduled for the short-term. With kind regards, Mike On 21 December 2011 13:17, Wolfgang Laun wolfgang.l...@gmail.com wrote: The presentation merely pointed out that there are several forms about. A little later it says that only the vertical form is supported. -W On 21/12/2011, Juanker Atina juank...@gmail.com wrote: Hi there, I want to try some more examples of decision tables. - I have tried with the example from eclipse (drools plugin - create new decision table) - TeamAllocationExample.xls and CheckAccepted.xls too (easy to find on google). But all of them are created in horizontal way (each rule is one row). Could you please tell me where can i find vertical way examples ? As i'read it could be possible (see http://www.slideshare.net/manstis/buenos-aires-decision-table-presentation ) but i can't find any example out there. Thanks. ___ 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] decision tables and default rules for case when part of LHS failes for other rules
First I wanted to add parameters from condition 1 column to a session and to add condition which makes default rule true if no parameter in session is equal to an entry argument. But I couldn't find a way to add a parameter from a condition expression to a session. Is it possible? -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165180.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
If you want to use a single XLS decision table then the answer is still, no it's not possible. If however you willing\able to use DRL then a world of opportunities is opened to you. I believe something like this will work - but wait to be corrected - laune? ;) rule specific 1 when SomeObject( someSpecificCriteria ) then insert(new Result() ); end rule generic when not Result( ) then insert(new Result() ); end You could (possibly) use two XLS decision tables where the two rules above are effectively defined in each. With kind regards, Mike On 13 July 2011 09:09, Syargey syar...@tut.by wrote: First I wanted to add parameters from condition 1 column to a session and to add condition which makes default rule true if no parameter in session is equal to an entry argument. But I couldn't find a way to add a parameter from a condition expression to a session. Is it possible? -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165180.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
Ahem,... 2011/7/13 Michael Anstis michael.ans...@gmail.com If you want to use a single XLS decision table then the answer is still, no it's not possible. If however you willing\able to use DRL then a world of opportunities is opened to you. I believe something like this will work - but wait to be corrected - laune? ;) rule specific 1 when SomeObject( someSpecificCriteria ) then insert(new Result() ); end rule generic ## ensure this fires only in the absence of any speficic-N rule salience -100 -W when not Result( ) then insert(new Result() ); end You could (possibly) use two XLS decision tables where the two rules above are effectively defined in each. With kind regards, Mike On 13 July 2011 09:09, Syargey syar...@tut.by wrote: First I wanted to add parameters from condition 1 column to a session and to add condition which makes default rule true if no parameter in session is equal to an entry argument. But I couldn't find a way to add a parameter from a condition expression to a session. Is it possible? -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165180.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
hehe, I didn't want to fall for the getting salience values round the wrong way trap like I normally do. Thanks Wolfgang :) 2011/7/13 Wolfgang Laun wolfgang.l...@gmail.com Ahem,... 2011/7/13 Michael Anstis michael.ans...@gmail.com If you want to use a single XLS decision table then the answer is still, no it's not possible. If however you willing\able to use DRL then a world of opportunities is opened to you. I believe something like this will work - but wait to be corrected - laune? ;) rule specific 1 when SomeObject( someSpecificCriteria ) then insert(new Result() ); end rule generic ## ensure this fires only in the absence of any speficic-N rule salience -100 -W when not Result( ) then insert(new Result() ); end You could (possibly) use two XLS decision tables where the two rules above are effectively defined in each. With kind regards, Mike On 13 July 2011 09:09, Syargey syar...@tut.by wrote: First I wanted to add parameters from condition 1 column to a session and to add condition which makes default rule true if no parameter in session is equal to an entry argument. But I couldn't find a way to add a parameter from a condition expression to a session. Is it possible? -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165180.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users 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] decision tables and default rules for case when part of LHS failes for other rules
In fact, I don't need to have default values if no values were found. I need default values if part of LHS is never true. If I have the rule: rule rule_11 when Object1( constraint1 ) Object2( constraint2 ) then insert(new Result()); end I'd like to have rule applying when Object1( constraint1 ) fails. In decision table. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165787.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
On 13 July 2011 14:40, Syargey syar...@tut.by wrote: In fact, I don't need to have default values if no values were found. I need default values if part of LHS is never true. If I have the rule: rule rule_11 when Object1( constraint1 ) Object2( constraint2 ) then insert(new Result()); end I'd like to have rule applying when Object1( constraint1 ) fails. when not Object1( constraint1 ) then -W In decision table. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165787.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
Do you know by any chance how can I drop my account from this forum? Sorry for asking such a question Thanks, Guy -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Syargey Sent: Wednesday, July 13, 2011 3:41 PM To: rules-users@lists.jboss.org Subject: Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules In fact, I don't need to have default values if no values were found. I need default values if part of LHS is never true. If I have the rule: rule rule_11 when Object1( constraint1 ) Object2( constraint2 ) then insert(new Result()); end I'd like to have rule applying when Object1( constraint1 ) fails. In decision table. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for- case-when-part-of-LHS-failes-for-other-rules-tp3162872p3165787.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
Yes. The rule is good for DRL. But I need to have it in decision table. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3166650.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
Should be doable just like the positive ones, just put 'not' in front of Object1 -W On 13 July 2011 18:44, Syargey syar...@tut.by wrote: Yes. The rule is good for DRL. But I need to have it in decision table. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3166650.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
If condition 1 column is left blank, this could be achieved. On Tue, Jul 12, 2011 at 11:56 AM, Syargey syar...@tut.by wrote: Hi all, I have been asked to add default rules to a decision table. We have a decision table with several conditions. Data from first two columns are passed to action with binded variables. The action collects data from all passed rules. - condition 1 | condition 2 | ... | action - AAA | AD| ... | X - BBB | AD| ... | X - BBB | AE| ... | X - BBB | CC| ... | X - CCC | AD| ... | X - DDD | AD| ... | X - BBB | AE| ... | X - ...| ...| ... | X - Recently business asked me if it is possible to have default rules (rows) in the table if there is not any rule passing condition 1. - DEFAULT | AD| ... | X - DEFAULT | AE| ... | X - Is it possible to have rules in decision table those can be fired only if a specific part of LHS never occurs in others rules? Thanks in advance, Syargey -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3162872.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
It doesn't suit :( A blank column causes an action applies additionally. But I need it applies only if no other conditions from first column is true. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3163069.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
Is this XLS decision tables or in Guvnor? In Guvnor, if a condition uses either the == or != operator you can use the otherwise special value that achieves what you're looking for. It isn't possible with XLS at present, although there is a JIRA for the change. On 12 July 2011 17:47, Syargey syar...@tut.by wrote: It doesn't suit :( A blank column causes an action applies additionally. But I need it applies only if no other conditions from first column is true. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3163069.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules
It is in XLS decision table. -- View this message in context: http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3163227.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables with Business Rule Tasks?
Thanks for your response. However, I am still having trouble. I started with the Decision Table and Flow examples. I modified the example DT call a method in an instance of a class I defined. I setup the DecisionTableTest code to create the object and initialize it. After the fileAllRules call I dumped out the object and verified that its state had changed (the method was invoked by the DT rule). I modified the ProcessTest code to use a ScriptTask to similarly call the method on the object and verified that it worked. I then changed the code to go from using a ScriptTask to a RuleTask, trying to use the DT from the first step. I can see in the audit log that the process reaches the ScriptTask, but it does not proceed to the next task. Also, I can see that the rule does not execute (the method is not invoked). Can someone recommend some steps I should take to debug this problem? Is there an example somewhere that uses a ScriptTask from a DT? Regards, Mike From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis Sent: Friday, May 27, 2011 5:08 PM To: Rules Users List Subject: Re: [rules-users] Decision Tables with Business Rule Tasks? The same place as any attribute, like Salience, Agenda-Group etc Section 5.1.4.2. Keywords in Drools Expert 5.1.1's documents talks about it a bit. Cheers, Mike On 27 May 2011 22:02, mmcintosh michael.g.mcint...@citi.commailto:michael.g.mcint...@citi.com wrote: Thanks for your response. I have not seen any example of this. Where does the ruleFlow-group attribute go on the spreadsheet? -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-with-Business-Rule-Tasks-tp2990517p2994420.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables with Business Rule Tasks?
You can add the ruleflow-group Attribute to the XLS form, or in Guvnor using the guided editor. Decision Tables compile to a common form that KnowledgeBuilder uses to create your engine; so AFAIK using them in a flow should not be a problem. With kind regards, Mike On 26 May 2011 22:03, mmcintosh michael.g.mcint...@citi.com wrote: Is it possible to use a decision table to specify the rule for a business rule task? How is the ruleFlowGroup specified? -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-with-Business-Rule-Tasks-tp2990517p2990517.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables with Business Rule Tasks?
Thanks for your response. I have not seen any example of this. Where does the ruleFlow-group attribute go on the spreadsheet? -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-with-Business-Rule-Tasks-tp2990517p2994420.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables with Business Rule Tasks?
The same place as any attribute, like Salience, Agenda-Group etc Section 5.1.4.2. Keywords in Drools Expert 5.1.1's documents talks about it a bit. Cheers, Mike On 27 May 2011 22:02, mmcintosh michael.g.mcint...@citi.com wrote: Thanks for your response. I have not seen any example of this. Where does the ruleFlow-group attribute go on the spreadsheet? -- View this message in context: http://drools.46999.n3.nabble.com/Decision-Tables-with-Business-Rule-Tasks-tp2990517p2994420.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision tables - multiple params to function over multiple columns
I think this is more a Java question of how to call a method in instalments. One option is to set a temporary from the 1st column, and call from the 2nd: The first column might be String code = $param; and the next column would callHelperFunction( code, $param, $handleFromConditions); and the next column would Alternatively, you can do startHelperFunction( $handle, $param ); execHelperFunction( $param ); also with each statement coming from a column of its own. With non-statics, also chained calls would be possible. -W 2011/3/29 travis_sm...@bnz.co.nz: Hi, Currently I've got a consequence on a decision table that works like this: callHelperFunction( $1, $2, $handleFromConditions); where the first two parameters are strings, $1 being a code, $2 a description. which means that you get the table holding things like: DC X223,This is the description text which can be fairly wordy That works just fine! However: For ease of maintenance, the risk analysts want the input split over two columns, so is there any way of doing this? I'm trying to avoid inserting a temporary fact then cleaning it up after, if possible, as I can't see that being particularly good for performance. Thank you, -Trav Travis Smith Analyst Programmer Development Centre BNZ DDI: +644 4746356 (Or Ext 76356) CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. This email was sent by the Bank of New Zealand. You can contact us on 0800 ASK BNZ (0800 275 269). Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Bank of New Zealand. ___ 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] Decision tables - multiple params to function over multiple columns
Thank you for the reply Wolfgang, For some reason I had a mental blank when I asked that question - was thinking Can't create variables like that. Thanks! -Trav Travis Smith Analyst Programmer Development Centre BNZ DDI: +644 4746356 (Or Ext 76356) Wolfgang Laun wolfgang.l...@gmail.com Sent by: rules-users-boun...@lists.jboss.org 29/03/2011 08:21 p.m. Please respond to Rules Users List rules-users@lists.jboss.org To Rules Users List rules-users@lists.jboss.org cc Subject Re: [rules-users] Decision tables - multiple params to function over multiple columns I think this is more a Java question of how to call a method in instalments. One option is to set a temporary from the 1st column, and call from the 2nd: The first column might be String code = $param; and the next column would callHelperFunction( code, $param, $handleFromConditions); and the next column would Alternatively, you can do startHelperFunction( $handle, $param ); execHelperFunction( $param ); also with each statement coming from a column of its own. With non-statics, also chained calls would be possible. -W 2011/3/29 travis_sm...@bnz.co.nz: Hi, Currently I've got a consequence on a decision table that works like this: callHelperFunction( $1, $2, $handleFromConditions); where the first two parameters are strings, $1 being a code, $2 a description. which means that you get the table holding things like: DC X223,This is the description text which can be fairly wordy That works just fine! However: For ease of maintenance, the risk analysts want the input split over two columns, so is there any way of doing this? I'm trying to avoid inserting a temporary fact then cleaning it up after, if possible, as I can't see that being particularly good for performance. Thank you, -Trav Travis Smith Analyst Programmer Development Centre BNZ DDI: +644 4746356 (Or Ext 76356) CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. This email was sent by the Bank of New Zealand. You can contact us on 0800 ASK BNZ (0800 275 269). Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Bank of New Zealand. ___ 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 CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. This email was sent by the Bank of New Zealand. You can contact us on 0800 ASK BNZ (0800 275 269). Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Bank of New Zealand. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] decision tables - no agenda group?
Sorry, would someone validate that there's no agenda group support in the decision table functionality? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evans, Jess Sent: Monday, December 01, 2008 10:06 PM To: Rules Users List Subject: [rules-users] decision tables - no agenda group? It doesn't appear that the decision table parser supports an agenda-group declaration. I find this odd since the documentation says it supports activation and ruleflow. Can someone validate this? thanks, -Jess ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables - no agenda group?
I don't think there is. On Sat, Dec 6, 2008 at 1:00 AM, Evans, Jess [EMAIL PROTECTED] wrote: Sorry, would someone validate that there's no agenda group support in the decision table functionality? *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Evans, Jess *Sent:* Monday, December 01, 2008 10:06 PM *To:* Rules Users List *Subject:* [rules-users] decision tables - no agenda group? It doesn't appear that the decision table parser supports an agenda-group declaration. I find this odd since the documentation says it supports activation and ruleflow. Can someone validate this? thanks, -Jess ___ 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] decision tables - no agenda group?
Thanks. Is it missing because declaring agenda group in decision table rules is a stupid thing to do because of X, or was it simply overlooked? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michal Bali Sent: Friday, December 05, 2008 8:26 PM To: Rules Users List Subject: Re: [rules-users] decision tables - no agenda group? I don't think there is. On Sat, Dec 6, 2008 at 1:00 AM, Evans, Jess [EMAIL PROTECTED] wrote: Sorry, would someone validate that there's no agenda group support in the decision table functionality? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evans, Jess Sent: Monday, December 01, 2008 10:06 PM To: Rules Users List Subject: [rules-users] decision tables - no agenda group? It doesn't appear that the decision table parser supports an agenda-group declaration. I find this odd since the documentation says it supports activation and ruleflow. Can someone validate this? thanks, -Jess ___ 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] decision tables - no agenda group?
try RULEFLOW-GROUP it should be superior to AGENDA-GROUP On Sat, Dec 6, 2008 at 1:43 AM, Evans, Jess [EMAIL PROTECTED] wrote: Thanks. Is it missing because declaring agenda group in decision table rules is a stupid thing to do because of X, or was it simply overlooked? *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Michal Bali *Sent:* Friday, December 05, 2008 8:26 PM *To:* Rules Users List *Subject:* Re: [rules-users] decision tables - no agenda group? I don't think there is. On Sat, Dec 6, 2008 at 1:00 AM, Evans, Jess [EMAIL PROTECTED] wrote: Sorry, would someone validate that there's no agenda group support in the decision table functionality? *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Evans, Jess *Sent:* Monday, December 01, 2008 10:06 PM *To:* Rules Users List *Subject:* [rules-users] decision tables - no agenda group? It doesn't appear that the decision table parser supports an agenda-group declaration. I find this odd since the documentation says it supports activation and ruleflow. Can someone validate this? thanks, -Jess ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] decision tables and attributes as parameters in function calls
Jonathan, The decision table mandates atleast one condition. I have faced this problem before. Assuming you always have some +ve value for cheese.price, do you want to try following? RuleSet Cheese rules Import com.xxx.entity.Cheese Variables Sequential TRUE RuleTable Rules for Cheese CONDITION ACTION $c : Cheese $c $price : price setPrice($price * $1) 0 2 Thanks mahesh From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Mon, 7 Apr 2008 08:56:34 +Subject: [rules-users] decision tables and attributes as parameters in function calls hi,I have no problem for this kind of rule :rule Primitive supportwhen$c : Cheese( price 10 )then$c.setPrice( 10 )end but I would like to know what is the decision table for this small rulerule Primitive supportwhen $c : Cheese( $price : price )then$c.setPrice( $price * 2 )endI've tried a lot of syntax and I read the section abour the decision table in the manual but ididnt find anything. Centralisez tous vos comptes mails dans Hotmail ! Créez un compte Hotmail, c'est gratuit ! _ Technology : Catch up on updates on the latest Gadgets, Reviews, Gaming and Tips to use technology etc. http://computing.in.msn.com/___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] decision tables and attributes as parameters in function calls
Thanks a lot, I will try this. From: [EMAIL PROTECTED] To: rules-users@lists.jboss.org Subject: RE: [rules-users] decision tables and attributes as parameters in function calls Date: Mon, 7 Apr 2008 14:31:49 + Jonathan, The decision table mandates atleast one condition. I have faced this problem before. Assuming you always have some +ve value for cheese.price, do you want to try following? RuleSet Cheese rules Import com.xxx.entity.Cheese Variables Sequential TRUE RuleTable Rules for Cheese CONDITION ACTION $c : Cheese $c $price : price setPrice($price * $1) 0 2 Thanks mahesh From: [EMAIL PROTECTED] To: rules-users@lists.jboss.org Date: Mon, 7 Apr 2008 08:56:34 + Subject: [rules-users] decision tables and attributes as parameters in function calls hi, I have no problem for this kind of rule : rule Primitive support when $c : Cheese( price 10 ) then $c.setPrice( 10 ) end but I would like to know what is the decision table for this small rule rule Primitive support when $c : Cheese( $price : price ) then $c.setPrice( $price * 2 ) end I've tried a lot of syntax and I read the section abour the decision table in the manual but ididnt find anything. Centralisez tous vos comptes mails dans Hotmail ! Créez un compte Hotmail, c'est gratuit ! Exclusive Marriage Proposals! Find UR life partner at Shaadi.com Try it! _ Avec Hotmail, vos e-mails vous suivent partout ! Mettez Hotmail sur votre mobile ! http://www.messengersurvotremobile.com/?d=hotmail___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Decision Tables: Probelm with sequence=true
As the docs state sequential rete, I'm assuming this is what you mean, does not allow full inference modification of data does not result in re-evaluation of rules, i.e. update() does nothing. You can achieve what you want using a custom Conflict Resolution Strategy, however I advise you to be careful here and understand exactly what you are asking for RuleBaseConfiguration has a property: public void setConflictResolver(ConflictResolver conflictResolver); RuleBaseConfiguration conf = new RuleBaseConfiguration(); conf.setConflictResolver( new LoaderOrderConflictResolver() ); Or you can use the property, with the value of the fully qualified class: drools.conflictResolver = org.drools.conflict.LoaderOrderConflictResolver However for the property version I made a mistake I forgot to add the getInstance() method, which is needed for the property loading to work. I suggest you subclass LoadOrderConflictResolver and add the getInstance method and specify that, if you use the property approach. I'll fix this for 4.0.1 Mark Arjun Dhar wrote: Hi, I usually use decision tables without sequence. But there was a request Not to use priority and if there was a conflict then the rule on top should get priority. I thought, sequence = true was a good way of ensuring that. But in the rules I call update(); this forces all the rules to fire twice. I think this is a bug; without sequence the update does not cause such problems. Please advise, Arjun ___ 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] decision tables
You're not getting answers because you're not asking specific enough questions. Like, for example, what is not in the policy example provided that you need further help with. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of kranthikumar dalai Sent: Tuesday, June 05, 2007 7:39 AM To: rules-users@lists.jboss.org Subject: [rules-users] decision tables Hi to every one, Can i examples of drools with decision tables. I gone through documentation. But can i have some other examples. Regards: Kranthi Dalai ( I posted so many querries regarding this, but no one answered..) ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] Decision tables
Yes, you can give the spreadsheet to your HR people for modification. Please read: http://www.catb.org/~esr/faqs/smart-questions.html _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of kranthikumar dalai Sent: Tuesday, June 05, 2007 8:40 AM To: rules-users@lists.jboss.org Subject: [rules-users] Decision tables Hi To every one, I understood the pricing example. But problem is that i have to give the table to my HR-People that they can modify and update the rules. That's the question i am asking. Thanx Regards: Kranthi Dalai ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables
look in the drools-examples download. Mark kranthikumar dalai wrote: Hi to every one, Can i examples of drools with decision tables. I gone through documentation. But can i have some other examples. Regards: Kranthi Dalai ( I posted so many querries regarding this, but no one answered..) ___ 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] decision tables and 'default' or 'else' conditions
Hi Edson, I've abstracted our use case since I gather you don't understand the dutch legal system. :-) Given a decision table like this ( I hope you are able to read the HTML post correctly) I A p II B q III C r IV D s none of the above E t F u none of the above v we are looking for a keyword that has a meaning similar to none of the above The point of this functionality for us is that the business analyst is only interested in the values I to IV but possibly there are 20 or more values. The semantics that we need would be such that this would translate into the following rules I and A then p II and B then q III and C then r IV and D then s not(I) and not(II) and not(III) and not(IV) and E then t not(I) and not(II) and not(III) and not(IV) and F then u not(I) and not(II) and not(III) and not(IV) and not(A) and not(B) and not(C) and not(D) then v I hope this answers your questions. We will need this functionality pretty soon. Can you give an indication what the priority is for you guys for this functionality? groetjes uit Nederland, Joost 2007/2/7, Edson Tirelli [EMAIL PROTECTED]: Joost, Unfortunatelly, there is no feature implemented for that. But we are discussing, specially the semantics we want to define to such statements ( we call them else and otherwise ). If you have a real use case and you can describe it for us, it may help on deciding which way to go, and at the same time fullfil your needs in the future. Our biggest questions are: * should the else/otherwise part be fired only once if no rule is triggered? or should it fire for each tuple that does not trigger previous rules? What if rules in the otherwise group use different tuples to activate? * should else/otherwise apply to the whole LHS of the rules? Or should there be a way to specify only part of the LHS (like a tag)? Input welcome. Edson Joost de Vries wrote: Hi, We're using excel decision tables to specify our business rules. In one column we enumerate several condition values and describe a specific effect. We'd like to offer business analysts te possibility of describing succinctly what the effect is 'for all other values'. That could be described as an 'else' or 'default' rule. In other words; we don't want to burden business analysts with the necessity to enumerate all other values. What is the right way to do that? Thanks for you help. groetjes, Joost ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Joost de Vries 06 22375323 werk: [EMAIL PROTECTED] privé: [EMAIL PROTECTED] ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] decision tables and 'default' or 'else' conditions
Ok, I think that HTML tables get mangled. I'll mail it to you directly. 2007/2/13, Joost de Vries [EMAIL PROTECTED]: Hi Edson, I've abstracted our use case since I gather you don't understand the dutch legal system. :-) Given a decision table like this ( I hope you are able to read the HTML post correctly) I A p II B q III C r IV D s none of the above E t F u none of the above v we are looking for a keyword that has a meaning similar to none of the above The point of this functionality for us is that the business analyst is only interested in the values I to IV but possibly there are 20 or more values. The semantics that we need would be such that this would translate into the following rules I and A then p II and B then q III and C then r IV and D then s not(I) and not(II) and not(III) and not(IV) and E then t not(I) and not(II) and not(III) and not(IV) and F then u not(I) and not(II) and not(III) and not(IV) and not(A) and not(B) and not(C) and not(D) then v I hope this answers your questions. We will need this functionality pretty soon. Can you give an indication what the priority is for you guys for this functionality? groetjes uit Nederland, Joost 2007/2/7, Edson Tirelli [EMAIL PROTECTED]: Joost, Unfortunatelly, there is no feature implemented for that. But we are discussing, specially the semantics we want to define to such statements ( we call them else and otherwise ). If you have a real use case and you can describe it for us, it may help on deciding which way to go, and at the same time fullfil your needs in the future. Our biggest questions are: * should the else/otherwise part be fired only once if no rule is triggered? or should it fire for each tuple that does not trigger previous rules? What if rules in the otherwise group use different tuples to activate? * should else/otherwise apply to the whole LHS of the rules? Or should there be a way to specify only part of the LHS (like a tag)? Input welcome. Edson Joost de Vries wrote: Hi, We're using excel decision tables to specify our business rules. In one column we enumerate several condition values and describe a specific effect. We'd like to offer business analysts te possibility of describing succinctly what the effect is 'for all other values'. That could be described as an 'else' or 'default' rule. In other words; we don't want to burden business analysts with the necessity to enumerate all other values. What is the right way to do that? Thanks for you help. groetjes, Joost ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Joost de Vries 06 22375323 werk: [EMAIL PROTECTED] privé: [EMAIL PROTECTED] -- Joost de Vries 06 22375323 werk: [EMAIL PROTECTED] privé: [EMAIL PROTECTED] ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users