Mark Proctor | 4 Jan 21:46

[rules-dev] "true modify"

The first commit for "true modify" is in....
http://blog.athico.com/2010/01/rete-and-true-modify.html

Mark

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Michael Neale | 6 Jan 02:22
Picon
Gravatar

[rules-dev] plugging in a new resource type for the Knowledge Builder stuff

(this is for Mark - perhaps Salaboy as well?)

Someone was asking if it is/would be possible to plug in a new
"resource type" that generates rules (say another XLS style format) -
without changing core code - is this doable/an aim of the resource
framework stuff?

--

-- 
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Mark Proctor | 7 Jan 00:49

Re: [rules-dev] plugging in a new resource type for the Knowledge Builder stuff

On 06/01/2010 01:22, Michael Neale wrote:
> (this is for Mark - perhaps Salaboy as well?)
>
> Someone was asking if it is/would be possible to plug in a new
> "resource type" that generates rules (say another XLS style format) -
> without changing core code - is this doable/an aim of the resource
> framework stuff?
>
>    
It's doable, but wasn't planned yet. I would probably have a more 
generate USER_TYPE resource type, that then allows people to do what 
ever they want.

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Michael Neale | 7 Jan 02:19
Picon
Gravatar

Re: [rules-dev] plugging in a new resource type for the Knowledge Builder stuff

ok - yes USER_TYPE was what some one was suggesting, a generic
mechanism for handling things based on type.

Given that in many many cases, people have all sorts of funky code
that translates stuff to drl, it would be a really nice feature to
allow people to plug in what they are already doing, so they can
benefit from the KA managing their resource loading.

Well see if a patch is doable to provide this feature.

On Thu, Jan 7, 2010 at 10:49 AM, Mark Proctor <mproctor <at> codehaus.org> wrote:
> On 06/01/2010 01:22, Michael Neale wrote:
>> (this is for Mark - perhaps Salaboy as well?)
>>
>> Someone was asking if it is/would be possible to plug in a new
>> "resource type" that generates rules (say another XLS style format) -
>> without changing core code - is this doable/an aim of the resource
>> framework stuff?
>>
>>
> It's doable, but wasn't planned yet. I would probably have a more
> generate USER_TYPE resource type, that then allows people to do what
> ever they want.
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev <at> lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
(Continue reading)

HonorGod | 10 Jan 15:38

Re: [rules-dev] drools compiler issue


I ran into same issue.....can you plz help me resolve it.

Thanks.

glasscat wrote:
> 
> I'm using the Drools 5.0.0 M5, with Guvnor, when I tried to save and
> validate my configuration, I got this error:
> [ERR 102] Line 5:63 mismatched input '-'
> 
> It's pointing to this line:
> import <my pachage path>.package-info
> 
> Does drools support package with "-" characters? The package is part of
> jaxws generated artifacts.
> 
> Thanks
> 
> _______________________________________________
> rules-dev mailing list
> rules-dev <at> lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
> 
> 

--

-- 
View this message in context: http://n3.nabble.com/drools-compiler-issue-tp64600p115957.html
Sent from the Drools - Dev mailing list archive at Nabble.com.
_______________________________________________
(Continue reading)

HonorGod | 10 Jan 18:07

[rules-dev] [ERR 102] Line 593:54 mismatched input '-'


How do I resolve this issue in Guvnor. I have imported my model jar and it
seems to have some generated class file package-info.class and drools is
complaining about the presence of the hyphen [which in legal] but how do i
resolve this issue.

Thanks.
--

-- 
View this message in context: http://n3.nabble.com/ERR-102-Line-593-54-mismatched-input-tp116073p116073.html
Sent from the Drools - Dev mailing list archive at Nabble.com.
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Michael Neale | 11 Jan 03:00
Picon
Gravatar

Re: [rules-dev] drools compiler issue

Hi All.

OK this looks like a problem - the only immidiate work around is to
remove those files from the jar.

In terms of a longer term solution, please take a look at:
org.drools.guvnor.server.contenthandle/ModelContentHandler.java

change line 68 to be:

if ( entry.getName().endsWith( ".class" ) && entry.getName().indexOf(
'$' ) == -1 && entry.getName().indexOf('-') == -1) {

and that should filter out any "package-info." bits ? it someone able
to try this and confirm it works? I have attached a modified
ModelContentHandler.java - if it is ok - I will commit it (not sure
what other things need to be filtered out - seems the "-" is
definately not valid).

On Wed, Mar 25, 2009 at 5:29 AM, Greg Barton <greg_barton <at> yahoo.com> wrote:
>
> Dev d00ds, is there some way for Guvnor to filter out package-info?  I'm not sure if there are other pseudo
classes out there besides package-info, but you could just filter out all classes with names that are not
java identifiers just to future proof.
>
> --- On Tue, 3/24/09, glasscat <aburasheed <at> studentmasjid.com> wrote:
>
>> From: glasscat <aburasheed <at> studentmasjid.com>
>> Subject: Re: [rules-dev] drools compiler issue
>> To: rules-dev <at> lists.jboss.org
(Continue reading)

Taras Svirskyi | 12 Jan 16:50
Picon

[rules-dev] "not contains" doesn't work on inner fields

Hi,
  I don't know exactly is it a bug or am I doing something wrong.
  Consider following example.
  There are nodes that are connected into directed graph. Each node has 
special collection of attributes. Under some conditions attributes 
should be propagated along the edges in the graph.

  Lets model this with following code.

/******* propagation rules **********************/
package com.test.collection;

rule "move child"
when
	c : Child()
	s : CNode( children contains c)		
	l : Link( src == s,
		  t : target && target.children not contains c )
then
	System.out.println("adding "+c+" from "+s+" to "+t);
	t.addChild(c);
	update(t);
end

/** Child.java (represent special attributes of a node) *******/
package com.test.collection;

public class Child {
	private String name;	
	public Child(String name){
(Continue reading)

Edson Tirelli | 12 Jan 18:57
Picon
Gravatar

Re: [rules-dev] "not contains" doesn't work on inner fields


> So the question is it a bug or a feature? :)

   Well, there are no bugs, only features! ;)
   But we still should change the feature to properly match the spec semantics of "not". :) Can you please open a ticket and attach your test case bellow? Should be an easy fix.

   Thanks,
   Edson

2010/1/12 Taras Svirskyi <stware <at> gmail.com>
Hi,
 I don't know exactly is it a bug or am I doing something wrong.
 Consider following example.
 There are nodes that are connected into directed graph. Each node has
special collection of attributes. Under some conditions attributes
should be propagated along the edges in the graph.

 Lets model this with following code.

/******* propagation rules **********************/
package com.test.collection;

rule "move child"
when
       c : Child()
       s : CNode( children contains c)
       l : Link( src == s,
                 t : target && target.children not contains c )
then
       System.out.println("adding "+c+" from "+s+" to "+t);
       t.addChild(c);
       update(t);
end


/** Child.java (represent special attributes of a node) *******/
package com.test.collection;

public class Child {
       private String name;
       public Child(String name){
               this.name = name;
       }
       public String getName() {
               return name;
       }
        <at> Override
       public String toString() {
               return "child("+name+")";
       }
}

/********* CNode.java - nodes of a graph *************/
package com.test.collection;

import java.util.HashSet;
import java.util.Set;

public class CNode {
       private Set<Child> children;

       public CNode() {
               this.children = new HashSet<Child>();
       }

       public Set<Child> getChildren() {
               return children;
       }

       public void addChild(Child ch){
               children.add(ch);
       }

        <at> Override
       public String toString() {
               return "Node{children="+children+"}";
       }
}

/**** Link.java - edges of a graph *******/
package com.test.collection;

public class Link {
       private CNode src;
       private CNode target;

       public Link(CNode src, CNode target) {
               this.src = src;
               this.target = target;
       }

       public CNode getSrc() {
               return src;
       }

       public CNode getTarget() {
               return target;
       }
}

/********************* populate session with facts **********/
Child c0 = new Child("x");
Child c1 = new Child("y");
Child c2 = new Child("z");

CNode src = new CNode();
src.addChild(c0);
src.addChild(c1);

CNode target = new CNode();
target.addChild(c0);

Link link = new Link(src,target);

// populate with facts
ksession.insert(c0);
ksession.insert(c1);
ksession.insert(c2);
ksession.insert(link);
ksession.insert(src);
ksession.insert(target);

/****************************************************************/
So with all that code listed below I've got following output from rules:
--
adding child(x) from Node{children=[child(x), child(y)]} to
Node{children=[child(x)]}
--
That means that 'not contains' operator actually works as 'contains'
one. Still when I changed it to older operator 'excludes' everything
goes right printing out.
---
adding child(y) from Node{children=[child(y), child(x)]} to
Node{children=[child(x)]}
---

I've noticed that rewriting rule in form of simple statements also fix
issue.

rule "move child"
when
       c : Child()
       s : CNode( children contains c)
       t : CNode( children not contains c )
       l : Link( src == s, target == t)
then
       System.out.println("adding "+c+" from "+s+" to "+t);
       t.addChild(c);
       update(t);
end

So the question is it a bug or a feature? :)

regards,
Taras
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat <at> www.jboss.com
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 13 Jan 11:23

[rules-dev] Fwd: Author Drools Book-Packt Publishing

Seems there might be a 3rd packet book. any takers? :)

Mark

-------- Original Message -------- Subject: Date: From: To:
Author Drools Book-Packt Publishing
Wed, 13 Jan 2010 15:41:51 +0530
Sayama Waghu <sayamaw <at> packtpub.com>
mproctor <at> codehaus.org


Hi , I’m writing to you for Packt Publishing, the publishers of computer related books. We are planning to publish a new book on Drools, titled, Drools Developer Cookbook.While looking out for some potential authors to write this book, I came across your profile and saw. that you were one of the contributor and I also see that you write blogs on Drools.These give me an impression that you could be a potential author for this book. Written in a cookbook style, this book will be aimed at Java developers who already have experience of working with Drools and would like to learn how to do more stuff with it. To give you an idea about the way things work at Packt: -The editorial team at Packt works with the author throughout the project -We pay a royalty of 16% and an advance against it. -The marketing team at Packt ensures that the book is well promoted. -In its ongoing commitment to Open Source, Packt donates a percentage of revenue generated by the book to the OpenSource project on which it is based. We have donated more than 100 000 dollars to various Open Source projects since inception in 2004. Could you please let me know if you find it interesting to author this book? Thanks. -- -- *Sayama Waghu* Author Relationship Executive Packt Publishing www.PacktPub.com <http://www.PacktPub.com> Skype: sayama_packt MSN: sayamaw <at> packtpub.com Interested in becoming an author? Visit http://authors.packtpub.com for all the information you need about writing for Packt.
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Gmane