[rules-users] Getting the Fact type for Declared Types

2010-07-19 Thread Srinath Perera
Hi All,

I have declared type (rules are given below), and I want to access it
through  kbase.getFactType(...) see below.

= Rule  =
package sample1

import java.util.Date

declare Person
name : String
dateOfBirth : Date
address : String
end

 Code =
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newFileResource("src/ruleset1.drl"),
  ResourceType.DRL );
 kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );


 StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();
  // get the declared FactType
 FactType personType = kbase.getFactType( "sample1", "Person" );



But personType returned by kbase.getFactType(..) is null. Could anyone
know can give me a hand?

--Srinath


-- 
========
Srinath Perera, Ph.D.
   WSO2 Inc. http://wso2.com
   Blog: http://srinathsview.blogspot.com/

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


Re: [rules-users] How to get source code for Drools 4.0.1

2008-03-20 Thread Srinath Perera
Thanks!! will give it a try
--Srinath

On Wed, Mar 19, 2008 at 2:09 PM, Fernando Meyer <[EMAIL PROTECTED]> wrote:
> you can get the source from svn and build anything you want :)
>
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/4.0.1.14754GA/
>
>
>
>
>
> On Wed, Mar 19, 2008 at 3:05 PM, Srinath Perera <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hi All;
> >
> > I need the source code and eclipse workbench for  Drools 4.0.1.
> > However with 4.0.4 release old links are updated. Anybody knows those
> > links?
> >
> > Thanks
> > Srinath
> >
> > --
> > 
> >
> >
> >
> > Srinath Perera:
> >  Indiana University, Bloomington
> >  http://www.cs.indiana.edu/~hperera/
> >  http://www.bloglines.com/blog/hemapani
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> --
> Fernando Meyer http://fmeyer.org
> JBoss Rules Core Developer
> [EMAIL PROTECTED]
> ___
>  rules-users mailing list
>  rules-users@lists.jboss.org
>  https://lists.jboss.org/mailman/listinfo/rules-users
>
>



-- 

Srinath Perera:
 Indiana University, Bloomington
 http://www.cs.indiana.edu/~hperera/
 http://www.bloglines.com/blog/hemapani
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] How to get source code for Drools 4.0.1

2008-03-19 Thread Srinath Perera
Hi All;

I need the source code and eclipse workbench for  Drools 4.0.1.
However with 4.0.4 release old links are updated. Anybody knows those
links?

Thanks
Srinath

-- 

Srinath Perera:
 Indiana University, Bloomington
 http://www.cs.indiana.edu/~hperera/
 http://www.bloglines.com/blog/hemapani
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Distributed Rete algorithem

2008-01-25 Thread Srinath Perera
Hi All;

Does anyone knows of a effort to make Rete algorithm (Drools)
distributed? By any chance is there  a implementation?

Thanks
Srinath

-- 

Srinath Perera:
   Indiana University, Bloomington
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Beauty of style and harmony and grace and good rhythm depend on
simplicity -- Plato
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] How does no-loop work?

2008-01-21 Thread Srinath Perera

Hi All;

I was trying to use no-loop to avoid rule being triggered recursively. 
However for following rule, when there are more than one one object of 
type DataProduct, no-loop attribute has no effect.


rule "Collect"
no-loop true
when
q: Query();
buffer : java.util.Vector();
d: DataProduct();
then
q.addDataProduct(d);
update(q);
end

But on the other hand when there are only one object of type DataProduct 
in the system, the no-loop works. Is this expected behavior or have I 
uncovered a bug?


Thanks
Srinath

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