Re: [rules-users] Exposing rules as services

2011-06-09 Thread Sumeet Karawal
Is there any documentation available regarding that or any link that I
could refer. It would be really helpful if I get an idea on how to proceed
further.

Thanks  Regards,
Sumeet Karawal
Mailto: sumeet.kara...@tcs.com




   
  From:   Xinhua Zhu xh...@it.uts.edu.au  
   

   
  To: Rules Users List rules-users@lists.jboss.org
   

   
  Date:   06/09/2011 05:51 AM   
   

   
  Subject:Re: [rules-users] Exposing rules as services  
   

   
  Sent by:rules-users-boun...@lists.jboss.org   
   

   





Hi,

You can have a look at drools server.

BR
Xinhua

On Wed, Jun 8, 2011 at 11:38 PM, Sumeet Karawal sumeet.kara...@tcs.com
wrote:

  Hi,

  I am using Drools Guvnor to maintain the rule sets. I need to publish the
  rules as stand-alone web services. Is it possible to do that? How can
  this
  be done...

  Thanks and regards,
  Sumeet Karawal
  Mailto: sumeet.kara...@tcs.com

  =-=-=
  Notice: The information contained in this e-mail
  message and/or attachments to it may contain
  confidential or privileged information. If you are
  not the intended recipient, any dissemination, use,
  review, distribution, printing or copying of the
  information contained in this e-mail message
  and/or attachments to it are strictly prohibited. If
  you have received this communication in error,
  please notify us by reply e-mail or telephone and
  immediately and permanently delete the message
  and any attachments. Thank you



  ___
  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] Exposing rules as services

2011-06-09 Thread Xinhua Zhu
Hi,

Maybe this link can be helpful.
http://docs.jboss.org/drools/release/5.2.0.CR1/droolsjbpm-integration-docs/html_single/index.html#d0e488

http://docs.jboss.org/drools/release/5.2.0.CR1/droolsjbpm-integration-docs/html_single/index.html#d0e488
BR
Xinhua

On Thu, Jun 9, 2011 at 4:02 PM, Sumeet Karawal sumeet.kara...@tcs.comwrote:

 Is there any documentation available regarding that or any link that I
 could refer. It would be really helpful if I get an idea on how to proceed
 further.

 Thanks  Regards,
 Sumeet Karawal
 Mailto: sumeet.kara...@tcs.com




   From:   Xinhua Zhu xh...@it.uts.edu.au

  To: Rules Users List rules-users@lists.jboss.org

  Date:   06/09/2011 05:51 AM

  Subject:Re: [rules-users] Exposing rules as services

  Sent by:rules-users-boun...@lists.jboss.org






 Hi,

 You can have a look at drools server.

 BR
 Xinhua

 On Wed, Jun 8, 2011 at 11:38 PM, Sumeet Karawal sumeet.kara...@tcs.com
 wrote:

  Hi,

  I am using Drools Guvnor to maintain the rule sets. I need to publish the
  rules as stand-alone web services. Is it possible to do that? How can
  this
  be done...

  Thanks and regards,
  Sumeet Karawal
  Mailto: sumeet.kara...@tcs.com

  =-=-=
  Notice: The information contained in this e-mail
  message and/or attachments to it may contain
  confidential or privileged information. If you are
  not the intended recipient, any dissemination, use,
  review, distribution, printing or copying of the
  information contained in this e-mail message
  and/or attachments to it are strictly prohibited. If
  you have received this communication in error,
  please notify us by reply e-mail or telephone and
  immediately and permanently delete the message
  and any attachments. Thank you



  ___
  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


[rules-users] Drools in non-eclipse environment

2011-06-09 Thread Abhay B. Chaware
Has anyone tried using drools in non-eclipse env ? meaning that 
org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ? 

Documentation says this :

(http://docs.huihoo.com/drools/4.0.7/ch02s05.html)

if you do not have Eclipse JDT Core in your classpath you must override the 
compiler setting before you instantiate this PackageBuilder, you can either do 
that with a packagebuilder properties file the ChainedProperties class will 
find, or you can do it programmatically as shown below; note this time I use 
properties to inject the value for startup.

They also provide an example, but I am not able to figure out exactly how to 
use this example/info.

Here is my code : 

KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newInputStreamResource(is), 
ResourceType.DRL);

where is is input stream containing the rule file ( .drl)

How do I override the compiler setting ? 

I am getting a null pointer exception ( see below ) and I suspect that 
overriding the packagebuilderconfiguration will fix it ?

W/System.err(25511): java.lang.NullPointerException
W/System.err(25511):at 
org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
W/System.err(25511):at 
org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
W/System.err(25511):at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
W/System.err(25511):at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:267)
W/System.err(25511):at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
W/System.err(25511):at 
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
W/System.err(25511):at 
com.ts.DBconnector.readKnowledgeBase(DBconnector.java:146)



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


Re: [rules-users] DROOLS PLANNER - creating starting solution

2011-06-09 Thread ge0ffrey

KD wrote:
 
 Hi,
 
 Reading the manual I came across Creating a starting Solution. Is there
 a way to not provide this? For a combinatorial linear model heavy with
 hard constraints and with resonably large number of binary variables,
 implementing a method that will generate this intial solution in
 reasonable amount of time is already an achievement. 
 

For now, you have to implement the StartingSolutionInitializer (copy paste
adjust one of the examples).

For 5.3 I am working on out-of-the-box support for that. The prototypes are
working already (see my fork on github) and doing great, I just have to
implement phasing so they can be run before tabu search/SA.

--
View this message in context: 
http://drools.46999.n3.nabble.com/DROOLS-PLANNER-creating-starting-solution-tp3033881p3042814.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] DROOLS PLANNER - computation times and comparison

2011-06-09 Thread ge0ffrey

KD wrote:
 
 I went through some presentations on bin packing/cloud balance problems.
 I am interested in knowing about computational results relating to these
 problems, specially related to the size of the instances tackled and
 computational times. So how well do the methods scale with problem size?
 

They scale very good, both in data and in constraints.
In my experience, local search (tabu search, SA, ...) is the best up-scaling
algorithm out there.
Getting StartingSolutionInitializer right and setting a
minimalAcceptedSelection so a step is done every 1-2 seconds is critical
though.

Join the webinar next week:
  http://blog.athico.com/2011/05/drools-planner-webinar-on-wednesday.html
If I have time I 'll include some graphs to prove how it scales out.
Or try it yourself in the examples: run the *Importer (classes with main())
and they 'll output you how big each dataset it. Then use the *Benchmarker
to get a graph which the results for each dataset.


KD wrote:
 
 Could you also comment on performance/computational times with other
 commercial solvers?
 
Publishing benchmarks of some of the commercial solvers is illegal under
their license terms.
Some notes:
- Micro benchmarks are generally worthless and cheatable (see JavaOne/Devoxx
presentations of Cliff Click, Joshua Bloch, ...).
- Benchmarking N-queens is stupid: it's not NP complete. It's very cheatable
and besides the Drools Planner implementation is an unoptimized tutorial.
- Benchmarking pure TSP is ok but short-sighted. You need to be able to
scale in data AND constraints. (I am working on a TSP example in Planner but
it's not finished yet).
- Competitions such as ITC2007, RAS, ... are great benchmarks: they use
real-world data, real constraints, ... 
I finished 4th in ITC2007 track 1 (much has improved since then) and all of
the other finalists were researchers that wrote their experimental solvers
from scratch as far as I know.

--
View this message in context: 
http://drools.46999.n3.nabble.com/DROOLS-PLANNER-computation-times-and-comparison-tp3033892p3042850.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] Drools in non-eclipse environment

2011-06-09 Thread Swindells, Thomas
Which version of drools is this?
For drools 5.0.1 we just use maven to resolve the dependencies for us and it 
works fine. I can't obviously see any eclipse compiler in the jars that we 
distribute with our application.

Thomas

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Abhay B. Chaware
 Sent: 09 June 2011 08:06
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Drools in non-eclipse environment

 Has anyone tried using drools in non-eclipse env ? meaning that
 org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ?

 Documentation says this :

 (http://docs.huihoo.com/drools/4.0.7/ch02s05.html)

 if you do not have Eclipse JDT Core in your classpath you must override the
 compiler setting before you instantiate this PackageBuilder, you can either
 do that with a packagebuilder properties file the ChainedProperties class will
 find, or you can do it programmatically as shown below; note this time I use
 properties to inject the value for startup.

 They also provide an example, but I am not able to figure out exactly how to
 use this example/info.

 Here is my code :

   KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
   kbuilder.add(ResourceFactory.newInputStreamResource(is),
 ResourceType.DRL);

 where is is input stream containing the rule file ( .drl)

 How do I override the compiler setting ?

 I am getting a null pointer exception ( see below ) and I suspect that
 overriding the packagebuilderconfiguration will fix it ?

 W/System.err(25511): java.lang.NullPointerException
 W/System.err(25511):at
 org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java
 :267)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder
 .java:459)
 W/System.err(25511):at
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja
 va:28)
 W/System.err(25511):at
 com.ts.DBconnector.readKnowledgeBase(DBconnector.java:146)



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


**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

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


Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Abhay B. Chaware
I am using drools 5.1.0 

Let me explain what I am trying to do.  I am trying to write a drools app on to 
android platform.  In my app, I have added following jars in the application 
classpath - 

antlr-runtime.jar
drools-api.jar
drools-compiler.jar
drools-core.jar
mvel2.jar

Do I need any other jar files ? 

upon drilling down into the Null Pointer Exception, it appears that it is 
throwing NPE at following line inside RuleBuilder.java


RuleConditionBuilder builder = 
(RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

and on further drilling, I found that context.getDialect() is retuning NULL.

Then I put some debug inside PackageBuilder.java 

upon drilling down for the error, found out that it is not able to set the 
context's dialect. 
ctr.getDialect(pkgRegistry.getDialect()) gives null ... 

DialectCompiletimeRegistry ctr = pkgRegistry.getDialectCompiletimeRegistry();
RuleBuildContext context = new RuleBuildContext(this, ruleDescr, ctr, pkg, 
ctr.getDialect(pkgRegistry.getDialect()));

Is there any default setting /configuration that I am obviously missing ?

what could be the problem ?

-abhay



From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] 
On Behalf Of Swindells, Thomas [tswinde...@nds.com]
Sent: Thursday, June 09, 2011 1:40 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment

Which version of drools is this?
For drools 5.0.1 we just use maven to resolve the dependencies for us and it 
works fine. I can't obviously see any eclipse compiler in the jars that we 
distribute with our application.

Thomas

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Abhay B. Chaware
 Sent: 09 June 2011 08:06
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Drools in non-eclipse environment

 Has anyone tried using drools in non-eclipse env ? meaning that
 org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ?

 Documentation says this :

 (http://docs.huihoo.com/drools/4.0.7/ch02s05.html)

 if you do not have Eclipse JDT Core in your classpath you must override the
 compiler setting before you instantiate this PackageBuilder, you can either
 do that with a packagebuilder properties file the ChainedProperties class will
 find, or you can do it programmatically as shown below; note this time I use
 properties to inject the value for startup.

 They also provide an example, but I am not able to figure out exactly how to
 use this example/info.

 Here is my code :

   KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
   kbuilder.add(ResourceFactory.newInputStreamResource(is),
 ResourceType.DRL);

 where is is input stream containing the rule file ( .drl)

 How do I override the compiler setting ?

 I am getting a null pointer exception ( see below ) and I suspect that
 overriding the packagebuilderconfiguration will fix it ?

 W/System.err(25511): java.lang.NullPointerException
 W/System.err(25511):at
 org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java
 :267)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder
 .java:459)
 W/System.err(25511):at
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja
 va:28)
 W/System.err(25511):at
 com.ts.DBconnector.readKnowledgeBase(DBconnector.java:146)



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


**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

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



___
rules-users mailing list

Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Geoffrey De Smet


Op 09-06-11 10:29, Abhay B. Chaware schreef:
 I am using drools 5.1.0

 Let me explain what I am trying to do.  I am trying to write a drools app on 
 to android platform.  In my app, I have added following jars in the 
 application classpath -

 antlr-runtime.jar
 drools-api.jar
 drools-compiler.jar
 drools-core.jar
 mvel2.jar

 Do I need any other jar files ?

If you precompile (using the maven-plugin of angkar out there), you only 
need required the dependencies of drools-core as defined by the maven 
pom.xml:
   
http://search.maven.org/#artifactdetails|org.drools|drools-core|5.2.0.CR1|jar
   (ignore all dependencies with scope=test, scope=provided or 
optional=true)
So no need for jdt, no need for drools-compiler, ...

But if you don't precompile, you need all required dependencies (which 
includes jdt, but IIRC you exclude jdt and include janino instead) as 
defined by the maven pom.xml:
   
http://search.maven.org/#artifactdetails|org.drools|drools-compiler|5.2.0.CR1|jar
   (ignore all dependencies with scope=test, scope=provided or 
optional=true)

Much is cleaned up for 5.2, I 'd recommend using 5.2.0.CR1 at this point 
(final will be released soon).

PS: Consider declaring your dependencies with maven 3, buildr, ivy or 
gradle: just adding jars to the classpath until it works is asking for 
trouble.

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


Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Swindells, Thomas
 If you precompile (using the maven-plugin of angkar out there),
Are any details on this plugin available? - is it this one? 
http://passion.forco.de/content/maven-drools-plugin_overview
What are peoples experiences of using it?

Thanks,

Thomas


**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

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


Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Geoffrey De Smet
that's the one.
If angskar is cool with it, we should pull it inside droolsjbpm-tools as 
maven-drools-plugin really.

Op 09-06-11 10:59, Swindells, Thomas schreef:
 If you precompile (using the maven-plugin of angkar out there),
 Are any details on this plugin available? - is it this one? 
 http://passion.forco.de/content/maven-drools-plugin_overview
 What are peoples experiences of using it?

 Thanks,

 Thomas


 **
 This message is confidential and intended only for the addressee. If you have 
 received this message in error, please immediately notify the 
 postmas...@nds.com and delete it from your system as well as any copies. The 
 content of e-mails as well as traffic data may be monitored by NDS for 
 employment and security purposes. To protect the environment please do not 
 print this e-mail unless necessary.

 NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 
 4EX, United Kingdom. A company registered in England and Wales. Registered 
 no. 3080780. VAT no. GB 603 8808 40-00
 **

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


-- 
With kind regards,
Geoffrey De Smet


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


Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Wolfgang Laun
You might try this:

 Properties props = new Properties();
 props.put( drools.dialect.java.compiler, JANINO );

KnowledgeBuilderConfiguration kbConfig =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props,
(ClassLoader[]) null );

Requires the janino jar in your classpath, which I have as
   ~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar

-W

On 9 June 2011 10:29, Abhay B. Chaware abhay.chaw...@kpitcummins.comwrote:

 I am using drools 5.1.0

 Let me explain what I am trying to do.  I am trying to write a drools app
 on to android platform.  In my app, I have added following jars in the
 application classpath -

 antlr-runtime.jar
 drools-api.jar
 drools-compiler.jar
 drools-core.jar
 mvel2.jar

 Do I need any other jar files ?

 upon drilling down into the Null Pointer Exception, it appears that it is
 throwing NPE at following line inside RuleBuilder.java


RuleConditionBuilder builder =
 (RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

 and on further drilling, I found that context.getDialect() is retuning
 NULL.

 Then I put some debug inside PackageBuilder.java

 upon drilling down for the error, found out that it is not able to set the
 context's dialect.
 ctr.getDialect(pkgRegistry.getDialect()) gives null ...

 DialectCompiletimeRegistry ctr =
 pkgRegistry.getDialectCompiletimeRegistry();
 RuleBuildContext context = new RuleBuildContext(this, ruleDescr, ctr, pkg,
 ctr.getDialect(pkgRegistry.getDialect()));

 Is there any default setting /configuration that I am obviously missing ?

 what could be the problem ?

 -abhay


 
 From: rules-users-boun...@lists.jboss.org [
 rules-users-boun...@lists.jboss.org] On Behalf Of Swindells, Thomas [
 tswinde...@nds.com]
 Sent: Thursday, June 09, 2011 1:40 PM
 To: Rules Users List
 Subject: Re: [rules-users] Drools in non-eclipse environment

 Which version of drools is this?
 For drools 5.0.1 we just use maven to resolve the dependencies for us and
 it works fine. I can't obviously see any eclipse compiler in the jars that
 we distribute with our application.

 Thomas

  -Original Message-
  From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
  boun...@lists.jboss.org] On Behalf Of Abhay B. Chaware
  Sent: 09 June 2011 08:06
  To: rules-users@lists.jboss.org
  Subject: [rules-users] Drools in non-eclipse environment
 
  Has anyone tried using drools in non-eclipse env ? meaning that
  org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ?
 
  Documentation says this :
 
  (http://docs.huihoo.com/drools/4.0.7/ch02s05.html)
 
  if you do not have Eclipse JDT Core in your classpath you must override
 the
  compiler setting before you instantiate this PackageBuilder, you can
 either
  do that with a packagebuilder properties file the ChainedProperties class
 will
  find, or you can do it programmatically as shown below; note this time I
 use
  properties to inject the value for startup.
 
  They also provide an example, but I am not able to figure out exactly how
 to
  use this example/info.
 
  Here is my code :
 
KnowledgeBuilder kbuilder =
  KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newInputStreamResource(is),
  ResourceType.DRL);
 
  where is is input stream containing the rule file ( .drl)
 
  How do I override the compiler setting ?
 
  I am getting a null pointer exception ( see below ) and I suspect that
  overriding the packagebuilderconfiguration will fix it ?
 
  W/System.err(25511): java.lang.NullPointerException
  W/System.err(25511):at
  org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
  W/System.err(25511):at
  org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
  W/System.err(25511):at
  org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
  W/System.err(25511):at
  org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java
  :267)
  W/System.err(25511):at
  org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder
  .java:459)
  W/System.err(25511):at
  org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja
  va:28)
  W/System.err(25511):at
  com.ts.DBconnector.readKnowledgeBase(DBconnector.java:146)
 
 
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users



 **
 This message is confidential and intended only for the addressee. If you
 have received this message in error, please immediately notify the
 postmas...@nds.com and delete it from your system as well as any copies.
 The content of e-mails as well as traffic data may be monitored by NDS for
 employment and security purposes. To protect the environment please do 

Re: [rules-users] Exposing rules as services

2011-06-09 Thread Sumeet Karawal
Hi,

Thanks Xinhua!!!
Here I am able to get that using drools server, we could expose the
knowledgebases as RESTful services, and those could be consumed by the
Application.

As in the normal application, we create a Knowledgebase, then session and
insert facts,. after that we fireAllRules();
So will the procedure be same in this case, to insert fact,creating
knowledgebases and firing rules.

Also can't we expose the rules as SOAP services?

Actually I have never come across using rules as services. But in the new
implementation I have this requirement. So, I am totally confused on how to
go ahead, how to actually do this. Thanks for the help...

Regards,
Sumeet Karawal
Mailto: sumeet.kara...@tcs.com



   
  From:   Xinhua Zhu xh...@it.uts.edu.au  
   

   
  To: Rules Users List rules-users@lists.jboss.org
   

   
  Date:   06/09/2011 11:55 AM   
   

   
  Subject:Re: [rules-users] Exposing rules as services  
   

   
  Sent by:rules-users-boun...@lists.jboss.org   
   

   





Hi,

Maybe this link can be helpful.
http://docs.jboss.org/drools/release/5.2.0.CR1/droolsjbpm-integration-docs/html_single/index.html#d0e488

BR
Xinhua

On Thu, Jun 9, 2011 at 4:02 PM, Sumeet Karawal sumeet.kara...@tcs.com
wrote:
  Is there any documentation available regarding that or any link that I
  could refer. It would be really helpful if I get an idea on how to
  proceed
  further.

  Thanks  Regards,
  Sumeet Karawal
  Mailto: sumeet.kara...@tcs.com




   From:       Xinhua Zhu xh...@it.uts.edu.au

   To:         Rules Users List rules-users@lists.jboss.org

   Date:       06/09/2011 05:51 AM

   Subject:    Re: [rules-users] Exposing rules as services

   Sent by:    rules-users-boun...@lists.jboss.org






  Hi,

  You can have a look at drools server.

  BR
  Xinhua

  On Wed, Jun 8, 2011 at 11:38 PM, Sumeet Karawal sumeet.kara...@tcs.com
  wrote:

   Hi,

   I am using Drools Guvnor to maintain the rule sets. I need to publish
  the
   rules as stand-alone web services. Is it possible to do that? How can
   this
   be done...

   Thanks and regards,
   Sumeet Karawal
   Mailto: sumeet.kara...@tcs.com

   =-=-=
   Notice: The information contained in this e-mail
   message and/or attachments to it may contain
   confidential or privileged information. If you are
   not the intended recipient, any dissemination, use,
   review, distribution, printing or copying of the
   information contained in this e-mail message
   and/or attachments to it are strictly prohibited. If
   you have received this communication in error,
   please notify us by reply e-mail or telephone and
   immediately and permanently delete the message
   and any attachments. Thank you



   ___
   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




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


Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Abhay B. Chaware
How do I use this kbConfig instance of KnowledgeBuilderConfiguration  ?


From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] 
On Behalf Of Wolfgang Laun [wolfgang.l...@gmail.com]
Sent: Thursday, June 09, 2011 2:46 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment

You might try this:

 Properties props = new Properties();
 props.put( drools.dialect.java.compiler, JANINO );

KnowledgeBuilderConfiguration kbConfig =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props, 
(ClassLoader[]) null );

Requires the janino jar in your classpath, which I have as
   ~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar

-W

On 9 June 2011 10:29, Abhay B. Chaware 
abhay.chaw...@kpitcummins.commailto:abhay.chaw...@kpitcummins.com wrote:
I am using drools 5.1.0

Let me explain what I am trying to do.  I am trying to write a drools app on to 
android platform.  In my app, I have added following jars in the application 
classpath -

antlr-runtime.jar
drools-api.jar
drools-compiler.jar
drools-core.jar
mvel2.jar

Do I need any other jar files ?

upon drilling down into the Null Pointer Exception, it appears that it is 
throwing NPE at following line inside RuleBuilder.java


   RuleConditionBuilder builder = 
(RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

and on further drilling, I found that context.getDialect() is retuning NULL.

Then I put some debug inside PackageBuilder.java

upon drilling down for the error, found out that it is not able to set the 
context's dialect.
ctr.getDialect(pkgRegistry.getDialect()) gives null ...

DialectCompiletimeRegistry ctr = pkgRegistry.getDialectCompiletimeRegistry();
RuleBuildContext context = new RuleBuildContext(this, ruleDescr, ctr, pkg, 
ctr.getDialect(pkgRegistry.getDialect()));

Is there any default setting /configuration that I am obviously missing ?

what could be the problem ?

-abhay



From: 
rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org 
[rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org]
 On Behalf Of Swindells, Thomas [tswinde...@nds.commailto:tswinde...@nds.com]
Sent: Thursday, June 09, 2011 1:40 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment

Which version of drools is this?
For drools 5.0.1 we just use maven to resolve the dependencies for us and it 
works fine. I can't obviously see any eclipse compiler in the jars that we 
distribute with our application.

Thomas

 -Original Message-
 From: 
 rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org
  [mailto:rules-users-mailto:rules-users-
 boun...@lists.jboss.orgmailto:boun...@lists.jboss.org] On Behalf Of Abhay 
 B. Chaware
 Sent: 09 June 2011 08:06
 To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
 Subject: [rules-users] Drools in non-eclipse environment

 Has anyone tried using drools in non-eclipse env ? meaning that
 org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ?

 Documentation says this :

 (http://docs.huihoo.com/drools/4.0.7/ch02s05.html)

 if you do not have Eclipse JDT Core in your classpath you must override the
 compiler setting before you instantiate this PackageBuilder, you can either
 do that with a packagebuilder properties file the ChainedProperties class will
 find, or you can do it programmatically as shown below; note this time I use
 properties to inject the value for startup.

 They also provide an example, but I am not able to figure out exactly how to
 use this example/info.

 Here is my code :

   KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
   kbuilder.add(ResourceFactory.newInputStreamResource(is),
 ResourceType.DRL);

 where is is input stream containing the rule file ( .drl)

 How do I override the compiler setting ?

 I am getting a null pointer exception ( see below ) and I suspect that
 overriding the packagebuilderconfiguration will fix it ?

 W/System.err(25511): java.lang.NullPointerException
 W/System.err(25511):at
 org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java
 :267)
 W/System.err(25511):at
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder
 .java:459)
 W/System.err(25511):at
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja
 va:28)
 W/System.err(25511):at
 com.ts.DBconnector.readKnowledgeBase(DBconnector.java:146)



 ___
 rules-users 

[rules-users] What is contract between Heap Size and PermGen space

2011-06-09 Thread Satyendra Sharma
In my server Ram is 16GB but when 

1. I tried to set max heap size to 2048MB in run.bat file and when started
jboss server it thrown exception as Could not reserve enough space for
object heap it accepted max 1336 mb.

 
2. and also  JBoss server did not accept more than 128MB PermGen space but
when I reduce the heap size from 1336 to 1024 it accepted PermGen space to
max 256MB.

 
 
Please let me know the reason when I have enough memory why it is not
accepting heap size as 2048 and what is contract between heap size and
PermGen space as reducing heap size helped PermGen space to increase.


-
Satyendra Sharma
--
View this message in context: 
http://drools.46999.n3.nabble.com/What-is-contract-between-Heap-Size-and-PermGen-space-tp3043263p3043263.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] Drools in non-eclipse environment

2011-06-09 Thread Abhay B. Chaware
This is what I did. 

Properties properties = new Properties();
properties.put(drools.dialect.java.compiler, JANINO);
KnowledgeBuilderConfiguration kbConfig = 
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( properties, 
(ClassLoader[]) null );
KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder(kbConfig);
kbuilder.add(ResourceFactory.newInputStreamResource(is), 
ResourceType.DRL);


I am getting same error with KnowledgeBuilderConfiguration ..

W/System.err(27303): java.lang.NullPointerException
W/System.err(27303):at 
org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:267)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
W/System.err(27303):at 
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
W/System.err(27303):at 
com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143)
W/System.err(27303):at 
com.first.FirstActivity.onCreate(FirstActivity.java:64)
W/System.err(27303):at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
W/System.err(27303):at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
W/System.err(27303):at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
W/System.err(27303):at 
android.app.ActivityThread.access$2300(ActivityThread.java:125)



From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] 
On Behalf Of Wolfgang Laun [wolfgang.l...@gmail.com]
Sent: Thursday, June 09, 2011 2:46 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment

You might try this:

 Properties props = new Properties();
 props.put( drools.dialect.java.compiler, JANINO );

KnowledgeBuilderConfiguration kbConfig =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props, 
(ClassLoader[]) null );

Requires the janino jar in your classpath, which I have as
   ~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar

-W

On 9 June 2011 10:29, Abhay B. Chaware 
abhay.chaw...@kpitcummins.commailto:abhay.chaw...@kpitcummins.com wrote:
I am using drools 5.1.0

Let me explain what I am trying to do.  I am trying to write a drools app on to 
android platform.  In my app, I have added following jars in the application 
classpath -

antlr-runtime.jar
drools-api.jar
drools-compiler.jar
drools-core.jar
mvel2.jar

Do I need any other jar files ?

upon drilling down into the Null Pointer Exception, it appears that it is 
throwing NPE at following line inside RuleBuilder.java


   RuleConditionBuilder builder = 
(RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

and on further drilling, I found that context.getDialect() is retuning NULL.

Then I put some debug inside PackageBuilder.java

upon drilling down for the error, found out that it is not able to set the 
context's dialect.
ctr.getDialect(pkgRegistry.getDialect()) gives null ...

DialectCompiletimeRegistry ctr = pkgRegistry.getDialectCompiletimeRegistry();
RuleBuildContext context = new RuleBuildContext(this, ruleDescr, ctr, pkg, 
ctr.getDialect(pkgRegistry.getDialect()));

Is there any default setting /configuration that I am obviously missing ?

what could be the problem ?

-abhay



From: 
rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org 
[rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org]
 On Behalf Of Swindells, Thomas [tswinde...@nds.commailto:tswinde...@nds.com]
Sent: Thursday, June 09, 2011 1:40 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment

Which version of drools is this?
For drools 5.0.1 we just use maven to resolve the dependencies for us and it 
works fine. I can't obviously see any eclipse compiler in the jars that we 
distribute with our application.

Thomas

 -Original Message-
 From: 
 rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org
  [mailto:rules-users-mailto:rules-users-
 boun...@lists.jboss.orgmailto:boun...@lists.jboss.org] On Behalf Of Abhay 
 B. Chaware
 Sent: 09 June 2011 08:06
 To: rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
 Subject: [rules-users] Drools in non-eclipse environment

 Has anyone tried using drools in non-eclipse env ? meaning that
 org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ?

 Documentation says this :

 (http://docs.huihoo.com/drools/4.0.7/ch02s05.html)

 if 

Re: [rules-users] What is contract between Heap Size and PermGen space

2011-06-09 Thread Swindells, Thomas
This is a pure java question not a drools question - I'd suggest you ask the 
experts on one of the java or jboss mailing lists!
One question I'd have is whether you are running a 32 bit or 64bit jvm - if you 
are running a 32bit jvm then you will have limits on how much memory in total a 
process can address (including additional memory needed for the actual jvm, 
hotspot compiler etc).
Thomas

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Satyendra Sharma
 Sent: 09 June 2011 11:05
 To: rules-users@lists.jboss.org
 Subject: [rules-users] What is contract between Heap Size and PermGen
 space

 In my server Ram is 16GB but when

 1. I tried to set max heap size to 2048MB in run.bat file and when started
 jboss server it thrown exception as Could not reserve enough space for
 object heap it accepted max 1336 mb.


 2. and also  JBoss server did not accept more than 128MB PermGen space but
 when I reduce the heap size from 1336 to 1024 it accepted PermGen space to
 max 256MB.



 Please let me know the reason when I have enough memory why it is not
 accepting heap size as 2048 and what is contract between heap size and
 PermGen space as reducing heap size helped PermGen space to increase.


 -
 Satyendra Sharma
 --
 View this message in context: http://drools.46999.n3.nabble.com/What-is-
 contract-between-Heap-Size-and-PermGen-space-tp3043263p3043263.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


**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

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


Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Michael Anstis
Preparing to be shouted down, but isn't it impossible to compile DRL on
Android and the suggestion is to load pre-serialised KnowledgeBases?

Also, as another observation, are you sure the DRL was indeed found and the
NPE is not caused by
com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143) perhaps passing
a null to KnowledgeBuilder?

Have you looked at
http://blog.athico.com/2011/03/jbpm5-lightweight-running-on-android.html,
which might give some pointers - although it is only jBPM and not rules
themselves.

With kind regards,

Mike

On 9 June 2011 11:11, Abhay B. Chaware abhay.chaw...@kpitcummins.comwrote:

 This is what I did.

Properties properties = new Properties();
properties.put(drools.dialect.java.compiler, JANINO);
KnowledgeBuilderConfiguration kbConfig =
 KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( properties,
 (ClassLoader[]) null );
KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder(kbConfig);
 kbuilder.add(ResourceFactory.newInputStreamResource(is),
 ResourceType.DRL);


 I am getting same error with KnowledgeBuilderConfiguration ..

 W/System.err(27303): java.lang.NullPointerException
 W/System.err(27303):at
 org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:267)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
 W/System.err(27303):at
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
 W/System.err(27303):at
 com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143)
 W/System.err(27303):at
 com.first.FirstActivity.onCreate(FirstActivity.java:64)
 W/System.err(27303):at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 W/System.err(27303):at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
 W/System.err(27303):at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 W/System.err(27303):at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)


 
 From: rules-users-boun...@lists.jboss.org [
 rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun [
 wolfgang.l...@gmail.com]
 Sent: Thursday, June 09, 2011 2:46 PM
 To: Rules Users List
 Subject: Re: [rules-users] Drools in non-eclipse environment

 You might try this:

 Properties props = new Properties();
 props.put( drools.dialect.java.compiler, JANINO );

KnowledgeBuilderConfiguration kbConfig =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props,
 (ClassLoader[]) null );

 Requires the janino jar in your classpath, which I have as
   ~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar

 -W

 On 9 June 2011 10:29, Abhay B. Chaware abhay.chaw...@kpitcummins.com
 mailto:abhay.chaw...@kpitcummins.com wrote:
 I am using drools 5.1.0

 Let me explain what I am trying to do.  I am trying to write a drools app
 on to android platform.  In my app, I have added following jars in the
 application classpath -

 antlr-runtime.jar
 drools-api.jar
 drools-compiler.jar
 drools-core.jar
 mvel2.jar

 Do I need any other jar files ?

 upon drilling down into the Null Pointer Exception, it appears that it is
 throwing NPE at following line inside RuleBuilder.java


   RuleConditionBuilder builder =
 (RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

 and on further drilling, I found that context.getDialect() is retuning
 NULL.

 Then I put some debug inside PackageBuilder.java

 upon drilling down for the error, found out that it is not able to set the
 context's dialect.
 ctr.getDialect(pkgRegistry.getDialect()) gives null ...

 DialectCompiletimeRegistry ctr =
 pkgRegistry.getDialectCompiletimeRegistry();
 RuleBuildContext context = new RuleBuildContext(this, ruleDescr, ctr, pkg,
 ctr.getDialect(pkgRegistry.getDialect()));

 Is there any default setting /configuration that I am obviously missing ?

 what could be the problem ?

 -abhay


 
 From: rules-users-boun...@lists.jboss.orgmailto:
 rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org
 mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Swindells,
 Thomas [tswinde...@nds.commailto:tswinde...@nds.com]
 Sent: Thursday, June 09, 2011 1:40 PM
 To: Rules Users List
 Subject: Re: [rules-users] Drools in non-eclipse environment

 Which version of drools is this?
 For drools 5.0.1 we just use maven to resolve the dependencies for us and
 it works fine. I can't obviously see any eclipse compiler 

[rules-users] Exception while save rule

2011-06-09 Thread Satyendra Sharma
I am getting error message while trying to save newly created rule or update
the existing one and click save in BRMS



06:43:51,260 INFO  [STDOUT] ERROR 09-06 06:43:51,260
(BundleDbPersistenceManager.java:logException:1404) rollback failed
06:43:51,260 INFO  [STDOUT] ERROR 09-06 06:43:51,260
(BundleDbPersistenceManager.java:logException:1406)Reason:
Closed Conn
06:43:51,260 INFO  [STDOUT] ERROR 09-06 06:43:51,260
(BundleDbPersistenceManager.java:logException:1407)State/Code:
null/17008
06:43:51,792 INFO  [STDOUT] ERROR 09-06 06:43:51,792
(ConnectionRecoveryManager.java:logException:453)   could not execute
statement, reaso
06:43:51,792 INFO  [STDOUT] ERROR 09-06 06:43:51,792
(BundleDbPersistenceManager.java:storeBundle:1210)  failed to write
bundle: 2a
java.sql.SQLException: Data size bigger than max size for this type: 4011
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:95)
at
oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2414)
at
oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1134)
at
oracle.jdbc.driver.OraclePreparedStatement.setBytes(OraclePreparedStatement.java:2170)
at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2823)
at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:3015)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:368)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:298)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:261)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:239)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1207)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:6
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.storeInternal(AbstractBundlePersistenceManager.ja
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:502)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:561)
at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:734)
at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1140)
at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:351)
at
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
at
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:328)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1141)
at org.drools.repository.UserInfo.save(UserInfo.java:198)
at
org.drools.guvnor.server.repository.UserInbox.save(UserInbox.java:176)
at
org.drools.guvnor.server.repository.UserInbox.recordUserEditEvent(UserInbox.java:171)
at
org.drools.guvnor.server.repository.RepositoryStartupService$1.afterCheckin(RepositoryStartupService.java:83)
at
org.drools.repository.events.StorageEventManager.doCheckinEvents(StorageEventManager.java:95)
at
org.drools.repository.VersionableItem.checkin(VersionableItem.java:589)
at
org.drools.guvnor.server.ServiceImplementation.checkinVersion(ServiceImplementation.java:795)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at

Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Abhay B. Chaware
That's exactly what I am trying out at the moment .. option - b.  Pre-compile, 
serialize and unserialize ...I'll share the results.
Also rule file's there at the location mentioned. So that's not a problem.
I've gone through the blog you mentioned ... and as you indicated, it's only 
jbpm .. no rules ...

thanks
abhay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis
Sent: Thursday, June 09, 2011 4:07 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment

Preparing to be shouted down, but isn't it impossible to compile DRL on Android 
and the suggestion is to load pre-serialised KnowledgeBases?

Also, as another observation, are you sure the DRL was indeed found and the NPE 
is not caused by com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143) 
perhaps passing a null to KnowledgeBuilder?

Have you looked at 
http://blog.athico.com/2011/03/jbpm5-lightweight-running-on-android.html, which 
might give some pointers - although it is only jBPM and not rules themselves.

With kind regards,

Mike
On 9 June 2011 11:11, Abhay B. Chaware 
abhay.chaw...@kpitcummins.commailto:abhay.chaw...@kpitcummins.com wrote:
This is what I did.

   Properties properties = new Properties();
   properties.put(drools.dialect.java.compiler, JANINO);
   KnowledgeBuilderConfiguration kbConfig = 
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( properties, 
(ClassLoader[]) null );
   KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder(kbConfig);
   kbuilder.add(ResourceFactory.newInputStreamResource(is), 
ResourceType.DRL);

I am getting same error with KnowledgeBuilderConfiguration ..

W/System.err(27303): java.lang.NullPointerException
W/System.err(27303):at 
org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:267)
W/System.err(27303):at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
W/System.err(27303):at 
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
W/System.err(27303):at 
com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143)
W/System.err(27303):at 
com.first.FirstActivity.onCreate(FirstActivity.java:64)
W/System.err(27303):at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
W/System.err(27303):at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
W/System.err(27303):at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
W/System.err(27303):at 
android.app.ActivityThread.access$2300(ActivityThread.java:125)



From: 
rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org 
[rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org]
 On Behalf Of Wolfgang Laun 
[wolfgang.l...@gmail.commailto:wolfgang.l...@gmail.com]
Sent: Thursday, June 09, 2011 2:46 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment
You might try this:

Properties props = new Properties();
props.put( drools.dialect.java.compiler, JANINO );

   KnowledgeBuilderConfiguration kbConfig =
   KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props, 
(ClassLoader[]) null );

Requires the janino jar in your classpath, which I have as
  ~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar

-W
On 9 June 2011 10:29, Abhay B. Chaware 
abhay.chaw...@kpitcummins.commailto:abhay.chaw...@kpitcummins.commailto:abhay.chaw...@kpitcummins.commailto:abhay.chaw...@kpitcummins.com
 wrote:
I am using drools 5.1.0

Let me explain what I am trying to do.  I am trying to write a drools app on to 
android platform.  In my app, I have added following jars in the application 
classpath -

antlr-runtime.jar
drools-api.jar
drools-compiler.jar
drools-core.jar
mvel2.jar

Do I need any other jar files ?

upon drilling down into the Null Pointer Exception, it appears that it is 
throwing NPE at following line inside RuleBuilder.java


  RuleConditionBuilder builder = 
(RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

and on further drilling, I found that context.getDialect() is retuning NULL.

Then I put some debug inside PackageBuilder.java

upon drilling down for the error, found out that it is not able to set the 
context's dialect.
ctr.getDialect(pkgRegistry.getDialect()) gives null ...

DialectCompiletimeRegistry ctr = pkgRegistry.getDialectCompiletimeRegistry();
RuleBuildContext context = new RuleBuildContext(this, 

Re: [rules-users] Drools in non-eclipse environment

2011-06-09 Thread Michael Anstis
Great news :)

Please do feedback... if you get it working I'll make a blog entry on your
behalf as you are not the first (or last) to try Drools on Android.

With kind regards,

Mike

2011/6/9 Abhay B. Chaware abhay.chaw...@kpitcummins.com

   That’s exactly what I am trying out at the moment .. option – b.
  Pre-compile, serialize and unserialize …I’ll share the results.

 Also rule file’s there at the location mentioned. So that’s not a problem.

 I’ve gone through the blog you mentioned … and as you indicated, it’s only
 jbpm .. no rules …



 thanks

 abhay
   --

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Michael Anstis
 *Sent:* Thursday, June 09, 2011 4:07 PM

 *To:* Rules Users List
 *Subject:* Re: [rules-users] Drools in non-eclipse environment



 Preparing to be shouted down, but isn't it impossible to compile DRL on
 Android and the suggestion is to load pre-serialised KnowledgeBases?

 Also, as another observation, are you sure the DRL was indeed found and the
 NPE is not caused by
 com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143) perhaps passing
 a null to KnowledgeBuilder?

 Have you looked at
 http://blog.athico.com/2011/03/jbpm5-lightweight-running-on-android.html,
 which might give some pointers - although it is only jBPM and not rules
 themselves.

 With kind regards,

 Mike

 On 9 June 2011 11:11, Abhay B. Chaware abhay.chaw...@kpitcummins.com
 wrote:

 This is what I did.

Properties properties = new Properties();
properties.put(drools.dialect.java.compiler, JANINO);
KnowledgeBuilderConfiguration kbConfig =
 KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( properties,
 (ClassLoader[]) null );
KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder(kbConfig);

kbuilder.add(ResourceFactory.newInputStreamResource(is),
 ResourceType.DRL);

  I am getting same error with KnowledgeBuilderConfiguration ..

 W/System.err(27303): java.lang.NullPointerException
 W/System.err(27303):at
 org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:267)
 W/System.err(27303):at
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
 W/System.err(27303):at
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
 W/System.err(27303):at
 com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143)
 W/System.err(27303):at
 com.first.FirstActivity.onCreate(FirstActivity.java:64)
 W/System.err(27303):at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 W/System.err(27303):at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
 W/System.err(27303):at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 W/System.err(27303):at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)


 
 From: rules-users-boun...@lists.jboss.org [
 rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun [
 wolfgang.l...@gmail.com]
 Sent: Thursday, June 09, 2011 2:46 PM

 To: Rules Users List
 Subject: Re: [rules-users] Drools in non-eclipse environment

 You might try this:

 Properties props = new Properties();
 props.put( drools.dialect.java.compiler, JANINO );

KnowledgeBuilderConfiguration kbConfig =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props,
 (ClassLoader[]) null );

 Requires the janino jar in your classpath, which I have as
   ~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar

 -W

 On 9 June 2011 10:29, Abhay B. Chaware abhay.chaw...@kpitcummins.com
 mailto:abhay.chaw...@kpitcummins.com wrote:
 I am using drools 5.1.0

 Let me explain what I am trying to do.  I am trying to write a drools app
 on to android platform.  In my app, I have added following jars in the
 application classpath -

 antlr-runtime.jar
 drools-api.jar
 drools-compiler.jar
 drools-core.jar
 mvel2.jar

 Do I need any other jar files ?

 upon drilling down into the Null Pointer Exception, it appears that it is
 throwing NPE at following line inside RuleBuilder.java


   RuleConditionBuilder builder =
 (RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());

 and on further drilling, I found that context.getDialect() is retuning
 NULL.

 Then I put some debug inside PackageBuilder.java

 upon drilling down for the error, found out that it is not able to set the
 context's dialect.
 ctr.getDialect(pkgRegistry.getDialect()) gives null ...

 

[rules-users] Evals in 5.2

2011-06-09 Thread jkrupka
Should evals be supported in 5.2 with the same syntax that was used in 5.1? 
I commented on https://issues.jboss.org/browse/JBRULES-3055, but I'm
wondering if this is a bug or just an undocumented change due to the parser
work in 5.2...?

I haven't tested to see what usage of evals break in 5.2 that worked in 5.1,
I just know that I had multiple compile errors using 5.2.0CR1 on rules that
worked in 5.1 (and even in 5.2.0M2) that had a standalone eval pattern.  The
jira mentions the usage of  in the eval as the thing that causes it to
break, but I haven't confirmed that.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Evals-in-5-2-tp3043452p3043452.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] Drools in non-eclipse environment

2011-06-09 Thread Michael Anstis
http://meteatamel.wordpress.com/2010/08/25/android-api-and-java-beans-package/

http://meteatamel.wordpress.com/2010/09/28/android-api-and-java-beans-package-2/

Enjoy the ride ;)

2011/6/9 Abhay B. Chaware abhay.chaw...@kpitcummins.com

  woo hooo ! I got past that problem J  But a new one’s here now.



 Looks like MVEL is not liking something J







 W/dalvikvm(29977): VFY: unable to resolve static method 164:
 Ljava/beans/Introspector;.decapitalize (Ljava/lang/String;)Ljava/lang

 /String;

 W/dalvikvm(29977): threadid=1: thread exiting with uncaught exception
 (group=0x40020ac0)

 E/AndroidRuntime(29977): FATAL EXCEPTION: main

 E/AndroidRuntime(29977): java.lang.NoClassDefFoundError:
 java.beans.Introspector

 E/AndroidRuntime(29977):at
 org.drools.core.util.asm.ClassFieldInspector.calcFieldName(ClassFieldInspector.java:298)

 E/AndroidRuntime(29977):at
 org.drools.core.util.asm.ClassFieldInspector.addToMapping(ClassFieldInspector.java:216)

 E/AndroidRuntime(29977):at
 org.drools.core.util.asm.ClassFieldInspector.processClassWithoutByteCode(ClassFieldInspector.ja

 va:148)

 E/AndroidRuntime(29977):at
 org.drools.core.util.asm.ClassFieldInspector.init(ClassFieldInspector.java:83)

 E/AndroidRuntime(29977):at
 org.drools.core.util.asm.ClassFieldInspector.init(ClassFieldInspector.java:64)

 E/AndroidRuntime(29977):at
 org.drools.base.ClassFieldAccessorFactory.getClassFieldReader(ClassFieldAccessorFactory.java:11

 8)

 E/AndroidRuntime(29977):at
 org.drools.base.ClassFieldAccessorCache$CacheEntry.getReadAccessor(ClassFieldAccessorCache.java

 :168)

 E/AndroidRuntime(29977):at
 org.drools.base.ClassFieldAccessorCache.getReadAcessor(ClassFieldAccessorCache.java:101)

 E/AndroidRuntime(29977):at
 org.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:404)

 E/AndroidRuntime(29977):at
 org.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:374)

 E/AndroidRuntime(29977):at
 org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:295)

 E/AndroidRuntime(29977):at
 org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:236)

 E/AndroidRuntime(29977):at
 org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:108)

 E/AndroidRuntime(29977):at
 java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:2127)

 E/AndroidRuntime(29977):at
 java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:929)

 E/AndroidRuntime(29977):at
 java.io.ObjectInputStream.readObject(ObjectInputStream.java:2285)

 E/AndroidRuntime(29977):at
 java.io.ObjectInputStream.readObject(ObjectInputStream.java:2240)

 E/AndroidRuntime(29977):at
 com.ts.DBconnector.execPackageByPath(DBconnector.java:219)

 E/AndroidRuntime(29977):at
 com.first.FirstActivity.onCreate(FirstActivity.java:77)

 E/AndroidRuntime(29977):at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

 E/AndroidRuntime(29977):at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

 E/AndroidRuntime(29977):at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)

 E/AndroidRuntime(29977):at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)

 E/AndroidRuntime(29977):at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)

 E/AndroidRuntime(29977):at
 android.os.Handler.dispatchMessage(Handler.java:99)

 E/AndroidRuntime(29977):at android.os.Looper.loop(Looper.java:123)

 E/AndroidRuntime(29977):at
 android.app.ActivityThread.main(ActivityThread.java:4627)

 E/AndroidRuntime(29977):at
 java.lang.reflect.Method.invokeNative(Native Method)

 E/AndroidRuntime(29977):at
 java.lang.reflect.Method.invoke(Method.java:521)

 E/AndroidRuntime(29977):at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)

 E/AndroidRuntime(29977):at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

 E/AndroidRuntime(29977):at dalvik.system.NativeStart.main(Native
 Method)






   --

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Michael Anstis
 *Sent:* Thursday, June 09, 2011 4:51 PM

 *To:* Rules Users List
 *Subject:* Re: [rules-users] Drools in non-eclipse environment



 Great news :)

 Please do feedback... if you get it working I'll make a blog entry on your
 behalf as you are not the first (or last) to try Drools on Android.

 With kind regards,

 Mike

 2011/6/9 Abhay B. Chaware abhay.chaw...@kpitcummins.com

 That’s exactly what I am trying out at the moment .. option – b.
  Pre-compile, serialize and unserialize …I’ll share the results.

 Also rule file’s there at the location mentioned. So that’s not a problem.

Re: [rules-users] Evals in 5.2

2011-06-09 Thread Edson Tirelli
   Inline evals should no longer be necessary, but backward compatibles
(i.e., the engine will just ignore them). There should be no change on
eval() CEs.

   It seems we still have a bug. I will investigate.

   Edson


2011/6/9 jkrupka jkru...@gmail.com

 Should evals be supported in 5.2 with the same syntax that was used in 5.1?
 I commented on https://issues.jboss.org/browse/JBRULES-3055, but I'm
 wondering if this is a bug or just an undocumented change due to the parser
 work in 5.2...?

 I haven't tested to see what usage of evals break in 5.2 that worked in
 5.1,
 I just know that I had multiple compile errors using 5.2.0CR1 on rules that
 worked in 5.1 (and even in 5.2.0M2) that had a standalone eval pattern.
  The
 jira mentions the usage of  in the eval as the thing that causes it to
 break, but I haven't confirmed that.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Evals-in-5-2-tp3043452p3043452.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




-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools/Camel Integration sending messages

2011-06-09 Thread Andre
hi, 
i´m new in the drools-dev family and just playing around: while playing, i
can´t get over the following problem:
i configurated drools/camel/activeMQ, i also receive messsages and can
maipulate the endpoints and so on but when i try to create a new exchange
(actually i´m copying on older one, because trying to type new JmsMessage()
ends in an could not resolve constructor
org.apache.camel.component.jms.JmsMessage[])

So at the end ,if i´m just manipulating an copied exchange, the exchange
will not be send by camel directly.
my Question is:
How do i use the drools/camel Integration Component to send
exchanges/messages out of the drl/then-part?
or which context can i use in the drl (e.g: DroolsEndpoint properties)/ is
there any context available?

thx, André

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Camel-Integration-sending-messages-tp3043844p3043844.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] Terminating service threads

2011-06-09 Thread Manuel Ortiz
Hello everybody:

I have a Drools based application which instantiates KnowledgeAgent and
ResourceChangeNotifier and ResourceChangeScanner services, and see in
Eclipse Debug Tab that these classes run three threads. When my own threads
end, including main thread, these three threads keep running. How can I
terminate these threads?

Thank you very much in advance for your time.

Kind regards,

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


Re: [rules-users] Terminating service threads

2011-06-09 Thread Wolfgang Laun
Both ResourceChange... classes have a stop() method which ought to terminate
the threads.
-W

2011/6/9 Manuel Ortiz manuel.ortizra...@gmail.com

 Hello everybody:

 I have a Drools based application which instantiates KnowledgeAgent and
 ResourceChangeNotifier and ResourceChangeScanner services, and see in
 Eclipse Debug Tab that these classes run three threads. When my own threads
 end, including main thread, these three threads keep running. How can I
 terminate these threads?

 Thank you very much in advance for your time.

 Kind regards,

 Manuel Ortiz.


 ___
 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] Drools/Camel Integration sending messages

2011-06-09 Thread Edson Tirelli
   Andre,

   Not sure I understand completely the problem you are facing, but it
should be straight forward. Can you show us the configuration you are using?

   For simple unit tests, we have these:

https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel/src/test/java/org/drools/camel/component/DroolsEndpointChannelTest.java

https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel/src/test/java/org/drools/camel/component/DroolsEndpointChannelTest.java
https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointActionInsertTest.java


   Also here you can see an alternative approach that does not use channels:

http://blog.athico.com/2011/01/drools-content-based-routing-with-camel.html

   Edson


https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointActionInsertTest.java


2011/6/9 Andre morpheusan...@web.de

 hi,
 i´m new in the drools-dev family and just playing around: while playing, i
 can´t get over the following problem:
 i configurated drools/camel/activeMQ, i also receive messsages and can
 maipulate the endpoints and so on but when i try to create a new exchange
 (actually i´m copying on older one, because trying to type new JmsMessage()
 ends in an could not resolve constructor
 org.apache.camel.component.jms.JmsMessage[])

 So at the end ,if i´m just manipulating an copied exchange, the exchange
 will not be send by camel directly.
 my Question is:
 How do i use the drools/camel Integration Component to send
 exchanges/messages out of the drl/then-part?
 or which context can i use in the drl (e.g: DroolsEndpoint properties)/ is
 there any context available?

 thx, André

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Camel-Integration-sending-messages-tp3043844p3043844.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




-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Exposing rules as services

2011-06-09 Thread Xinhua Zhu
On Thu, Jun 9, 2011 at 7:23 PM, Sumeet Karawal sumeet.kara...@tcs.comwrote:

 Hi,

 Thanks Xinhua!!!
 Here I am able to get that using drools server, we could expose the
 knowledgebases as RESTful services, and those could be consumed by the
 Application.

 As in the normal application, we create a Knowledgebase, then session and
 insert facts,. after that we fireAllRules();
 So will the procedure be same in this case, to insert fact,creating
 knowledgebases and firing rules.


Xinhua: Do you mean you want to insert fact first and create knowledge-base
secondly? What are the scenarios to do so?


 Also can't we expose the rules as SOAP services?

Xinhua: Are you talking about whether or not Drools supports SOAP, or you
want to expose only some drl files as SOAP services?


 Actually I have never come across using rules as services. But in the new
 implementation I have this requirement. So, I am totally confused on how to
 go ahead, how to actually do this. Thanks for the help...

 Regards,
 Sumeet Karawal
 Mailto: sumeet.kara...@tcs.com



  From:   Xinhua Zhu xh...@it.uts.edu.au

  To: Rules Users List rules-users@lists.jboss.org

   Date:   06/09/2011 11:55 AM

  Subject:Re: [rules-users] Exposing rules as services

  Sent by:rules-users-boun...@lists.jboss.org






 Hi,

 Maybe this link can be helpful.

 http://docs.jboss.org/drools/release/5.2.0.CR1/droolsjbpm-integration-docs/html_single/index.html#d0e488

 BR
 Xinhua

 On Thu, Jun 9, 2011 at 4:02 PM, Sumeet Karawal sumeet.kara...@tcs.com
 wrote:
  Is there any documentation available regarding that or any link that I
  could refer. It would be really helpful if I get an idea on how to
  proceed
  further.

  Thanks  Regards,
  Sumeet Karawal
  Mailto: sumeet.kara...@tcs.com




   From:   Xinhua Zhu xh...@it.uts.edu.au

   To: Rules Users List rules-users@lists.jboss.org

   Date:   06/09/2011 05:51 AM

   Subject:Re: [rules-users] Exposing rules as services

   Sent by:rules-users-boun...@lists.jboss.org






  Hi,

  You can have a look at drools server.

  BR
  Xinhua

  On Wed, Jun 8, 2011 at 11:38 PM, Sumeet Karawal sumeet.kara...@tcs.com
  wrote:

   Hi,

   I am using Drools Guvnor to maintain the rule sets. I need to publish
  the
   rules as stand-alone web services. Is it possible to do that? How can
   this
   be done...

   Thanks and regards,
   Sumeet Karawal
   Mailto: sumeet.kara...@tcs.com

   =-=-=
   Notice: The information contained in this e-mail
   message and/or attachments to it may contain
   confidential or privileged information. If you are
   not the intended recipient, any dissemination, use,
   review, distribution, printing or copying of the
   information contained in this e-mail message
   and/or attachments to it are strictly prohibited. If
   you have received this communication in error,
   please notify us by reply e-mail or telephone and
   immediately and permanently delete the message
   and any attachments. Thank you



   ___
   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




 ___
 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