[rules-users] Rule Templates - Conditionally Generate Rule based on Values in Data

2013-06-18 Thread Jason Allen
All,

I saw this question was asked a couple of months ago with no reply, but thought 
I would try again.

In using a Rule Template, I'm trying to determine a way to dynamically generate 
rules based on a value in the data.

There is a data set, that has various pieces data, depending on a column value, 
the rule that is generated is relatively different.  Different enough that I 
wouldn't want the generated a rule for each row of data, because many of the 
rules generated would never fire.

In the drools expert docs, it lists under 6.1.7 Rule Templates the ability to 
conditionally generate rules based on the values in the data, but I can't 
seem to find the syntax for how to do that.

Does anyone know the answer to this?

I would picture it looking something like this

if (@{RevenueCode} == NR)
rule RevenueMapperRule_1
when
claim1 : ClaimFact (ProgramType in (FC, FCP, FALSE, FALSE),
ProcedureCode == NR,
(serviceBegin = 01-Oct-2003  
serviceBegin = 31-Dec-2030),
modifier1 in (U),
typeofBill == 3);
then
claim1.setResultSPCCode(507.11);
list.add(claim1);
end
end if

Essentially, the only time this rule would be generated is if RevenueCode in 
the Rules Spreadsheet had a value of NR.

If this is not possible, how should I be thinking about this problem?  Feels 
weird to generate a bunch of rules that will never fire, simply because there 
is no way to conditionally generate a rule.  Maybe the answer is to create 
separate rule files and template definitions?  That also feels like an over 
complication.

Thoughts?

Thanks in advance!

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Rule Templates - Conditionally Generate Rule based on Values in Data

2013-06-18 Thread Wolfgang Laun
A *rule template *is a text (file) intended to be expanded repeatedly using
different sets of template parameters, similar to a macro processor. Each
expansion will generate - more or less - the same rule, unless you put the
flexibility into the parameter, which just passes the buck to the code
driving the expansion.

Let's say that you want to be alerted if one of your lucky numbers becomes
a fact. You can write a template, create a collection of your lucky numbers
and run the expander to create one rule for each of your lucky numbers.
This is explained in section Expanding a Template.

Most of the time, sets of almost identical rules can be avoided if facts
containing parameter sets are inserted and rules are written to match the
values from a ParameterSet fact rather than literals, as would be done by
generated rules. Consider
  when
 Integer( valueOf == 7 )
  when
 Integer( valueOf == 13 )
as opposed to
   when
  Parameter( $n: number )
  Integer( valueOf == $n )
with appropriate Parameter facts (7, 13).

-W











On 18 June 2013 16:58, Jason Allen jason.al...@data-sign.com wrote:

 All,

 I saw this question was asked a couple of months ago with no reply, but
 thought I would try again.

 In using a Rule Template, I'm trying to determine a way to dynamically
 generate rules based on a value in the data.

 There is a data set, that has various pieces data, depending on a column
 value, the rule that is generated is relatively different.  Different
 enough that I wouldn't want the generated a rule for each row of data,
 because many of the rules generated would never fire.

 In the drools expert docs, it lists under 6.1.7 Rule Templates the ability
 to conditionally generate rules based on the values in the data, but I
 can't seem to find the syntax for how to do that.

 Does anyone know the answer to this?

 I would picture it looking something like this

 if (@{RevenueCode} == NR)
 rule RevenueMapperRule_1
 when
 claim1 : ClaimFact (ProgramType in (FC, FCP, FALSE, FALSE),
 ProcedureCode == NR,
 (serviceBegin = 01-Oct-2003  serviceBegin = 31-Dec-2030),
 modifier1 in (U),
 typeofBill == 3);
 then
 claim1.setResultSPCCode(507.11);
 list.add(claim1);
 end
 end if

 Essentially, the only time this rule would be generated is if RevenueCode
 in the Rules Spreadsheet had a value of NR.

 If this is not possible, how should I be thinking about this problem?
  Feels weird to generate a bunch of rules that will never fire, simply
 because there is no way to conditionally generate a rule.  Maybe the answer
 is to create separate rule files and template definitions?  That also feels
 like an over complication.

 Thoughts?

 Thanks in advance!


 ___
 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] Rule Templates and Array Handling

2013-06-14 Thread Jason Allen
Hi All,

I'm trying to determine if it's possible to process arrays of data using Rule 
Templates.  An example of what I'm trying to accomplish.

Spreadsheet of rules, with one of the columns being valid colors.  Valid colors 
contains comma separated data and is variable length.

For example

It might contain: Blue, Green, Red or Blue, or Red, Green, Purple, Silver 
 Any number of entries.

I then need to process incoming fact values against this list of colors, using 
either CONTAINS or IN.

For example:

template header
desc
valid_colors[]

package org.drools.examples.templates

global com.sample.Product product;

template ColorTestTemplate

rule ColorRule_@{row.rowNumber}
when
product1 : Product (Color in @{valid_colors});
then
product1.setDesc(@{desc});
end
end template

I know the following doesn't work: product1 : Product (Color in 
@{valid_colors});

However, I wanted to depict what I'm trying to accomplish.

The challenge is with valid_colors being a variable length array, I can't refer 
to the individual values using constants i.e. valid_colors0, valid_colors1, 
valid_colors3, etc to build my array list.

ie Color in (@{valid_colors0}, @{valid_colors1}, @{valid_colors2})

Is there a way to iterate through a variable length array in a template?

Any thoughts on how I could build an array list i.e. (Blue, Green, Red) 
when the column contains a variable length array?

Thanks in advance,
Jason___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Rule Templates and Array Handling

2013-06-14 Thread Wolfgang Laun
In the spreadsheet (with class Country) you would have a column such as:
 CONDITION
 Country
 name in ( $param )
 Test whether name is one from a given set
  Austria, Germany, Switzerland
  France, Canada, Belgium

This is the generated rule:

rule InTest_18
when
$country: Country(name in ( Austria,Germany,Switzerland ))
then
System.out.println( German is spoken );
end

You should be able to retrofit the template from this. (Why do you
need a template when you have a spreadsheet?)

-W



On 14/06/2013, Jason Allen jason.al...@data-sign.com wrote:
 Hi All,

 I'm trying to determine if it's possible to process arrays of data using
 Rule Templates.  An example of what I'm trying to accomplish.

 Spreadsheet of rules, with one of the columns being valid colors.  Valid
 colors contains comma separated data and is variable length.

 For example

 It might contain: Blue, Green, Red or Blue, or Red, Green, Purple,
 Silver  Any number of entries.

 I then need to process incoming fact values against this list of colors,
 using either CONTAINS or IN.

 For example:

 template header
 desc
 valid_colors[]

 package org.drools.examples.templates

 global com.sample.Product product;

 template ColorTestTemplate

 rule ColorRule_@{row.rowNumber}
 when
   product1 : Product (Color in @{valid_colors});
 then
   product1.setDesc(@{desc});
 end
 end template

 I know the following doesn't work: product1 : Product (Color in
 @{valid_colors});

 However, I wanted to depict what I'm trying to accomplish.

 The challenge is with valid_colors being a variable length array, I can't
 refer to the individual values using constants i.e. valid_colors0,
 valid_colors1, valid_colors3, etc to build my array list.

 ie Color in (@{valid_colors0}, @{valid_colors1}, @{valid_colors2})

 Is there a way to iterate through a variable length array in a template?

 Any thoughts on how I could build an array list i.e. (Blue, Green,
 Red) when the column contains a variable length array?

 Thanks in advance,
 Jason
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates and Array Handling

2013-06-14 Thread Jason Allen
Thanks for the reply Wolfgang.

I chose to use the template because I liked the idea of separating the rule 
definition from the rule data.  Just seemed intuitive to me.  Overall, I'm new 
to Drools, so not sure if that is the best choice or not.

I think your approach works if my spreadsheet has all the items separated with 
commas and double quotes.  Because then it's just referring to the field as a 
simple string field, not an array of values.

When the field is in the spreadsheet as: Austria, Germany, Switzerland it needs 
to be handled as an array, otherwise it will build the generated rule as: 
Country(name in (Austria, Germany, Switzerland)) and fail compile because it's 
missing the quotes.  If you use @{country}) it will put (Austria, Germany, 
Switzerland), when you really need (Austria, Germany, Switzerland)

Maybe I'll just embed the double quotes in the spreadsheet and call it a day, 
instead of fighting the field as an array of values.

If you have any other thoughts, let me know!

Thanks,
Jason.


On Jun 14, 2013, at 1:33 PM, Wolfgang Laun wolfgang.l...@gmail.com wrote:

 In the spreadsheet (with class Country) you would have a column such as:
 CONDITION
 Country
 name in ( $param )
 Test whether name is one from a given set
  Austria, Germany, Switzerland
  France, Canada, Belgium
 
 This is the generated rule:
 
 rule InTest_18
   when
   $country: Country(name in ( Austria,Germany,Switzerland ))
   then
   System.out.println( German is spoken );
 end
 
 You should be able to retrofit the template from this. (Why do you
 need a template when you have a spreadsheet?)
 
 -W
 
 
 
 On 14/06/2013, Jason Allen jason.al...@data-sign.com wrote:
 Hi All,
 
 I'm trying to determine if it's possible to process arrays of data using
 Rule Templates.  An example of what I'm trying to accomplish.
 
 Spreadsheet of rules, with one of the columns being valid colors.  Valid
 colors contains comma separated data and is variable length.
 
 For example
 
 It might contain: Blue, Green, Red or Blue, or Red, Green, Purple,
 Silver  Any number of entries.
 
 I then need to process incoming fact values against this list of colors,
 using either CONTAINS or IN.
 
 For example:
 
 template header
 desc
 valid_colors[]
 
 package org.drools.examples.templates
 
 global com.sample.Product product;
 
 template ColorTestTemplate
 
 rule ColorRule_@{row.rowNumber}
 when
  product1 : Product (Color in @{valid_colors});
 then
  product1.setDesc(@{desc});
 end
 end template
 
 I know the following doesn't work: product1 : Product (Color in
 @{valid_colors});
 
 However, I wanted to depict what I'm trying to accomplish.
 
 The challenge is with valid_colors being a variable length array, I can't
 refer to the individual values using constants i.e. valid_colors0,
 valid_colors1, valid_colors3, etc to build my array list.
 
 ie Color in (@{valid_colors0}, @{valid_colors1}, @{valid_colors2})
 
 Is there a way to iterate through a variable length array in a template?
 
 Any thoughts on how I could build an array list i.e. (Blue, Green,
 Red) when the column contains a variable length array?
 
 Thanks in advance,
 Jason
 ___
 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] Rule Templates and Array Handling

2013-06-14 Thread Wolfgang Laun
If you are expanding the template with data taken from anywhere
you have the option of processing that data before you pass it
to the expander. Section 2.5.2., Expanding a Template, explains
how to do this. This is the option you have for implementing
specific processing.

The problem with data in a spreadsheet is that it doesn't have
much of a data type along with it, so an entry such as x,y,z
could be any of these: one string value, a list of numbers, a list
of three string values, with quotes omitted, a list of enums, and so on.

-W



On 14/06/2013, Jason Allen jason.al...@data-sign.com wrote:
 Thanks for the reply Wolfgang.

 I chose to use the template because I liked the idea of separating the rule
 definition from the rule data.  Just seemed intuitive to me.  Overall, I'm
 new to Drools, so not sure if that is the best choice or not.

 I think your approach works if my spreadsheet has all the items separated
 with commas and double quotes.  Because then it's just referring to the
 field as a simple string field, not an array of values.

 When the field is in the spreadsheet as: Austria, Germany, Switzerland it
 needs to be handled as an array, otherwise it will build the generated rule
 as: Country(name in (Austria, Germany, Switzerland)) and fail compile
 because it's missing the quotes.  If you use @{country}) it will put
 (Austria, Germany, Switzerland), when you really need (Austria,
 Germany, Switzerland)

 Maybe I'll just embed the double quotes in the spreadsheet and call it a
 day, instead of fighting the field as an array of values.

 If you have any other thoughts, let me know!

 Thanks,
 Jason.


 On Jun 14, 2013, at 1:33 PM, Wolfgang Laun wolfgang.l...@gmail.com wrote:

 In the spreadsheet (with class Country) you would have a column such as:
 CONDITION
 Country
 name in ( $param )
 Test whether name is one from a given set
  Austria, Germany, Switzerland
  France, Canada, Belgium

 This is the generated rule:

 rule InTest_18
  when
  $country: Country(name in ( Austria,Germany,Switzerland ))
  then
  System.out.println( German is spoken );
 end

 You should be able to retrofit the template from this. (Why do you
 need a template when you have a spreadsheet?)

 -W



 On 14/06/2013, Jason Allen jason.al...@data-sign.com wrote:
 Hi All,

 I'm trying to determine if it's possible to process arrays of data using
 Rule Templates.  An example of what I'm trying to accomplish.

 Spreadsheet of rules, with one of the columns being valid colors.  Valid
 colors contains comma separated data and is variable length.

 For example

 It might contain: Blue, Green, Red or Blue, or Red, Green, Purple,
 Silver  Any number of entries.

 I then need to process incoming fact values against this list of colors,
 using either CONTAINS or IN.

 For example:

 template header
 desc
 valid_colors[]

 package org.drools.examples.templates

 global com.sample.Product product;

 template ColorTestTemplate

 rule ColorRule_@{row.rowNumber}
 when
 product1 : Product (Color in @{valid_colors});
 then
 product1.setDesc(@{desc});
 end
 end template

 I know the following doesn't work: product1 : Product (Color in
 @{valid_colors});

 However, I wanted to depict what I'm trying to accomplish.

 The challenge is with valid_colors being a variable length array, I
 can't
 refer to the individual values using constants i.e. valid_colors0,
 valid_colors1, valid_colors3, etc to build my array list.

 ie Color in (@{valid_colors0}, @{valid_colors1}, @{valid_colors2})

 Is there a way to iterate through a variable length array in a template?

 Any thoughts on how I could build an array list i.e. (Blue, Green,
 Red) when the column contains a variable length array?

 Thanks in advance,
 Jason
 ___
 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] Rule Templates and Array Handling

2013-06-14 Thread Jason Allen
Thanks Wolfgang.

I think I see what you're saying.  If I need to do any complex prep, simply 
process it first, then build a collection of POJO objects for expansion by the 
drools template.

I also understand what you're saying about spreadsheets.  Most of this is just 
proof of concept I'm doing…I think you're right in maintaining the rule data 
somewhere else…i.e. database.

Thanks again for your help.

-Jason

On Jun 14, 2013, at 3:01 PM, Wolfgang Laun wolfgang.l...@gmail.com wrote:

 If you are expanding the template with data taken from anywhere
 you have the option of processing that data before you pass it
 to the expander. Section 2.5.2., Expanding a Template, explains
 how to do this. This is the option you have for implementing
 specific processing.
 
 The problem with data in a spreadsheet is that it doesn't have
 much of a data type along with it, so an entry such as x,y,z
 could be any of these: one string value, a list of numbers, a list
 of three string values, with quotes omitted, a list of enums, and so on.
 
 -W
 
 
 
 On 14/06/2013, Jason Allen jason.al...@data-sign.com wrote:
 Thanks for the reply Wolfgang.
 
 I chose to use the template because I liked the idea of separating the rule
 definition from the rule data.  Just seemed intuitive to me.  Overall, I'm
 new to Drools, so not sure if that is the best choice or not.
 
 I think your approach works if my spreadsheet has all the items separated
 with commas and double quotes.  Because then it's just referring to the
 field as a simple string field, not an array of values.
 
 When the field is in the spreadsheet as: Austria, Germany, Switzerland it
 needs to be handled as an array, otherwise it will build the generated rule
 as: Country(name in (Austria, Germany, Switzerland)) and fail compile
 because it's missing the quotes.  If you use @{country}) it will put
 (Austria, Germany, Switzerland), when you really need (Austria,
 Germany, Switzerland)
 
 Maybe I'll just embed the double quotes in the spreadsheet and call it a
 day, instead of fighting the field as an array of values.
 
 If you have any other thoughts, let me know!
 
 Thanks,
 Jason.
 
 
 On Jun 14, 2013, at 1:33 PM, Wolfgang Laun wolfgang.l...@gmail.com wrote:
 
 In the spreadsheet (with class Country) you would have a column such as:
 CONDITION
 Country
 name in ( $param )
 Test whether name is one from a given set
 Austria, Germany, Switzerland
 France, Canada, Belgium
 
 This is the generated rule:
 
 rule InTest_18
 when
 $country: Country(name in ( Austria,Germany,Switzerland ))
 then
 System.out.println( German is spoken );
 end
 
 You should be able to retrofit the template from this. (Why do you
 need a template when you have a spreadsheet?)
 
 -W
 
 
 
 On 14/06/2013, Jason Allen jason.al...@data-sign.com wrote:
 Hi All,
 
 I'm trying to determine if it's possible to process arrays of data using
 Rule Templates.  An example of what I'm trying to accomplish.
 
 Spreadsheet of rules, with one of the columns being valid colors.  Valid
 colors contains comma separated data and is variable length.
 
 For example
 
 It might contain: Blue, Green, Red or Blue, or Red, Green, Purple,
 Silver  Any number of entries.
 
 I then need to process incoming fact values against this list of colors,
 using either CONTAINS or IN.
 
 For example:
 
 template header
 desc
 valid_colors[]
 
 package org.drools.examples.templates
 
 global com.sample.Product product;
 
 template ColorTestTemplate
 
 rule ColorRule_@{row.rowNumber}
 when
product1 : Product (Color in @{valid_colors});
 then
product1.setDesc(@{desc});
 end
 end template
 
 I know the following doesn't work: product1 : Product (Color in
 @{valid_colors});
 
 However, I wanted to depict what I'm trying to accomplish.
 
 The challenge is with valid_colors being a variable length array, I
 can't
 refer to the individual values using constants i.e. valid_colors0,
 valid_colors1, valid_colors3, etc to build my array list.
 
 ie Color in (@{valid_colors0}, @{valid_colors1}, @{valid_colors2})
 
 Is there a way to iterate through a variable length array in a template?
 
 Any thoughts on how I could build an array list i.e. (Blue, Green,
 Red) when the column contains a variable length array?
 
 Thanks in advance,
 Jason
 ___
 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] Rule Templates

2012-07-27 Thread FrankVhh
Hi,

It is not quite clear to me what you are actually having problems with. I
think the documentation explains it quite nicely.

See section 6.2 Templates

http://docs.jboss.org/drools/release/5.4.0.CR1/drools-expert-docs/html_single/index.html#d0e7468

If you have a more specific question. Feel free to ask.

Regard,
Frank



--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p4018952.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] Rule Templates

2012-07-27 Thread FrankVhh
The information that would help me is (using Eclipse or JBDS) can one edit, 
It depends if you mean edit the templates or edit the data that you use to
populate it.

You can create a rule template in any text editor you like and, AFAIK, it
can have any extension you prefer. Convert it to an inputstream and use it
in the code as is documented.

Regarding the data source, you have multiple options to collect the data.
Editing this data depends a bit on the type you are using. I typically
convert xml objects to java objects and use (and, sometimes, abuse) them to
fill the template and generate rules. 

compile to drl 
Compile to drl is done using the code as documented.

String drl = converter.compile( objs, templateStream );

You can do with the String whatever you like. use it to feed a
knowledgebuilder directly, or write it to a file.

and test the rule templates
Again. This depends on what you mean. If test the rule templates means:
check whether it generates a correct drl, than there are 2 things you can
do.
1) Manually check that the rules are as you expect them to be.
2) Verify that the drl compiles in a knowledgebuilder.

If test means, check whether my generated rules can construct a correct
decision, then you wikk have to set up a service/a method/ a unit test in
which you use the rules to create a knowledge base and which takes input
data to generate a certain output.

If you want, you can use guvnor to create test scenarios or implement a
testing tool by your own.

Regards,
Frank


mclovis wrote
 
 Frank,
  Thank you for your quick reply. I had previously read your suggested
 documentation and understand the basics of rule templates. The information
 that would help me is (using Eclipse or JBDS) can one edit, compile to drl
 and test the rule templates. The information in the article does not
 reflect these things and furthermore has a lists of file types for Drools
 that is not in current versions of IDEs (example: rules resource). If you
 have knowledge of the mechanics of these things (using even Ant or Maven
 to compile), it would be much appreciated. 
 
 Thanks in advance,
 
 Mike
 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p4018956.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] Rule Templates - comma separated data

2011-06-22 Thread Witham, Darren
Thanks W - I can work with this

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: 21 June 2011 18:40
To: Rules Users List
Subject: Re: [rules-users] Rule Templates - comma separated data

The operators in and not in operate on parenthesized lists of operands. 
They can be used with a single template parameter expanding as a list.

   Person( likes in ( apple, banana, chili ) )

is the same as

  Person( likes == apple || == banana || == chili )

-W


On 21 June 2011 18:34, Witham, Darren 
darren.wit...@citi.commailto:darren.wit...@citi.com wrote:
I have successfully generated a .drl file from a decision table. The column 
headers in this table made use of the forall(||) construct which happily parsed 
the corresponding comma separated data in the relevant spreadsheet cell to nice 
|| separated conditions.

We have since decided to use the template approach so we can store rule data in 
a db. We ideally want to store this data as key/value pairs in a db table where 
the values may contain comma separated data. The intention being these values 
would be processed as per the decision table.

How is this achieved using a template ? I note that a column can be denoted as 
an array column by adding [] i.e.

template header
column[]


However, although this appears create an ArrayColumn parser, and splits the 
comma separated data when running through a debugger, any attempt to access it 
in the template falls over in mvel code trying to call HashMap.column


Any examples on how to set this up ?

Thx


___
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


[rules-users] Rule Templates - comma separated data

2011-06-21 Thread Witham, Darren
I have successfully generated a .drl file from a decision table. The column 
headers in this table made use of the forall(||) construct which happily parsed 
the corresponding comma separated data in the relevant spreadsheet cell to nice 
|| separated conditions.

We have since decided to use the template approach so we can store rule data in 
a db. We ideally want to store this data as key/value pairs in a db table where 
the values may contain comma separated data. The intention being these values 
would be processed as per the decision table.

How is this achieved using a template ? I note that a column can be denoted as 
an array column by adding [] i.e. 

template header
column[] 


However, although this appears create an ArrayColumn parser, and splits the 
comma separated data when running through a debugger, any attempt to access it 
in the template falls over in mvel code trying to call HashMap.column


Any examples on how to set this up ?

Thx
 

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates - comma separated data

2011-06-21 Thread Wolfgang Laun
The operators in and not in operate on parenthesized lists of operands.
They can be used with a single template parameter expanding as a list.

   Person( likes in ( apple, banana, chili ) )

is the same as

  Person( likes == apple || == banana || == chili )

-W



On 21 June 2011 18:34, Witham, Darren darren.wit...@citi.com wrote:

 I have successfully generated a .drl file from a decision table. The column
 headers in this table made use of the forall(||) construct which happily
 parsed the corresponding comma separated data in the relevant spreadsheet
 cell to nice || separated conditions.

 We have since decided to use the template approach so we can store rule
 data in a db. We ideally want to store this data as key/value pairs in a db
 table where the values may contain comma separated data. The intention being
 these values would be processed as per the decision table.

 How is this achieved using a template ? I note that a column can be denoted
 as an array column by adding [] i.e.

 template header
 column[]


 However, although this appears create an ArrayColumn parser, and splits the
 comma separated data when running through a debugger, any attempt to access
 it in the template falls over in mvel code trying to call HashMap.column


 Any examples on how to set this up ?

 Thx


 ___
 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] Rule Templates

2011-04-14 Thread FrankVhh
Hi all,

In the Expert Guide and on some places on the internet, I read about Rule
Templates.

I think this is a very interesting feature. However, the expert manual
states to use it with caution as it is still an experimental feature.

Also, there isn't that much information on the web either.

Is it already encouraged to use it in production, or is it still very much
in a development phase and should it only be used for educational purposes?

Thanks a lot  lots of regards,
Frank

--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820139.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] Rule Templates

2011-04-14 Thread Wolfgang Laun
This feature is used internally (spreadsheet), and therefore one has to
assume that it's here to stay. The warning is mainly there because the API
is in the unstable part.
-W

On 14 April 2011 14:48, FrankVhh frank.vanhoensho...@agserv.eu wrote:

 Hi all,

 In the Expert Guide and on some places on the internet, I read about Rule
 Templates.

 I think this is a very interesting feature. However, the expert manual
 states to use it with caution as it is still an experimental feature.

 Also, there isn't that much information on the web either.

 Is it already encouraged to use it in production, or is it still very much
 in a development phase and should it only be used for educational purposes?

 Thanks a lot  lots of regards,
 Frank

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820139.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] Rule Templates

2011-04-14 Thread FrankVhh
Hi W.,

Thanks for the fast reply.

Meanwhile, I have been trying to play with the templates. Unfortunately, I
run into a nullpointerexception in the problems view of Eclipse. At first, I
hoped it was the same error as in
http://lists.jboss.org/pipermail/rules-users/2010-November/017229.html but
that does not seem to be the case.

Underneath, you can find my drl file. This is the only artifact that I am
having right now. There is no Java code yet, apart from the Price object.
This shouldn't be necessary to fix the problem either.

I tried to comment out some pieces of code to narrow down on the problem.
The nullpointerexception persists even if you comment everything from
package to the bottom of the file. This should indicate the problem has to
be in the template header, but I do not have a clue.

Could anyone help with this?

Thanks in advance.

==

template header
minimumValue
maximumValue
precision
startlevel
endlevel
roundingvalue

package rounding

import rounding.Price;

template Determine evaluated decimals
rule Determine evaluated decimals @{row.rowNumber}
salience 25
lock-on-active true
when
$price: Price(integerpart = @{minimumValue}  integerpart 
@{maximumValue}  evaluateddecimals == 999)
then
$price.setRoundedPrecision(@{precision});
$price.calculateNumberOfRoundedDecimals();
$price.calculateEvaluatedDecimals();
$price.calculateBasenumber();
update($price);
end
end template

template Determine rounding value
rule Determine rounding value @{row.rowNumber}
salience 0
no-loop true
when
$price: Price(integerpart = @{minimumValue}  integerpart 
@{maximumValue}  evaluateddecimals = @{startlevel}  evaluateddecimals 
@{endlevel})
then
$price.setRoundedPrice($price.getBasenumber() + 
@{roundingvalue});
System.out.println($price.getPrice() +  =  + (double)
$price.getRoundedPrice() / Math.pow(10,$price.getNumberofroundeddecimals())
);
end
end template

--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820343.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] Rule Templates

2011-04-14 Thread Wolfgang Laun
Not that I can see any problem. Disregard the Eclipse error, expand the
template as documented, and then we'll see what we'll see...
-W

On 14 April 2011 15:36, FrankVhh frank.vanhoensho...@agserv.eu wrote:

 Hi W.,

 Thanks for the fast reply.

 Meanwhile, I have been trying to play with the templates. Unfortunately, I
 run into a nullpointerexception in the problems view of Eclipse. At first,
 I
 hoped it was the same error as in
 http://lists.jboss.org/pipermail/rules-users/2010-November/017229.html but
 that does not seem to be the case.

 Underneath, you can find my drl file. This is the only artifact that I am
 having right now. There is no Java code yet, apart from the Price object.
 This shouldn't be necessary to fix the problem either.

 I tried to comment out some pieces of code to narrow down on the problem.
 The nullpointerexception persists even if you comment everything from
 package to the bottom of the file. This should indicate the problem has
 to
 be in the template header, but I do not have a clue.

 Could anyone help with this?

 Thanks in advance.

 ==

 template header
 minimumValue
 maximumValue
 precision
 startlevel
 endlevel
 roundingvalue

 package rounding

 import rounding.Price;

 template Determine evaluated decimals
 rule Determine evaluated decimals @{row.rowNumber}
salience 25
lock-on-active true
when
$price: Price(integerpart = @{minimumValue}  integerpart
 
 @{maximumValue}  evaluateddecimals == 999)
then
$price.setRoundedPrecision(@{precision});
$price.calculateNumberOfRoundedDecimals();
$price.calculateEvaluatedDecimals();
$price.calculateBasenumber();
update($price);
 end
 end template

 template Determine rounding value
 rule Determine rounding value @{row.rowNumber}
salience 0
no-loop true
when
$price: Price(integerpart = @{minimumValue}  integerpart
 
 @{maximumValue}  evaluateddecimals = @{startlevel}  evaluateddecimals
 
 @{endlevel})
then
$price.setRoundedPrice($price.getBasenumber() +
 @{roundingvalue});
System.out.println($price.getPrice() +  =  + (double)
 $price.getRoundedPrice() / Math.pow(10,$price.getNumberofroundeddecimals())
 );
 end
 end template

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820343.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] Rule Templates

2011-04-14 Thread FrankVhh
Hi,

After trying the example from the documentation, eclipse returned the same
error. So, I got the same idea and just worked further ignoring eclipse.

I saw what I saw and that was that it works fine now, even with the error
still displayed in the problems view.

Thanks for the help ;-)

Regards,
Frank


Wolfgang Laun-2 wrote:
 
 Not that I can see any problem. Disregard the Eclipse error, expand the
 template as documented, and then we'll see what we'll see...
 -W
 
 On 14 April 2011 15:36, FrankVhh lt;frank.vanhoensho...@agserv.eugt;
 wrote:
 
 Hi W.,

 Thanks for the fast reply.

 Meanwhile, I have been trying to play with the templates. Unfortunately,
 I
 run into a nullpointerexception in the problems view of Eclipse. At
 first,
 I
 hoped it was the same error as in
 http://lists.jboss.org/pipermail/rules-users/2010-November/017229.html
 but
 that does not seem to be the case.

 Underneath, you can find my drl file. This is the only artifact that I am
 having right now. There is no Java code yet, apart from the Price object.
 This shouldn't be necessary to fix the problem either.

 I tried to comment out some pieces of code to narrow down on the problem.
 The nullpointerexception persists even if you comment everything from
 package to the bottom of the file. This should indicate the problem has
 to
 be in the template header, but I do not have a clue.

 Could anyone help with this?

 Thanks in advance.

 ==

 template header
 minimumValue
 maximumValue
 precision
 startlevel
 endlevel
 roundingvalue

 package rounding

 import rounding.Price;

 template Determine evaluated decimals
 rule Determine evaluated decimals @{row.rowNumber}
salience 25
lock-on-active true
when
$price: Price(integerpart = @{minimumValue} 
 integerpart
 
 @{maximumValue}  evaluateddecimals == 999)
then
$price.setRoundedPrecision(@{precision});
$price.calculateNumberOfRoundedDecimals();
$price.calculateEvaluatedDecimals();
$price.calculateBasenumber();
update($price);
 end
 end template

 template Determine rounding value
 rule Determine rounding value @{row.rowNumber}
salience 0
no-loop true
when
$price: Price(integerpart = @{minimumValue} 
 integerpart
 
 @{maximumValue}  evaluateddecimals = @{startlevel} 
 evaluateddecimals
 
 @{endlevel})
then
$price.setRoundedPrice($price.getBasenumber() +
 @{roundingvalue});
System.out.println($price.getPrice() +  =  + (double)
 $price.getRoundedPrice() /
 Math.pow(10,$price.getNumberofroundeddecimals())
 );
 end
 end template

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820343.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
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Templates-tp2820139p2820731.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] Rule Templates and null values

2010-02-26 Thread Bernd Rücker
Hi all.



I question myself if I can get the Rule Templates to works like it is in
Excel: If one “parameter” is not set (null), the whole line of the
template is skipped?



Since we want to build a template for a lot of rules, fed from a database.
There some conditions can be null, so they should not be included in the
rule at all. Has anybody an idea to this? I haven’t found anything,
neither in the docs, nor in the testcases…



Thanks a lot

Bernd



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates and null values

2010-02-26 Thread Bernd Rücker
Okay, digging more into the source code I found the method
“replaceOptionals” which does exactly what I need. So despite the missing
docs, a line IS skipped if the according parameter used in that line is
null. Perfect :-)



Sorry for the interruption…



Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Bernd Rücker
Gesendet: Freitag, 26. Februar 2010 12:30
An: rules-users@lists.jboss.org
Betreff: [rules-users] Rule Templates and null values



Hi all.



I question myself if I can get the Rule Templates to works like it is in
Excel: If one “parameter” is not set (null), the whole line of the
template is skipped?



Since we want to build a template for a lot of rules, fed from a database.
There some conditions can be null, so they should not be included in the
rule at all. Has anybody an idea to this? I haven’t found anything,
neither in the docs, nor in the testcases…



Thanks a lot

Bernd



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates and null values

2010-02-26 Thread Pavel Tavoda
Enlighten us. Where is this method and how to use it? I'm also interested.

Palo

2010/2/26 Bernd Rücker bernd.ruec...@camunda.com:
 Okay, digging more into the source code I found the method
 “replaceOptionals” which does exactly what I need. So despite the missing
 docs, a line IS skipped if the according parameter used in that line is
 null. Perfect :-)



 Sorry for the interruption…



 Von: rules-users-boun...@lists.jboss.org
 [mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Bernd Rücker
 Gesendet: Freitag, 26. Februar 2010 12:30
 An: rules-users@lists.jboss.org
 Betreff: [rules-users] Rule Templates and null values



 Hi all.



 I question myself if I can get the Rule Templates to works like it is in
 Excel: If one “parameter” is not set (null), the whole line of the template
 is skipped?



 Since we want to build a template for a lot of rules, fed from a database.
 There some conditions can be null, so they should not be included in the
 rule at all. Has anybody an idea to this? I haven’t found anything, neither
 in the docs, nor in the testcases…



 Thanks a lot

 Bernd



 ___
 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] Rule Templates and null values

2010-02-26 Thread Bernd Rücker
It works out of the box. So in this example:

12 rule Cheese fa...@{row.rownumber}
13 when
14Person(age == @{age})
15Cheese(type == @{type})
16 then
17list.add(@{log});
18 end

If you provide age=null, line 14 is not included in the rule
automatically.



-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Pavel Tavoda
Gesendet: Freitag, 26. Februar 2010 14:46
An: Rules Users List
Betreff: Re: [rules-users] Rule Templates and null values

Enlighten us. Where is this method and how to use it? I'm also interested.

Palo

2010/2/26 Bernd Rücker bernd.ruec...@camunda.com:
 Okay, digging more into the source code I found the method
 “replaceOptionals” which does exactly what I need. So despite the
missing
 docs, a line IS skipped if the according parameter used in that line is
 null. Perfect :-)



 Sorry for the interruption…



 Von: rules-users-boun...@lists.jboss.org
 [mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Bernd Rücker
 Gesendet: Freitag, 26. Februar 2010 12:30
 An: rules-users@lists.jboss.org
 Betreff: [rules-users] Rule Templates and null values



 Hi all.



 I question myself if I can get the Rule Templates to works like it is in
 Excel: If one “parameter” is not set (null), the whole line of the
template
 is skipped?



 Since we want to build a template for a lot of rules, fed from a
database.
 There some conditions can be null, so they should not be included in the
 rule at all. Has anybody an idea to this? I haven’t found anything,
neither
 in the docs, nor in the testcases…



 Thanks a lot

 Bernd



 ___
 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] Rule Templates with empty cells

2010-01-25 Thread jschmied

Hi!

If I write rules in a decision table I can leave cells empty if I don't need
to use all of the conditions in a row.

How can I do this with the ExternalSpreadsheetCompiler? 

I would need something like:

rule ru...@{row.rownumber}
when
   $s : MyType1()
@ifDefined{field1}   $e : MyType2(val1 == @{field1}) from $s.SUB;
@ifDefined{field2}   $e : MyType2(val2 == @{field2}) from $s.SUB;
then
 retract($s);
end


Thanks

Juergen
-- 
View this message in context: 
http://n3.nabble.com/Rule-Templates-with-empty-cells-tp138571p138571.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates - Docs Examples?

2009-11-24 Thread Wolfgang Laun
An extensive rewrite of the section dealing with Templates was done in
the early stages of 5.0, and it ought to be available with current
snapshot releases. The relevant section is 5.2, Templates.

-W






On 11/24/09, Adam Rinehart adam.rineh...@gmail.com wrote:
 I am trying to research using a rule template driven by data from a
 spreadsheet, rather than using a straight decision table.

 I understand I need to use the ExternalSpreadsheetCompiler but am finding a
 distressing lack of information about the template format.

 The 5.0 docs seem to have mistakes; the code example for that section looks
 to have been cut  pasted from another section and does not match the text
 description of what is going on.

 Using google, the best I could find was a blog posting from Steven Williams
 on Aug 26, 2008: http://blog.athico.com/2008/08/drools-rule-templates.html

 In this blog posting, he said it was the first of 3 examples from the
 drools-examples project. But I could not find any additional blog postings
 by him on this subject.

 Does anyone know of additional documentation or examples on how rule
 templates work?

 Specifically, how to do optional columns, and array columns, similar to how
 the built in decision tables feature works?

 Adam

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates - Docs Examples?

2009-11-24 Thread Adam Rinehart
Looking at the 5.1 snapshots, these sections have not been updated since the
5.0 release. I'm looking at a 5.1 snapshot I downloaded on 11/2/09.

The relevent sections, specifically 5.1.7 and 5.2, seem to have errors
and/or omissions and those sections should have the information I'm looking
for. Unfortunately I don't know what the correct info should be, so I can't
submit an edit myself.

As an example, from the last part of 5.1.7:
snip

The code to run this is simple:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
DecisionTableConfiguration dtconf =
KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtconf.setInputType( DecisionTableInputType.XLS );
dtconf.setWorksheetName( Tables_2 );
kbuilder.add( ResourceFactory.newInputStreamResource( getSpreadsheetStream() ),
  ResourceType.DTABLE,
  dtconf );

CollectionKnowlegePackage kpkg = kbuilder.getKnowlegePackages();

We create an ExternalSpreadsheetCompiler object and use it to merge the
spreadsheet with the rules. The two integer parameters indicate the column
and row where the data actually starts - in our case column 2, row 2 (i.e.
B2)

/snip

The docs discuss creating an ExternalSpreadsheetCompiler in the example to
merge the spreadsheet with the rules template, but the example is for a
standard DecisionTable, without a custom template.

In section 5.2, it goes over templates, but does not discussion optional
values or array values.

I have reviewed the Drools-Example files. There is an example in there of
using array values, but not an example using optional values, which is what
I particularly need.


On Tue, Nov 24, 2009 at 1:17 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote:

 An extensive rewrite of the section dealing with Templates was done in
 the early stages of 5.0, and it ought to be available with current
 snapshot releases. The relevant section is 5.2, Templates.

 -W






 On 11/24/09, Adam Rinehart adam.rineh...@gmail.com wrote:
  I am trying to research using a rule template driven by data from a
  spreadsheet, rather than using a straight decision table.
 
  I understand I need to use the ExternalSpreadsheetCompiler but am finding
 a
  distressing lack of information about the template format.
 
  The 5.0 docs seem to have mistakes; the code example for that section
 looks
  to have been cut  pasted from another section and does not match the
 text
  description of what is going on.
 
  Using google, the best I could find was a blog posting from Steven
 Williams
  on Aug 26, 2008:
 http://blog.athico.com/2008/08/drools-rule-templates.html
 
  In this blog posting, he said it was the first of 3 examples from the
  drools-examples project. But I could not find any additional blog
 postings
  by him on this subject.
 
  Does anyone know of additional documentation or examples on how rule
  templates work?
 
  Specifically, how to do optional columns, and array columns, similar to
 how
  the built in decision tables feature works?
 
  Adam
 
 ___
 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] Rule Templates - Docs Examples?

2009-11-23 Thread Adam Rinehart
I am trying to research using a rule template driven by data from a
spreadsheet, rather than using a straight decision table.

I understand I need to use the ExternalSpreadsheetCompiler but am finding a
distressing lack of information about the template format.

The 5.0 docs seem to have mistakes; the code example for that section looks
to have been cut  pasted from another section and does not match the text
description of what is going on.

Using google, the best I could find was a blog posting from Steven Williams
on Aug 26, 2008: http://blog.athico.com/2008/08/drools-rule-templates.html

In this blog posting, he said it was the first of 3 examples from the
drools-examples project. But I could not find any additional blog postings
by him on this subject.

Does anyone know of additional documentation or examples on how rule
templates work?

Specifically, how to do optional columns, and array columns, similar to how
the built in decision tables feature works?

Adam
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Rule Templates and Guvnor

2009-02-18 Thread Vikrant Yagnick
Hi All,

I was wondering if there is any support for Rule Templates directly in Guvnor.  
I haven't been able to find anything in the official documentation or by 
playing around Guvnor.
Does someone have any ideas as to how one would store templates in Guvnor?


Cheers,
Vikrant Yagnick
Software Designer - CLICO

MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park, Mahape, 
Navi  Mumbai 400-710   |
(T) 91 22 6695 Extn - 5230 | Mobile: +919833490598 | www.mastek.com

MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
desktop and server.
~~
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates and Guvnor

2009-02-18 Thread Toni Rikkola

Hi,

You can't use templates at the moment.

But you can use the copy function in the rule editor. Create a rule that 
is used as a base, disable it and copy this rule when creating new ones.


Toni Rikkola

Vikrant Yagnick wrote:


Hi All,

I was wondering if there is any support for Rule Templates directly in 
Guvnor. I haven’t been able to find anything in the official 
documentation or by playing around Guvnor.


Does someone have any ideas as to how one would store templates in 
Guvnor?


*Cheers,*

*Vikrant Yagnick*

Software Designer - CLICO

MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park, 
Mahape, Navi Mumbai 400-710 |


(T) 91 22 6695 Extn - 5230 | Mobile: +919833490598 | _www.mastek.com_




MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not 
that of Mastek Limited, unless specifically indicated to that effect. 
Mastek Limited does not accept any responsibility or liability for it. 
This e-mail and attachments (if any) transmitted with it are 
confidential and/or privileged and solely for the use of the intended 
person or entity to which it is addressed. Any review, 
re-transmission, dissemination or other use of or taking of any action 
in reliance upon this information by persons or entities other than 
the intended recipient is prohibited. This e-mail and its attachments 
have been scanned for the presence of computer viruses. It is the 
responsibility of the recipient to run the virus check on e-mails and 
attachments before opening them. If you have received this e-mail in 
error, kindly delete this e-mail from desktop and server.

~~



___
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] Rule Templates and Guvnor

2009-02-18 Thread Vikrant Yagnick
Hi Tony,

We were actually looking to use Templates because our clients objected to 
having code or pseudo-code in an Excel along with the data.
Templates, seem an excellent feature where the code bits can be separated from 
the data bits.

One thought I had was to store the templates in the other assets part of 
Guvnor and the data as well and somehow write something that can pull these out 
at run-time and create and compile the rules. However, we do loose all the 
other functionality that Guvnor provides.(Like rule analysis etc).

Any idea, if Guvnor is going to support templates in a future release?

Cheers,
Vikrant

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Toni Rikkola
Sent: Wednesday, February 18, 2009 5:02 PM
To: Rules Users List
Subject: Re: [rules-users] Rule Templates and Guvnor

Hi,

You can't use templates at the moment.

But you can use the copy function in the rule editor. Create a rule that
is used as a base, disable it and copy this rule when creating new ones.

Toni Rikkola

Vikrant Yagnick wrote:

 Hi All,

 I was wondering if there is any support for Rule Templates directly in
 Guvnor. I haven't been able to find anything in the official
 documentation or by playing around Guvnor.

 Does someone have any ideas as to how one would store templates in
 Guvnor?

 *Cheers,*

 *Vikrant Yagnick*

 Software Designer - CLICO

 MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park,
 Mahape, Navi Mumbai 400-710 |

 (T) 91 22 6695 Extn - 5230 | Mobile: +919833490598 | _www.mastek.com_




 MASTEK LTD.
 Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
 In the US, we're called MAJESCOMASTEK

 ~~
 Opinions expressed in this e-mail are those of the individual and not
 that of Mastek Limited, unless specifically indicated to that effect.
 Mastek Limited does not accept any responsibility or liability for it.
 This e-mail and attachments (if any) transmitted with it are
 confidential and/or privileged and solely for the use of the intended
 person or entity to which it is addressed. Any review,
 re-transmission, dissemination or other use of or taking of any action
 in reliance upon this information by persons or entities other than
 the intended recipient is prohibited. This e-mail and its attachments
 have been scanned for the presence of computer viruses. It is the
 responsibility of the recipient to run the virus check on e-mails and
 attachments before opening them. If you have received this e-mail in
 error, kindly delete this e-mail from desktop and server.
 ~~

 

 ___
 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


MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
desktop and server.
~~


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates and Guvnor

2009-02-18 Thread Mark Proctor

Vikrant Yagnick wrote:

Hi Tony,

We were actually looking to use Templates because our clients objected to having code or 
pseudo-code in an Excel along with the data.
Templates, seem an excellent feature where the code bits can be separated from 
the data bits.

One thought I had was to store the templates in the other assets part of 
Guvnor and the data as well and somehow write something that can pull these out at 
run-time and create and compile the rules. However, we do loose all the other 
functionality that Guvnor provides.(Like rule analysis etc).

Any idea, if Guvnor is going to support templates in a future release?
  
We want to but so far have had little end user feedback on templates, so 
they are still classed as experimental. If it gets more community 
support and the community helps mature the api and featureset we will 
look to support this fully. It's just there are lots of different ways 
the templates could work, not just from excel, but any tabular data 
source like a DB, so want to make sure we get it right and it's just 
been a lower priority than getting drools 5.0 out the door.


Mark

Cheers,
Vikrant

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Toni Rikkola
Sent: Wednesday, February 18, 2009 5:02 PM
To: Rules Users List
Subject: Re: [rules-users] Rule Templates and Guvnor

Hi,

You can't use templates at the moment.

But you can use the copy function in the rule editor. Create a rule that
is used as a base, disable it and copy this rule when creating new ones.

Toni Rikkola

Vikrant Yagnick wrote:
  

Hi All,

I was wondering if there is any support for Rule Templates directly in
Guvnor. I haven't been able to find anything in the official
documentation or by playing around Guvnor.

Does someone have any ideas as to how one would store templates in
Guvnor?

*Cheers,*

*Vikrant Yagnick*

Software Designer - CLICO

MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park,
Mahape, Navi Mumbai 400-710 |

(T) 91 22 6695 Extn - 5230 | Mobile: +919833490598 | _www.mastek.com_




MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not
that of Mastek Limited, unless specifically indicated to that effect.
Mastek Limited does not accept any responsibility or liability for it.
This e-mail and attachments (if any) transmitted with it are
confidential and/or privileged and solely for the use of the intended
person or entity to which it is addressed. Any review,
re-transmission, dissemination or other use of or taking of any action
in reliance upon this information by persons or entities other than
the intended recipient is prohibited. This e-mail and its attachments
have been scanned for the presence of computer viruses. It is the
responsibility of the recipient to run the virus check on e-mails and
attachments before opening them. If you have received this e-mail in
error, kindly delete this e-mail from desktop and server.
~~



___
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


MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
desktop and server