Re: [rules-users] Smart Templates

2011-06-02 Thread ChrisMu
-1152173798-404...@n3.nabble.com] Sent: 01 June 2011 17:31 To: Mullard, Christopher Subject: Re: [rules-users] Smart Templates You just add it to the template file as "header text". Have you read the documentation on templates? Which version? -W 2011/6/1 ChrisMu <[hidden email

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
a objects, using templates. If this is correct, could you tell me how you are going to manage these objects? Regards, Frank ChrisMu wrote: Sorry - you're losing me - could you give an example please? Thanks __

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
, search for "And, finally, here is an example of Import, Variables and Functions." The figure below shows cells from a spreadsheet. -W 2011/6/1 ChrisMu <[hidden email]> Sorry - you're losing me - could you give an example please?

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
It's just like a Java static method. Call JAva code if you don't want to put it all into DRL function, or import from Java in the first place. Both "import" and "function" can be used in spreadsheets. -W 2011/6/1 ChrisMu <[hidden email]> Agre

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
, Christopher Subject: Re: [rules-users] Smart Templates If there are just 2 types (IRDELTA, COMLEASEDELTA) you can add a function that computes this from the 3-letter name. -W 2011/6/1 ChrisMu <[hidden email]> Possibly. Let me try again with what I'm trying to achieve.

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
Possibly. Let me try again with what I'm trying to achieve. Given this excerpt from a decision table: Basically I want to be able to specify a template that says 'If Arg0 is a currency, output RiskType IRDELTA (and currency), if Arg0 is a commodity (begins with 'X') then output RiskType COM

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
ll the expander for a template like this: rule "DC_@{row.rowNumber}" when   $service: Service(name == "@{service}", value == "@{value}")   $riskType: RiskType() then   $riskType.setName("@{type}");   $riskType.setAtt(0,"@{value}"

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
ediate value whose value will be set by another rule and then use this intermediate value in your DC rules. When Service(value = "AAA") Then String name = "Type1"; insert(name); Something like this... but make sure not to create a loop :-) Regards, Frank

Re: [rules-users] Smart Templates

2011-05-31 Thread ChrisMu
eady inserted in WM, but you could just as well create a new object in the then-part of the rule. In stead of using the java-function to determine the name, you might actually just as well create an other rule that sets the name according to the value, thus putting the entire decision logic in rul

[rules-users] Smart Templates

2011-05-31 Thread ChrisMu
Hi, I'm trying to get a template (.drt) to generate 2 rules (.drl) from 2 datasets but by doing a little bit more work than direct substitution. Data (service,value): DC, AAA DC, XYZ Idea for the template - if value is of type1 then create Type object with 'Type1' as name. If value is of type2,