Re: [rules-users] Is there any work going on for Drools on .net?

2011-06-01 Thread rahultechie
Thanks for information. But I am not able to download that example . Can you please tell me how to download that example? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-work-going-on-for-Drools-on-net-tp3000917p3014008.html Sent from the Drools: User forum maili

Re: [rules-users] TimerService vs TimeMachine and date-effective

2011-06-01 Thread Mark Proctor
On 01/06/2011 21:37, drdaveg wrote: > A common issue that I am looking into is setting the execution date to test > future or legacy rules (i.e., with dates that are not the system date.) A > number of users have posted about TimeMachine, TimeServices and the perils > of setting the system date -

[rules-users] TimerService vs TimeMachine and date-effective

2011-06-01 Thread drdaveg
A common issue that I am looking into is setting the execution date to test future or legacy rules (i.e., with dates that are not the system date.) A number of users have posted about TimeMachine, TimeServices and the perils of setting the system date - but a JIRA lists TimeMachine as being remove

Re: [rules-users] Decision table imported into guvnor fails validation

2011-06-01 Thread lhorton
I solved this issue. Originally I uploaded our full domain object model. This approach works fine for our technical rules even though many of the objects in the model aren't used directly in the rules. However, it seems that for decision tables, only the objects used in the decision table import

[rules-users] list operations in "then" part

2011-06-01 Thread Simon Chen
Hi all, I am always confused about what we can do in the "then" part of the rule. In particular, I have problem duplicate a list. For example: when: $b: Book( "james" memberOf authors ) then: Test fact = new Test(); fact.getList().addAll( $b.authors ); insert(fact); end The error messag

[rules-users] Camel-drools example

2011-06-01 Thread Serge Vilvovsky
Can anybody provide, please, the example of using camel with drools? Where should I place the drool files if I run them in ServiceMix? Thank you! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-user

[rules-users] Looking for simple drools-camel (non-spring) example

2011-06-01 Thread bjh6392
Since the drools pipeline is deprecated, I'm interested in putting together a simple example using drools-camel that acts as a pipeline between a JMS queue and Drools Fusion. The starting point would be no transformation, just pull pojos out of a queue entrypoint and into a drools endpoint using c

Re: [rules-users] Problem with sub-process rules inside multiple instances

2011-06-01 Thread Esteban Aliverti
Yes, I was talking about a dummy object that must be inserted before the Rule Node. Your rules then should use this object at its first restriction, but there is no need to modify it. Ej: when Guard() then end The low-salience rule I was talking about is meant to clean up the s

Re: [rules-users] how to do things like "distinct"?

2011-06-01 Thread Wolfgang Laun
On 1 June 2011 16:55, Simon Chen wrote: > Hi all, > > I have the following problem. > > Let's say, I have a class Number3(), with three fields a, b, and c. > > I have the following rule: > > rule "test3" >when >Number3($a: a, $b: b) >$minvalue: Number() >from accum

Re: [rules-users] Smart Templates

2011-06-01 Thread Wolfgang Laun
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 > Ok, thanks, but how do I do that in a template? > > -- > *From:* Wolfgang Laun-2 [via Drools] [mailto:[hidden > email]

Re: [rules-users] Create rules programatically

2011-06-01 Thread Michael Anstis
Edson's proposal is probably what you're after for 5.2+, Guvnor also has an 'internal' API that it uses to construct rules - although this ultimately become DRL that is compiled. sent on the move On 1 Jun 2011 15:52, "Mark Proctor" wrote: > You can also just generate strings at runtime, either v

Re: [rules-users] Smart Templates

2011-06-01 Thread Wolfgang Laun
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 > Agreed, but this was just an example - if the function required somethin

Re: [rules-users] Smart Templates

2011-06-01 Thread FrankVhh
Load the data from a DB and instantiate Java objects with that. Then generate the rule set using a template. => OK, in this case, I would call the function getType() during the instantiation of the java objects. On the manageability topic: I have no knowledge of your data model, but I can indeed i

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
Ideally: Load the data from a DB and instantiate Java objects with that. Then generate the rule set using a template. The DB data would provide the list of permitted values per field. The rule results are generated based on the inputs. This avoids users having to enter one rule for every sing

Re: [rules-users] Smart Templates

2011-06-01 Thread FrankVhh
Hi, Basically, you have 2 options. 1) You call the function getType() from your .drl file. The function will be executed at runtime. header name value TEMPLATE WHEN blabla THEN $type.setName($service.getType("@{value}")); 2) Execute the function before you compile your rules with Rule Template

[rules-users] how to do things like "distinct"?

2011-06-01 Thread Simon Chen
Hi all, I have the following problem. Let's say, I have a class Number3(), with three fields a, b, and c. I have the following rule: rule "test3" when Number3($a: a, $b: b) $minvalue: Number() from accumulate(Number3(a == $a, b == $b, $c: c), min($c)) then

Re: [rules-users] Create rules programatically

2011-06-01 Thread Mark Proctor
You can also just generate strings at runtime, either via StringBuilder or templating, and compile them at runtime. Mark On 01/06/2011 14:43, Edson Tirelli wrote: David, For 5.2 we are introducing a high level API for rule authoring. Documentation is not ready yet, but you can see the

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
Ok, thanks, but how do I do that in a template? From: Wolfgang Laun-2 [via Drools] [mailto:ml-node+3011098-67106608-404...@n3.nabble.com] Sent: 01 June 2011 15:46 To: Mullard, Christopher Subject: Re: [rules-users] Smart Templates In the Drools Expert manual,

Re: [rules-users] Smart Templates

2011-06-01 Thread Wolfgang Laun
In the Drools Expert manual, 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 > Sorry - you're losing me - could you give an example please? > > Thanks > > -- > *Fr

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
Sorry - you're losing me - could you give an example please? Thanks From: Wolfgang Laun-2 [via Drools] [mailto:ml-node+3010989-1781642469-404...@n3.nabble.com] Sent: 01 June 2011 15:25 To: Mullard, Christopher Subject: Re: [rules-users] Smart Templates It's j

Re: [rules-users] Create rules programatically

2011-06-01 Thread Edson Tirelli
David, For 5.2 we are introducing a high level API for rule authoring. Documentation is not ready yet, but you can see the API here: https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api

[rules-users] Create rules programatically

2011-06-01 Thread David Godfrey
Hi, Can someone point me in the direction of documentation or code examples for the following? I want to programatically create rules for execution, e.g. within my application I will hold criteria which users will define, at runtime I would like to build a component to extract these values (from m

Re: [rules-users] Reuse of rule

2011-06-01 Thread Küng Sabrina
Yes, sorry. I will try the extends and get back with a clearer question. Thanks. From: Küng Sabrina Sent: Mittwoch 1 Jun 2011 13:22 To: 'rules-users@lists.jboss.org' Subject: RE: Reuse of rule Thanks for your input. I am looking forward to the plugin. How can I us

Re: [rules-users] Java 7 Support

2011-06-01 Thread Mark Proctor
On 01/06/2011 12:27, Sebastian wrote: > Hello, > > I tried to use Drools with the OpenJDK 7, but I could not get it to work. > After some debugging I found out, that the map nativeVersions in > EclipseJavaCompilerSettings is missing version 1.7 which is actually defined > as a public static variabl

Re: [rules-users] Problem with sub-process rules inside multiple instances

2011-06-01 Thread HMandic
Hmmm, that could be it! I'm not sure I understand what you mean by that "guard" object. Would that mean that I should insert some dummy object in a script node (action node) before my rule node and change its value inside this rule, so the rule could be triggered when the second and third instance

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
Agreed, but this was just an example - if the function required something more complicated - say a DB lookup, could it be done? From: Wolfgang Laun-2 [via Drools] [mailto:ml-node+3010275-1108018130-404...@n3.nabble.com] Sent: 01 June 2011 12:40 To: Mullard, Chr

Re: [rules-users] Problem with sub-process rules inside multiple instances

2011-06-01 Thread Esteban Aliverti
I'm not sure, but it could be that your rules (which is really just one rule) belongs to the same rule-flow-group. So, when the first rule node is executed, the rule-flow-group is activated and the rule get fired. When the second rule node is executed (in the second iteration of your multiple-insta

Re: [rules-users] Reuse of rule

2011-06-01 Thread Wolfgang Laun
2011/6/1 Küng Sabrina > > > How can I use a rule in the if-part (or as precondition) of another rule? > Is that possible without using a ruleflow? > The Q is a bit vague, but "rule X extends Y" might be the answer. -W ___ rules-users mailing list rules

Re: [rules-users] Smart Templates

2011-06-01 Thread Wolfgang Laun
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 > 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 templ

[rules-users] Java 7 Support

2011-06-01 Thread Sebastian
Hello, I tried to use Drools with the OpenJDK 7, but I could not get it to work. After some debugging I found out, that the map nativeVersions in EclipseJavaCompilerSettings is missing version 1.7 which is actually defined as a public static variable. Can you tell me when you plan on adding JDK7 s

Re: [rules-users] Reuse of rule

2011-06-01 Thread Küng Sabrina
Thanks for your input. I am looking forward to the plugin. How can I use a rule in the if-part (or as precondition) of another rule? Is that possible without using a ruleflow? From: Küng Sabrina Sent: Montag 30 Mai 2011 13:52 To: 'rules-users@lists.jboss.org' Sub

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 Wolfgang Laun
I don't want to confuse you, but have you considered *not *using templates at all? If you can generate N rules from N objects containing different literals for matching a fact or for updating a fact field, then you can achieve the same thing with a single rule *and additional facts containing those

Re: [rules-users] Smart Templates

2011-06-01 Thread Wolfgang Laun
This looks as if you inserted some object ServiceBean extends HashMap as a fact? Whatever for? Originally, this was class Service. Make sure to distinguish template expansion from rule execution. The former should result in a DRL file containing several rules (all with different names!). -W 2

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
I get this exception: Exception in thread "main" org.drools.runtime.rule.ConsequenceException: rule: RFI1 at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39) at org.drools.common.DefaultAgenda.fireActivation(DefaultAge

[rules-users] Problem with sub-process rules inside multiple instances

2011-06-01 Thread HMandic
Does anyone have a working example of a sub-process with rules, inside a multiple instances node? I can't get it to work properly. This sub-process of mine has one script node (that just prints something) and one rule. Multiple instances node gets a Collection of three elements, so the sub-proce

Re: [rules-users] Smart Templates

2011-06-01 Thread Wolfgang Laun
There is a way, provided the required information is available at the time the rule is created. There is a detailed section in the Expert manual explaining how to call template expansion with either a Collection of Map objects or a Collection of JavaBean objects. Taking beans, you would have Serv

Re: [rules-users] Smart Templates

2011-06-01 Thread ChrisMu
So in essence, there's no way to use a function to insert a string literal into a rule from a template? From: FrankVhh [via Drools] [mailto:ml-node+3006773-799208963-404...@n3.nabble.com] Sent: 31 May 2011 17:20 To: Mullard, Christopher Subject: RE: Smart Templat