Re: [rules-users] why the new release 5.2 got war files specific to Jboss and tomcat not WAS server

2011-07-12 Thread Michael Anstis
We don't have access to or expertise with Web Sphere in the Guvnor core
team.

If a community member wants to make a maven profile for Web Sphere we'll
include in the distribution.

sent on the move

On 12 Jul 2011 03:28, Singaram Prabakar sprabak...@gmail.com wrote:
 Hi,
 Is Guvnor is compatible with Websphere server, if so why the new release
5.2
 got war files specific to Jboss and tomcat. why not to have a common war
 like 5.1 version?

 Thanks,

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


Re: [rules-users] Drools firing wrong rules

2011-07-12 Thread Wolfgang Laun
It's indeed a bug - a regression from 5.1.1.

Depending on the fact classes coming from Java or their being declared in
DRL, different error scenarios can be reproduced - see JBRULES-3129 and
JBRULES-3130, the latter being the issue reported by pamerida.

@pamerida: With 5.2.0, the only workaround that appears to cover all
contigencies is to give the mvel-ish expression a wide berth and use

eval( ((Three)list.get(0)).getA() == null )


On 12 July 2011 01:37, pamerida elp...@hotmail.com wrote:

 Hi.. sorry I didnt include all the information...
 heres the class Im using

 http://drools.46999.n3.nabble.com/file/n3160827/ruleInvoker.java
 ruleInvoker.java

 I use the method invocarReglas...

 I dont modify any fact, the values I show there are set before I insert the
 fact into the session...

 Im using drools 5.2

 thanks for your help



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-firing-wrong-rules-tp3160376p3160827.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools and serialize

2011-07-12 Thread clement.pernot
Hi,

I want to serialize a StatefulKnowledgeSession in drools (which have rule
and fact)
Actually i know how to serialize a KnowledgeBase.

Here is my code for serialize a KnowledgeBase:

KnowledgeBuilder kBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource( Sample.drl ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );
OutputStream os = new FileOutputStream( droolsCompiledFile );
ObjectOutputStream oos = new ObjectOutputStream( os );
oos.writeObject( kBase );
oos.close();

This work fine, no problem here.


Here is my code for serialize a StatefulKnowledgeSession:

KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource(  Sample.drl ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );

try {
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();

Message message = new Message();
message.setMessage(Hello World);
message.setStatus(Message.HELLO);
ksession.insert(message);

Marshaller marshaller = MarshallerFactory.newMarshaller(
ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{
MarshallerFactory.newSerializeMarshallingStrategy() } ); 
ByteArrayOutputStream baos = new 
ByteArrayOutputStream();
ObjectMarshallingStrategy oms =
MarshallerFactory.newIdentityMarshallingStrategy();
marshaller.marshall( baos, ksession );
   ObjectOutputStream out = new ObjectOutputStream( baos );
out.writeObject( marshaller );
out.close();
baos.close();

ksession.fireAllRules();

} catch (Throwable t) {
t.printStackTrace();
}
}

But this didn't work.
I get always the same error:
java.io.NotSerializableException
I have try to not implement the marshall but this didn't work.
I don't know what I must do. Can someone help me?
Thank.

Best regards,
Clement Pernot

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-and-serialize-tp3161882p3161882.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] Starting Guvnor in Eclipse

2011-07-12 Thread Justin Case
Thank you, I had to remove completely the test directories from the project 
because once in the project I couldn't unselect them anymore from the launch 
configuration. Now the errors are gone, cool :) I just hope I won't need test 
back.
With the abysmal startup speed I guess I have to learn to live - I had 
FastCompiledGuvnor also before. It's almost as slow as JBoss 6...

Thanks a lot for the hints,
JC


From: Michael Anstis michael.ans...@gmail.com
To: Rules Users List rules-users@lists.jboss.org
Sent: Mon, July 11, 2011 9:42:12 PM
Subject: Re: [rules-users] Starting Guvnor in Eclipse

If I am not mistaken you have created a launch configuration in Eclipse for 
Guvnor (nothing wrong there, I do the same).

What you need to do is manually delete all references to test resources in 
the 

launch configuration classpath.

The apparant lock-up is GWT compliling JScript from the Java code. It can be 
made quicker by:-

* Ensuring no test resources are on the lanch configuration (which will also 
remove the errors)

* Using the FastCompiledGuvnor module (which only compiles for en_US and 
Firefox - gecko1_8).

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


Re: [rules-users] Drools and serialize

2011-07-12 Thread Abhay B. Chaware
All the facts in working memory ( e.g. Message ) also need to be serializable. 

Regards,
 


-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of clement.pernot
Sent: Tuesday, July 12, 2011 2:42 PM
To: rules-users@lists.jboss.org
Subject: [rules-users] Drools and serialize

Hi,

I want to serialize a StatefulKnowledgeSession in drools (which have rule
and fact)
Actually i know how to serialize a KnowledgeBase.

Here is my code for serialize a KnowledgeBase:

KnowledgeBuilder kBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource( Sample.drl ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );
OutputStream os = new FileOutputStream( droolsCompiledFile );
ObjectOutputStream oos = new ObjectOutputStream( os );
oos.writeObject( kBase );
oos.close();

This work fine, no problem here.


Here is my code for serialize a StatefulKnowledgeSession:

KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource(  Sample.drl ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );

try {
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();

Message message = new Message();
message.setMessage(Hello World);
message.setStatus(Message.HELLO);
ksession.insert(message);

Marshaller marshaller = MarshallerFactory.newMarshaller(
ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{
MarshallerFactory.newSerializeMarshallingStrategy() } ); 
ByteArrayOutputStream baos = new 
ByteArrayOutputStream();
ObjectMarshallingStrategy oms =
MarshallerFactory.newIdentityMarshallingStrategy();
marshaller.marshall( baos, ksession );
   ObjectOutputStream out = new ObjectOutputStream( baos );
out.writeObject( marshaller );
out.close();
baos.close();

ksession.fireAllRules();

} catch (Throwable t) {
t.printStackTrace();
}
}

But this didn't work.
I get always the same error:
java.io.NotSerializableException
I have try to not implement the marshall but this didn't work.
I don't know what I must do. Can someone help me?
Thank.

Best regards,
Clement Pernot

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-and-serialize-tp3161882p3161882.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools and serialize

2011-07-12 Thread clement.pernot
Thank you for the hint, I will try that.
I don't know how to do this for the moment, but I will found.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-and-serialize-tp3161882p3161977.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 and serialize

2011-07-12 Thread Abhay B. Chaware
You just need to modify the definition of Message class to add implements 
Serializable .



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of clement.pernot
Sent: Tuesday, July 12, 2011 3:32 PM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] Drools and serialize

Thank you for the hint, I will try that.
I don't know how to do this for the moment, but I will found.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-and-serialize-tp3161882p3161977.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools and serialize

2011-07-12 Thread clement.pernot
I have try what you say. This didn't work.
here is my full code:

package com.sample;

import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderErrors;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.marshalling.Marshaller;
import org.drools.marshalling.MarshallerFactory;
import org.drools.marshalling.ObjectMarshallingStrategy;
import org.drools.runtime.StatefulKnowledgeSession;

public class test{

private static void compileRuleBase2( String drlPath, String rbPath )
throws Exception {
KnowledgeBuilder kBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource( drlPath ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );

try {
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();

Message message = new Message();
message.setMessage(Hello World);
message.setStatus(Message.HELLO);

ksession.insert(message);

ObjectMarshallingStrategy oms =
MarshallerFactory.newIdentityMarshallingStrategy();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Marshaller marshaller = MarshallerFactory.newMarshaller(
ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{ oms } );

marshaller.marshall( baos, ksession );
  
ObjectOutputStream out = new ObjectOutputStream( baos );
out.writeObject( marshaller );
out.close();
 
baos.close();
ksession.fireAllRules();

} catch (Throwable t) {
t.printStackTrace();
}
}

public static final void main(String[] args) {
try {
compileRuleBase2(Sample.drl, 
drools_compiled_file_with_fact );
} catch (Exception e) {
e.printStackTrace();
}
}

private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder(); 
kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
ResourceType.DRL);
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size()  0) {
for (KnowledgeBuilderError error: errors) {
System.err.println(error);
}
throw new IllegalArgumentException(Could not parse 
knowledge.);
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
}

public static class Message implements Serializable{

public static final int HELLO = 0;
public static final int GOODBYE = 1;
private String message;
private int status;

public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public int getStatus() {
return this.status;
}
public void setStatus(int status) {
this.status = status;
}   
}
}



here is my error:

java.io.NotSerializableException:
org.drools.marshalling.impl.DefaultMarshaller
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
at com.sample.test.compileRuleBase2(test.java:59)
at com.sample.test.main(test.java:73)


Thank you for your 

Re: [rules-users] Drools and serialize

2011-07-12 Thread Abhay B. Chaware
Haven't used this before, but looks like DefaultMarshaller is not serializable. 

What I've done in past is directly serializing and deserializing knowledgebase 
without using Marshaller. That worked. 

-abhay

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of clement.pernot
Sent: Tuesday, July 12, 2011 4:07 PM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] Drools and serialize

I have try what you say. This didn't work.
here is my full code:

package com.sample;

import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderErrors;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.marshalling.Marshaller;
import org.drools.marshalling.MarshallerFactory;
import org.drools.marshalling.ObjectMarshallingStrategy;
import org.drools.runtime.StatefulKnowledgeSession;

public class test{

private static void compileRuleBase2( String drlPath, String rbPath )
throws Exception {
KnowledgeBuilder kBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource( drlPath ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );

try {
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();

Message message = new Message();
message.setMessage(Hello World);
message.setStatus(Message.HELLO);

ksession.insert(message);

ObjectMarshallingStrategy oms =
MarshallerFactory.newIdentityMarshallingStrategy();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Marshaller marshaller = MarshallerFactory.newMarshaller(
ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{ oms } );

marshaller.marshall( baos, ksession );
  
ObjectOutputStream out = new ObjectOutputStream( baos );
out.writeObject( marshaller );
out.close();
 
baos.close();
ksession.fireAllRules();

} catch (Throwable t) {
t.printStackTrace();
}
}

public static final void main(String[] args) {
try {
compileRuleBase2(Sample.drl, 
drools_compiled_file_with_fact );
} catch (Exception e) {
e.printStackTrace();
}
}

private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder(); 
kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
ResourceType.DRL);
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size()  0) {
for (KnowledgeBuilderError error: errors) {
System.err.println(error);
}
throw new IllegalArgumentException(Could not parse 
knowledge.);
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
}

public static class Message implements Serializable{

public static final int HELLO = 0;
public static final int GOODBYE = 1;
private String message;
private int status;

public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public int getStatus() {
return this.status;
}
public void setStatus(int status) {

Re: [rules-users] Drools and serialize

2011-07-12 Thread Wolfgang Laun
You call
   ObjectOutputStream out = new ObjectOutputStream( baos );
   out.writeObject( marshaller );
which would (if it succeeded) just serialize the MarshallerImpl, which is
useless as it is nothing but the ballpen with which you write. You need to
serialize the text via a call to
   marshaller.marshall(...)
as you do. But, to really get it on paper, you must write to a file. Using
FileOutputStream might be an option.

-W


On 12 July 2011 12:37, clement.pernot clement.per...@newel.net wrote:

 I have try what you say. This didn't work.
 here is my full code:

 package com.sample;

 import java.io.ByteArrayOutputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;

 import org.drools.KnowledgeBase;
 import org.drools.KnowledgeBaseFactory;
 import org.drools.builder.KnowledgeBuilder;
 import org.drools.builder.KnowledgeBuilderError;
 import org.drools.builder.KnowledgeBuilderErrors;
 import org.drools.builder.KnowledgeBuilderFactory;
 import org.drools.builder.ResourceType;
 import org.drools.io.ResourceFactory;
 import org.drools.marshalling.Marshaller;
 import org.drools.marshalling.MarshallerFactory;
 import org.drools.marshalling.ObjectMarshallingStrategy;
 import org.drools.runtime.StatefulKnowledgeSession;

 public class test{

private static void compileRuleBase2( String drlPath, String rbPath
 )
 throws Exception {
KnowledgeBuilder kBuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource( drlPath ),
 ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase =
 KnowledgeBaseFactory.newKnowledgeBase();
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages()
 );

try {
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession =
 kbase.newStatefulKnowledgeSession();

Message message = new Message();
message.setMessage(Hello World);
message.setStatus(Message.HELLO);

ksession.insert(message);

ObjectMarshallingStrategy oms =
 MarshallerFactory.newIdentityMarshallingStrategy();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Marshaller marshaller =
 MarshallerFactory.newMarshaller(
 ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{ oms } );

marshaller.marshall( baos, ksession );

ObjectOutputStream out = new ObjectOutputStream(
 baos );
out.writeObject( marshaller );
out.close();

baos.close();
ksession.fireAllRules();

} catch (Throwable t) {
t.printStackTrace();
}
}

public static final void main(String[] args) {
try {
compileRuleBase2(Sample.drl,
 drools_compiled_file_with_fact );
} catch (Exception e) {
e.printStackTrace();
}
}

private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();

  kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
 ResourceType.DRL);
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size()  0) {
for (KnowledgeBuilderError error: errors) {
System.err.println(error);
}
throw new IllegalArgumentException(Could not parse
 knowledge.);
}
KnowledgeBase kbase =
 KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
}

public static class Message implements Serializable{

public static final int HELLO = 0;
public static final int GOODBYE = 1;
private String message;
private int status;

public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public int getStatus() {
return this.status;
}
public void setStatus(int status) {
this.status = status;
}
 

Re: [rules-users] Drools and serialize

2011-07-12 Thread Swindells, Thomas
This looks wrong to me
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Marshaller marshaller = MarshallerFactory.newMarshaller( 
ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{ oms } );

marshaller.marshall( baos, ksession );

ObjectOutputStream out = new ObjectOutputStream( baos );
out.writeObject( marshaller );
out.close();

Presumably the marshaller is writing out the knowledge session to the output 
stream, then you are trying to use an object output stream to output the 
marshaller you just used.
I think in this case you need to use one or the other - either just write out 
the knowledgebase through the objectOutputStream, or write out the knowledge 
base with a custom marshaling strategy with the Marshaller, not both!

Thomas
 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of Abhay B. Chaware
 Sent: 12 July 2011 11:46
 To: Rules Users List
 Subject: Re: [rules-users] Drools and serialize

 Haven't used this before, but looks like DefaultMarshaller is not 
 serializable.

 What I've done in past is directly serializing and deserializing knowledgebase
 without using Marshaller. That worked.

 -abhay

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of clement.pernot
 Sent: Tuesday, July 12, 2011 4:07 PM
 To: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Drools and serialize

 I have try what you say. This didn't work.
 here is my full code:

 package com.sample;

 import java.io.ByteArrayOutputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;

 import org.drools.KnowledgeBase;
 import org.drools.KnowledgeBaseFactory;
 import org.drools.builder.KnowledgeBuilder;
 import org.drools.builder.KnowledgeBuilderError;
 import org.drools.builder.KnowledgeBuilderErrors;
 import org.drools.builder.KnowledgeBuilderFactory;
 import org.drools.builder.ResourceType;
 import org.drools.io.ResourceFactory;
 import org.drools.marshalling.Marshaller;
 import org.drools.marshalling.MarshallerFactory;
 import org.drools.marshalling.ObjectMarshallingStrategy;
 import org.drools.runtime.StatefulKnowledgeSession;

 public class test{

   private static void compileRuleBase2( String drlPath, String rbPath )
 throws Exception {
   KnowledgeBuilder kBuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
   kBuilder.add( ResourceFactory.newFileResource( drlPath ),
 ResourceType.DRL );
   if( kBuilder.hasErrors() ){
   for( KnowledgeBuilderError err: kBuilder.getErrors() ){
   System.err.println( err.toString() );
   }
   throw new IllegalStateException( DRL errors );
   }
   KnowledgeBase kBase =
 KnowledgeBaseFactory.newKnowledgeBase();
   kBase.addKnowledgePackages(
 kBuilder.getKnowledgePackages() );

   try {
   KnowledgeBase kbase = readKnowledgeBase();
   StatefulKnowledgeSession ksession =
 kbase.newStatefulKnowledgeSession();

   Message message = new Message();
   message.setMessage(Hello World);
   message.setStatus(Message.HELLO);

   ksession.insert(message);

   ObjectMarshallingStrategy oms =
 MarshallerFactory.newIdentityMarshallingStrategy();
   ByteArrayOutputStream baos = new ByteArrayOutputStream();
   Marshaller marshaller =
 MarshallerFactory.newMarshaller( ksession.getKnowledgeBase(), new
 ObjectMarshallingStrategy[]{ oms } );

   marshaller.marshall( baos, ksession );

   ObjectOutputStream out = new
 ObjectOutputStream( baos );
   out.writeObject( marshaller );
   out.close();

   baos.close();
   ksession.fireAllRules();

   } catch (Throwable t) {
   t.printStackTrace();
   }
   }

   public static final void main(String[] args) {
   try {
   compileRuleBase2(Sample.drl,
 drools_compiled_file_with_fact );
   } catch (Exception e) {
   e.printStackTrace();
   }
   }

   private static KnowledgeBase readKnowledgeBase() throws
 Exception {
   KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();

   kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
 ResourceType.DRL);
   KnowledgeBuilderErrors errors = kbuilder.getErrors();
   if (errors.size()  0) {
   for (KnowledgeBuilderError error: errors) {
   

Re: [rules-users] Writting a fusion query with specific time intervals

2011-07-12 Thread Wolfgang Laun
On 11 July 2011 18:45, Amila Suriarachchi amilasuriarach...@gmail.comwrote:

 yes it is a fixed window.

 How to use the 'cron timers' in a rule file I am bit new to fusion. so if
 you show me an article or a code segment regarding this that would be fine.


rule OneMinutesPastEveryFullHour
timer( cron: * 1 * * * ? )
when
then
  // get current hour, access counter,...
end

You might use additional values (e.g., 9-17 for the hour field, i.e., '*'
after '1').

See
   man -s 5 crontab
for more info. Notice that Drools timer/crontab has an additional leading
field for seconds.


 And also how to run a rule just after an event appears?


This assumes that you do not modify Event here or elsewhere. Using a global
array with 24 integers initialized to 0 you can do:

rule newEvent
when
  $e: Event()
then
 // Count new event
 globalCounter[hourOf( $e.getTimestamp() )]++;
end



 thanks,
 Amila.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Writting-a-fusion-query-with-specific-time-intervals-tp3151010p3159730.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.2.0 does not create a new task for the next HumanTask when I complete the first HumanTask

2011-07-12 Thread maxnguyen
I have a flow with two Human Task nodes: Start - Review Loan - Approve Loan
- End.

With Drools 5.1.1, when I complete Review Loan, a new task is created for
Approval Loan automatically and the process waits at this node.

But with Drools 5.2.0 and Jbpm 5.1.0, no task is created for Approval Loan
when I complete Review Loan.

Any help is much appreciated.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-2-0-does-not-create-a-new-task-for-the-next-HumanTask-when-I-complete-the-first-HumanTask-tp3162210p3162210.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] Any suggestions to implement exclusions and avoid update

2011-07-12 Thread Wishing Carebear
Hello,
Any pointers is greatly appreciated.

Thanks

On Monday, July 11, 2011, Wishing Carebear wishing.careb...@gmail.com wrote:
 Hi,
 Below are 2 rules, rule1 has higher precedence than rule2. Rule2 should not 
 execute if Rule 1 executes.
 1) One way to get this working is to check the null value.
 2) If the update is not called, the Rule2 gets executed using the previous 
 null value of potentialTheftRating.

 Is there any other way to implement this requirement.



 rule  Rule 1 PotentialTheft0    ruleflow-group TheftRating0
     salience 10    no-loop    lock-on-active
     when        $client : Client()        $policy : Service(productType == 
 Vehicle Insurance) from $client.service
         $car : Vehicle(potentialTheftRating == null, vehicleType == 
 vehicleTypeType.CAR, convertible == Boolean.TRUE) from $policy.vehicle    then
         modify ($car) {            setPotentialTheftRating(  
 potentialTheftRatingType.HIGH )
         }        update($client);end
     rule  Rule2 PotentialTheft0    ruleflow-group TheftRating0
     no-loop    lock-on-active    when
         $client : Client()        $policy : Service(productType == Vehicle 
 Insurance) from $client.service
         $car : Vehicle(potentialTheftRating == null,vehicleType == 
 vehicleTypeType.CAR, price = 2, price = 45000, highTheftProbabilty == 
 Boolean.FALSE ) from $policy.vehicle
     then        modify ($car) {            setPotentialTheftRating( 
 potentialTheftRatingType.MODERATE )
         }        update($client);end


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


Re: [rules-users] Drools and serialize

2011-07-12 Thread clement.pernot
Thank you for all your tips.

I think I have found the solution. (the project run)
Now for test that, I try to make a project who can un-serialize this.

There it is:

package com.sample;

import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;

import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderErrors;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.marshalling.Marshaller;
import org.drools.marshalling.MarshallerFactory;
import org.drools.marshalling.ObjectMarshallingStrategy;
import org.drools.runtime.StatefulKnowledgeSession;


/**
 * This is a sample class to launch a rule.
 */
public class test{

 private static void compileRuleBase2( String drlPath, String rbPath )
throws Exception {
KnowledgeBuilder kBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add( ResourceFactory.newFileResource( drlPath ),
ResourceType.DRL );
if( kBuilder.hasErrors() ){
for( KnowledgeBuilderError err: kBuilder.getErrors() ){
System.err.println( err.toString() );
}
throw new IllegalStateException( DRL errors );
}
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(); 
kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );

try {
// load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();

// go !
Message message = new Message();
message.setMessage(Hello World);
message.setStatus(Message.HELLO);

ksession.insert(message);

ObjectMarshallingStrategy oms =
MarshallerFactory.newIdentityMarshallingStrategy();
Marshaller marshaller = MarshallerFactory.newMarshaller(
ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{ oms } );

OutputStream os = new FileOutputStream( rbPath );
ObjectOutputStream oos = new ObjectOutputStream( os );
marshaller.marshall( os, ksession );
  
oos.close();

ksession.fireAllRules();


} catch (Throwable t) {
t.printStackTrace();
}


}

public static final void main(String[] args) {
try{
compileRuleBase2(Sample.drl, 
drools_compiled_file_with_fact );
} catch (Exception e) {
e.printStackTrace();
}

}

private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
 
kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
ResourceType.DRL);
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size()  0) {
for (KnowledgeBuilderError error: errors) {
System.err.println(error);
}
throw new IllegalArgumentException(Could not parse 
knowledge.);
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
}

public static class Message implements Serializable{

public static final int HELLO = 0;
public static final int GOODBYE = 1;

private String message;

private int status;

public String getMessage() {
return this.message;
}

public void setMessage(String message) {
this.message = message;
}

public int getStatus() {
return this.status;
}

public void setStatus(int status) {
this.status = status;
}

}

}

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-and-serialize-tp3161882p3162316.html
Sent from the Drools: User 

Re: [rules-users] Drools and serialize

2011-07-12 Thread Swindells, Thomas
You don't need the object output stream below - and it's very bad code to give 
access to the same output stream to two parents (the marshaller and the OOS in 
this case) as you can end up just writing garbage if they interleave their 
writes - you don't know the buffering policy that each parent is using.

Thomas

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
 boun...@lists.jboss.org] On Behalf Of clement.pernot
 Sent: 12 July 2011 13:53
 To: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Drools and serialize

 Thank you for all your tips.

 I think I have found the solution. (the project run) Now for test that, I try 
 to
 make a project who can un-serialize this.

 There it is:

 package com.sample;

 import java.io.FileOutputStream;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 import java.io.Serializable;

 import org.drools.KnowledgeBase;
 import org.drools.KnowledgeBaseFactory;
 import org.drools.builder.KnowledgeBuilder;
 import org.drools.builder.KnowledgeBuilderError;
 import org.drools.builder.KnowledgeBuilderErrors;
 import org.drools.builder.KnowledgeBuilderFactory;
 import org.drools.builder.ResourceType;
 import org.drools.io.ResourceFactory;
 import org.drools.marshalling.Marshaller;
 import org.drools.marshalling.MarshallerFactory;
 import org.drools.marshalling.ObjectMarshallingStrategy;
 import org.drools.runtime.StatefulKnowledgeSession;


 /**
  * This is a sample class to launch a rule.
  */
 public class test{

private static void compileRuleBase2( String drlPath, String rbPath )
 throws Exception {
   KnowledgeBuilder kBuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
   kBuilder.add( ResourceFactory.newFileResource( drlPath ),
 ResourceType.DRL );
   if( kBuilder.hasErrors() ){
   for( KnowledgeBuilderError err: kBuilder.getErrors() ){
   System.err.println( err.toString() );
   }
   throw new IllegalStateException( DRL errors );
   }
   KnowledgeBase kBase =
 KnowledgeBaseFactory.newKnowledgeBase();
   kBase.addKnowledgePackages(
 kBuilder.getKnowledgePackages() );

   try {
   // load up the knowledge base
   KnowledgeBase kbase = readKnowledgeBase();
   StatefulKnowledgeSession ksession =
 kbase.newStatefulKnowledgeSession();

   // go !
   Message message = new Message();
   message.setMessage(Hello World);
   message.setStatus(Message.HELLO);

   ksession.insert(message);

   ObjectMarshallingStrategy oms =
 MarshallerFactory.newIdentityMarshallingStrategy();
   Marshaller marshaller = MarshallerFactory.newMarshaller(
 ksession.getKnowledgeBase(), new ObjectMarshallingStrategy[]{ oms } );

   OutputStream os = new FileOutputStream( rbPath );
   ObjectOutputStream oos = new ObjectOutputStream( os );
   marshaller.marshall( os, ksession );

   oos.close();

   ksession.fireAllRules();


   } catch (Throwable t) {
   t.printStackTrace();
   }


   }

   public static final void main(String[] args) {
   try{
   compileRuleBase2(Sample.drl,
 drools_compiled_file_with_fact );
   } catch (Exception e) {
   e.printStackTrace();
   }

   }

   private static KnowledgeBase readKnowledgeBase() throws
 Exception {
   KnowledgeBuilder kbuilder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();


   kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
 ResourceType.DRL);
   KnowledgeBuilderErrors errors = kbuilder.getErrors();
   if (errors.size()  0) {
   for (KnowledgeBuilderError error: errors) {
   System.err.println(error);
   }
   throw new IllegalArgumentException(Could not
 parse knowledge.);
   }
   KnowledgeBase kbase =
 KnowledgeBaseFactory.newKnowledgeBase();

   kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
   return kbase;
   }

   public static class Message implements Serializable{

   public static final int HELLO = 0;
   public static final int GOODBYE = 1;

   private String message;

   private int status;

   public String getMessage() {
   return this.message;
   }

   public void setMessage(String message) {
   this.message = message;
   }

   public int getStatus() {
   

Re: [rules-users] Is there any way to compress (gzip) the rules package to optimize network traffic between server and agent?

2011-07-12 Thread tarley.lana
Problem solved. I sent the patch - see
https://issues.jboss.org/browse/JBRULES-3125.

Thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/Is-there-any-way-to-compress-gzip-the-rules-package-to-optimize-network-traffic-between-server-and-a-tp3129297p3162411.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] Drools Rule Editor based on Eclipse RCP

2011-07-12 Thread magendo
Would it be possible to build a Drools Rule Editor based on the Eclipse RCP?
I'd like to have an rule editor which works similar to guvnor, but I need to
integrate it into my RCP configuration application. Where should I start in
order to achieve that? Are any similar projects out there? I have read in
different communities about guys who tried to build one, but all those
threads are dead now.

Thanks in advance for helpfull replies :)

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Rule-Editor-based-on-Eclipse-RCP-tp3162441p3162441.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 Rule Editor based on Eclipse RCP

2011-07-12 Thread Justin Case
Eclipse has a DRools plugin (on the downloads page) with offered such editors, 
but also they are not supported anymore as far as I understand. 

Eh.
JC



- Original Message 
 From: magendo robert.heisenb...@yahoo.com
 To: rules-users@lists.jboss.org
 Sent: Tue, July 12, 2011 3:40:08 PM
 Subject: [rules-users] Drools Rule Editor based on Eclipse RCP
 
 Would it be possible to build a Drools Rule Editor based on the Eclipse  RCP?
 I'd like to have an rule editor which works similar to guvnor, but I  need to
 integrate it into my RCP configuration application. Where should I  start in
 order to achieve that? Are any similar projects out there? I have  read in
 different communities about guys who tried to build one, but all  those
 threads are dead now.
 
 Thanks in advance for helpfull replies  :)
 
 --
 View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Rule-Editor-based-on-Eclipse-RCP-tp3162441p3162441.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Rule Editor based on Eclipse RCP

2011-07-12 Thread Mark Proctor
On 12/07/2011 15:08, Justin Case wrote:
 Eclipse has a DRools plugin (on the downloads page) with offered such editors,
 but also they are not supported anymore as far as I understand.
We dropped the guided editor for Eclipse, no one in the community was 
willing to help maintain it.

So only the DRL text editor is maintained now for eclipse and the debug 
editor and views. But you should be able to get those working in RCP.

Eclipse embeds Jetty now. So it should be possible to build some 
variation of guvnor that can be used as a backend to render the editors 
in the SWT Browser component for Eclipse.

Mark
 Eh.
 JC



 - Original Message 
 From: magendorobert.heisenb...@yahoo.com
 To: rules-users@lists.jboss.org
 Sent: Tue, July 12, 2011 3:40:08 PM
 Subject: [rules-users] Drools Rule Editor based on Eclipse RCP

 Would it be possible to build a Drools Rule Editor based on the Eclipse  RCP?
 I'd like to have an rule editor which works similar to guvnor, but I  need to
 integrate it into my RCP configuration application. Where should I  start in
 order to achieve that? Are any similar projects out there? I have  read in
 different communities about guys who tried to build one, but all  those
 threads are dead now.

 Thanks in advance for helpfull replies  :)

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Rule-Editor-based-on-Eclipse-RCP-tp3162441p3162441.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 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] accumulate Functions with self coded classes as result type

2011-07-12 Thread Andre
i implemented  an accumulate function which uses Datatypes, which i coded my
self  , see example 
the function return a list of ResourceMatch Objects, but when i try access
that objects i get an NullPointerrException (nothing more) (yes i imported
that class in the DRL)
so it seems that there has to be some kind of registration, so drools, can
handle these objectsm right ? 
or what did i forget? 

rule Request counting analysed Resources By Id
when
$list: List()
from accumulate($neu : RequestCtx() over
window:time(1m),countMatchingAnalysedResourcesInRequest($neu) )
ResourceMatch( $id: uri.toString(), count  1 ) from $list
then
System.out.println( Id  + $id + :  );
System.out.println(Request counting Resources By Id Rule Workss);
channels[AuthZBlocking].send(new ItemCacheEntry(new Item((String)$id),
new Date(System.currentTimeMillis()+ 8000)));
end


--
View this message in context: 
http://drools.46999.n3.nabble.com/accumulate-Functions-with-self-coded-classes-as-result-type-tp3162593p3162593.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 firing wrong rules

2011-07-12 Thread Edson Tirelli
   Ok, we will take a look at that. Thanks for reporting and verifying this.

   Edson

2011/7/12 Wolfgang Laun wolfgang.l...@gmail.com

 It's indeed a bug - a regression from 5.1.1.

 Depending on the fact classes coming from Java or their being declared in
 DRL, different error scenarios can be reproduced - see JBRULES-3129 and
 JBRULES-3130, the latter being the issue reported by pamerida.

 @pamerida: With 5.2.0, the only workaround that appears to cover all
 contigencies is to give the mvel-ish expression a wide berth and use

 eval( ((Three)list.get(0)).getA() == null )



 On 12 July 2011 01:37, pamerida elp...@hotmail.com wrote:

 Hi.. sorry I didnt include all the information...
 heres the class Im using

 http://drools.46999.n3.nabble.com/file/n3160827/ruleInvoker.java
 ruleInvoker.java

 I use the method invocarReglas...

 I dont modify any fact, the values I show there are set before I insert
 the
 fact into the session...

 Im using drools 5.2

 thanks for your help



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-firing-wrong-rules-tp3160376p3160827.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] accumulate Functions with self coded classes as result type

2011-07-12 Thread Wolfgang Laun
On 12 July 2011 16:30, Andre morpheusan...@web.de wrote:


 rule Request counting analysed Resources By Id
 when
$list: List()
from accumulate($neu : RequestCtx() over
 window:time(1m),countMatchingAnalysedResourcesInRequest($neu) )
ResourceMatch( $id: uri.toString(), count  1 ) from $list


This uri.toString() looks suspicious. Try binding just uri and call
toString() in the consequence.
-W


 then
System.out.println( Id  + $id + :  );
System.out.println(Request counting Resources By Id Rule Workss);
channels[AuthZBlocking].send(new ItemCacheEntry(new Item((String)$id),
 new Date(System.currentTimeMillis()+ 8000)));
 end


 --
 View this message in context:
 http://drools.46999.n3.nabble.com/accumulate-Functions-with-self-coded-classes-as-result-type-tp3162593p3162593.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools-API in 5.2.0.FINAL?

2011-07-12 Thread Andrew Waterman
Hi,

I was trying to upgrade my dependencies from 5.2.0.M2 to  5.2.0.Final and I
noticed that there doesn't seem to be a final build for the drools-api
module:

https://repository.jboss.org/nexus/content/groups/public-jboss/org/drools/drools-api/

I'm also not seeing any 5.3 updates in that repository.  Am I missing
something?  Did this module go away? 

Thanks!

Andrew

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-API-in-5-2-0-FINAL-tp3162723p3162723.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-API in 5.2.0.FINAL?

2011-07-12 Thread Michael Anstis
I believe it became knowledge-api.

On 12 July 2011 16:09, Andrew Waterman awate...@ecosur.mx wrote:

 Hi,

 I was trying to upgrade my dependencies from 5.2.0.M2 to  5.2.0.Final and I
 noticed that there doesn't seem to be a final build for the drools-api
 module:


 https://repository.jboss.org/nexus/content/groups/public-jboss/org/drools/drools-api/

 I'm also not seeing any 5.3 updates in that repository.  Am I missing
 something?  Did this module go away?

 Thanks!

 Andrew

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-API-in-5-2-0-FINAL-tp3162723p3162723.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools-API in 5.2.0.FINAL?

2011-07-12 Thread Andrew Waterman
Thanks!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-API-in-5-2-0-FINAL-tp3162723p3162786.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] repository in 5.2.M2 crashes in 5.2.Final because of decision table serialization

2011-07-12 Thread Vincent LEGENDRE


Hi all 



We tried to use the 5.2.Final version of Guvnor, but the compilation fails with 
an error saying that class dtable does not exists. 

After looking more depply, it appears that the XML storage format has changed 
in 5.2.Final : 

- root XML is now   decision-table52  instead of dtable 

- pattern is now  org.drools.guvnor.client.modeldriven.dt52.Pattern52  with 
some condition-column grouped by fact, instead of independant condition-column 

- pattern is now  org.drools.guvnor.client.modeldriven.dt52.Pattern52  with 
some condition-column grouped by fact, instead of independant condition-column 

- actions is now  insert-fact-column 52 instead of the same thing without 
version in it, but this time no structure changes ... 



Is there a way to migrate old tables to new format ? 

Changing a repository.xml by subtitutions is OK ? 

Do we have to plan such problems for future versions ? 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final because of decision table serialization

2011-07-12 Thread Michael Anstis
How are you loading and compiling the dtable?

Guvnor uses org.drools.ide.common.server.util.GuidedDTXMLPersistence to
convert XML to and from the object model.

This in turn uses org.drools.ide.common.server.util.RepositoryUpgradeHelper
to convert from GuidedDecisionTable to GuidedDecisionTable52.

We had to make some essential changes for Guvnor 5.2 to support CEP
operators on the guided decision table.

With kind regards,

Mike

2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com

 Hi all



 We tried to use the 5.2.Final version of Guvnor, but the compilation fails
 with an error saying that class dtable does not exists.

 After looking more depply, it appears that the XML storage format has
 changed in 5.2.Final :

 - root XML is now decision-table52 instead of dtable

 - pattern is now org.drools.guvnor.client.modeldriven.dt52.Pattern52
 with some condition-column grouped by fact, instead of independant
 condition-column

 - actions is now insert-fact-column52 instead of the same thing without
 version in it, but this time no structure changes ...



 Is there a way to migrate old tables to new format ?

 Changing a repository.xml by subtitutions is OK ?

 Do we have to plan such problems for future versions ?

 ___
 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 firing wrong rules

2011-07-12 Thread pamerida
Thanks Wolfgang Laun-2...

Ive been working on the code and this

Cuscar(bgm.size  0 , $v: bgm[0] , $v.c1001== null ); 

seems to work too, I just added the variable declaration, have no idea
why... 

Thanks everyone for your help... 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-firing-wrong-rules-tp3160376p3162841.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] repository in 5.2.M2 crashes in 5.2.Final because of decision table serialization

2011-07-12 Thread Vincent LEGENDRE


We had a repository done with 5.2.M2. 

We had exported this in a xml, and import this xml in a new 5.2.Final version 



We don't use the classes below (at least not intentionnaly), we simply try to 
get the source (from Guvnor URL) or compile a package (from t he package 
view). 


Is there a way to use org.drools.ide.common.server.util.RepositoryUpgradeHelper 
to convert the repository explicitely ? 




- Mail original -


De: Michael Anstis michael.ans...@gmail.com 
À: Rules Users List rules-users@lists.jboss.org 
Envoyé: Mardi 12 Juillet 2011 17:39:00 
Objet: Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final because of 
decision table serialization 

How are you loading and compiling the dtable? 

Guvnor uses org.drools.ide.common.server.util.GuidedDTXMLPersistence to convert 
XML to and from the object model. 

This in turn uses org.drools.ide.common.server.util.RepositoryUpgradeHelper to 
convert from GuidedDecisionTable to GuidedDecisionTable52. 

We had to make some essential changes for Guvnor 5.2 to support CEP operators 
on the guided decision table. 

With kind regards, 

Mike 


2011/7/12 Vincent LEGENDRE  vincent.legen...@eurodecision.com  






Hi all 

  

We tried to use the 5.2.Final version of Guvnor, but the compilation fails with 
an error saying that class dtable does not exists. 

After looking more depply, it appears that the XML storage format has changed 
in 5.2.Final : 

- root XML is now  decision-table52  instead of dtable 

- pattern is now  org.drools.guvnor.client.modeldriven.dt52.Pattern52  with 
some condition-column grouped by fact, instead of independant condition-column 

- actions is now  insert-fact-column 52 instead of the same thing without 
version in it, but this time no structure changes ... 

  

Is there a way to migrate old tables to new format ? 

Changing a repository.xml by subtitutions is OK ? 

Do we have to plan such problems for future versions ? 

___ 
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] repository in 5.2.M2 crashes in 5.2.Final because of decision table serialization

2011-07-12 Thread Michael Anstis
That explains it.

The CEP changes were made between 5.2.M2 and Final.

Since 5.2.M2 was a beta Mark Proctor was OK not keeping backwards
compatibility between the M2 and Final. I checked before making the changes.

Unfortunately the code-base only supports automatic conversion between
5.1.Final and 5.2.Final. Any guided decision tables made on 5.2.M1, 5.2.M2
and 5.2.CR1 are incompatible with 5.2.Final.

With kind regards,

Mike

2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com

 We had a repository done with 5.2.M2.

 We had exported this in a xml, and import this xml in a new 5.2.Final
 version



 We don't use the classes below (at least not intentionnaly), we simply try
 to get the source (from Guvnor URL) or compile a package (from the package
 view).


 Is there a way to use
 org.drools.ide.common.server.util.RepositoryUpgradeHelper to convert the
 repository explicitely ?




 --

 *De: *Michael Anstis michael.ans...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Mardi 12 Juillet 2011 17:39:00
 *Objet: *Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final
 because of decision table serialization


 How are you loading and compiling the dtable?

 Guvnor uses org.drools.ide.common.server.util.GuidedDTXMLPersistence to
 convert XML to and from the object model.

 This in turn uses org.drools.ide.common.server.util.RepositoryUpgradeHelper
 to convert from GuidedDecisionTable to GuidedDecisionTable52.

 We had to make some essential changes for Guvnor 5.2 to support CEP
 operators on the guided decision table.

 With kind regards,

 Mike

 2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com

  Hi all



 We tried to use the 5.2.Final version of Guvnor, but the compilation fails
 with an error saying that class dtable does not exists.

 After looking more depply, it appears that the XML storage format has
 changed in 5.2.Final :

 - root XML is now decision-table52 instead of dtable

 - pattern is now org.drools.guvnor.client.modeldriven.dt52.Pattern52
 with some condition-column grouped by fact, instead of independant
 condition-column

 - actions is now insert-fact-column52 instead of the same thing without
 version in it, but this time no structure changes ...



 Is there a way to migrate old tables to new format ?

 Changing a repository.xml by subtitutions is OK ?

 Do we have to plan such problems for future versions ?

 ___
 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] accumulate Functions with self coded classes as result type

2011-07-12 Thread Andre
THX
what is that ? 
VM memory ? or something special to drools ?
ERROR Caused by: [org.apache.camel.RuntimeCamelException -
org.drools.RuntimeDroolsException: Unexpected exception executing action
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteExpireAction@1f66f50]

thats my config
drools:grid-node id=node1/  
   drools:kbase id=kbase1 node=node1
   drools:resources
drools:resource type=DRL
source=classpath:META-INF/spring/test.drl/ 
/drools:resources
drools:configuration
 drools:mbeans enabled=true / 
 drools:event-processing-mode mode=STREAM / 
 drools:accumulate-functions
drools:accumulate-function
name=countMatchingSubjectIdsInRequest ref=countsubjectIds/
drools:accumulate-function
name=countMatchingResourcesInRequest ref=countResourceID/
drools:accumulate-function
name=countMatchingAnalysedResourcesInRequest ref=analyseResources/
 /drools:accumulate-functions
/drools:configuration
  /drools:kbase
  drools:ksession id=ksession1 type=stateful kbase=kbase1
node=node1
  
drools:configuration
drools:keep-reference enabled=false/
drools:clock-type type=REALTIME/
/drools:configuration
 drools:script
 drools:fire-until-halt/
   /drools:script
   /drools:ksession

--
View this message in context: 
http://drools.46999.n3.nabble.com/accumulate-Functions-with-self-coded-classes-as-result-type-tp3162593p3162868.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] repository in 5.2.M2 crashes in 5.2.Final because of decision table serialization

2011-07-12 Thread Atherton, Robert W CIV SPAWARSYSCEN-ATLANTIC, 54422
Is the statement about backwards compatibility only true for CEP and
decision tables, or does it pertain to upgrading from 5.2.M2 to Final as a
whole?  
 
My project has been trying to upgrade from 5.2.M2 to Final, and we are
having problems with our StatefulKnowledgeSession not containing any of the
processes or fact types defined in our guvnor package.
 
Thanks,
Rob

  _  

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis
Sent: Tuesday, July 12, 2011 11:53 AM
To: Rules Users List
Subject: Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final because
of decision table serialization


That explains it.

The CEP changes were made between 5.2.M2 and Final.

Since 5.2.M2 was a beta Mark Proctor was OK not keeping backwards
compatibility between the M2 and Final. I checked before making the changes.

Unfortunately the code-base only supports automatic conversion between
5.1.Final and 5.2.Final. Any guided decision tables made on 5.2.M1, 5.2.M2
and 5.2.CR1 are incompatible with 5.2.Final.

With kind regards,

Mike


2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com


We had a repository done with 5.2.M2.

We had exported this in a xml, and import this xml in a new 5.2.Final
version

 

We don't use the classes below (at least not intentionnaly), we simply try
to get the source (from Guvnor URL) or compile a package (from the package
view).


Is there a way to use
org.drools.ide.common.server.util.RepositoryUpgradeHelper to convert the
repository explicitely ?


 



  _  

De: Michael Anstis michael.ans...@gmail.com
À: Rules Users List rules-users@lists.jboss.org
Envoyé: Mardi 12 Juillet 2011 17:39:00
Objet: Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final because
of decision table serialization



How are you loading and compiling the dtable?

Guvnor uses org.drools.ide.common.server.util.GuidedDTXMLPersistence to
convert XML to and from the object model.

This in turn uses org.drools.ide.common.server.util.RepositoryUpgradeHelper
to convert from GuidedDecisionTable to GuidedDecisionTable52.

We had to make some essential changes for Guvnor 5.2 to support CEP
operators on the guided decision table.

With kind regards,

Mike


2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com


Hi all

 

We tried to use the 5.2.Final version of Guvnor, but the compilation fails
with an error saying that class dtable does not exists.

After looking more depply, it appears that the XML storage format has
changed in 5.2.Final : 

- root XML is now decision-table52 instead of dtable

- pattern is now org.drools.guvnor.client.modeldriven.dt52.Pattern52 with
some condition-column grouped by fact, instead of independant
condition-column 

- actions is now insert-fact-column52 instead of the same thing without
version in it, but this time no structure changes ...

 

Is there a way to migrate old tables to new format ? 

Changing a repository.xml by subtitutions is OK ?

Do we have to plan such problems for future versions ?



___
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






smime.p7s
Description: S/MIME cryptographic signature
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules

2011-07-12 Thread Nirmal
If condition 1 column is left blank, this could be achieved.

On Tue, Jul 12, 2011 at 11:56 AM, Syargey syar...@tut.by wrote:

 Hi all,

 I have been asked to add default rules to a decision table.

 We have a decision table with several conditions. Data from first two
 columns are passed to action with binded variables. The action collects
 data
 from all passed rules.

 -
 condition 1 | condition 2 | ... | action
 -
  AAA | AD| ... |  X
 -
  BBB  | AD| ... |  X
 -
  BBB  | AE| ... |  X
 -
  BBB  | CC| ... |  X
 -
  CCC | AD| ... |  X
 -
  DDD | AD| ... |  X
 -
  BBB  | AE| ... |  X
 -
  ...| ...| ... |  X
 -

 Recently business asked me if it is possible to have default rules (rows)
 in
 the table if there is not any rule passing condition 1.

 -
  DEFAULT   | AD| ... |  X
 -
  DEFAULT   | AE| ... |  X
 -

 Is it possible to have rules in decision table those can be fired only if a
 specific part of LHS never occurs in others rules?


 Thanks in advance,

 Syargey

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3162872.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final because of decision table serialization

2011-07-12 Thread Michael Anstis
I am only aware of the changes made around the dtable XML.

Declarative fact types would be an interesting one as that had a few changes
made too to support CEP (addition of annotations).

I am unaware of the difficulties with processes. Somebody else here may be
able to comment.


2011/7/12 Atherton, Robert W CIV SPAWARSYSCEN-ATLANTIC, 54422 
robert.ather...@navy.mil

 **
 Is the statement about backwards compatibility only true for CEP and
 decision tables, or does it pertain to upgrading from 5.2.M2 to Final as a
 whole?

 My project has been trying to upgrade from 5.2.M2 to Final, and we are
 having problems with our StatefulKnowledgeSession not containing any of the
 processes or fact types defined in our guvnor package.

 Thanks,
 Rob

  --
 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Michael Anstis
 *Sent:* Tuesday, July 12, 2011 11:53 AM
 *To:* Rules Users List
 *Subject:* Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final
 because of decision table serialization

 That explains it.

 The CEP changes were made between 5.2.M2 and Final.

 Since 5.2.M2 was a beta Mark Proctor was OK not keeping backwards
 compatibility between the M2 and Final. I checked before making the changes.

 Unfortunately the code-base only supports automatic conversion between
 5.1.Final and 5.2.Final. Any guided decision tables made on 5.2.M1, 5.2.M2
 and 5.2.CR1 are incompatible with 5.2.Final.

 With kind regards,

 Mike

 2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com

  We had a repository done with 5.2.M2.

 We had exported this in a xml, and import this xml in a new 5.2.Final
 version



 We don't use the classes below (at least not intentionnaly), we simply try
 to get the source (from Guvnor URL) or compile a package (from the package
 view).


 Is there a way to use
 org.drools.ide.common.server.util.RepositoryUpgradeHelper to convert the
 repository explicitely ?




 --

 *De: *Michael Anstis michael.ans...@gmail.com
 *À: *Rules Users List rules-users@lists.jboss.org
 *Envoyé: *Mardi 12 Juillet 2011 17:39:00
 *Objet: *Re: [rules-users] repository in 5.2.M2 crashes in 5.2.Final
 because of decision table serialization


 How are you loading and compiling the dtable?

 Guvnor uses org.drools.ide.common.server.util.GuidedDTXMLPersistence to
 convert XML to and from the object model.

 This in turn uses
 org.drools.ide.common.server.util.RepositoryUpgradeHelper to convert from
 GuidedDecisionTable to GuidedDecisionTable52.

 We had to make some essential changes for Guvnor 5.2 to support CEP
 operators on the guided decision table.

 With kind regards,

 Mike

   2011/7/12 Vincent LEGENDRE vincent.legen...@eurodecision.com

  Hi all



 We tried to use the 5.2.Final version of Guvnor, but the compilation
 fails with an error saying that class dtable does not exists.

 After looking more depply, it appears that the XML storage format has
 changed in 5.2.Final :

 - root XML is now decision-table52 instead of dtable

 - pattern is now org.drools.guvnor.client.modeldriven.dt52.Pattern52
 with some condition-column grouped by fact, instead of independant
 condition-column

 - actions is now insert-fact-column52 instead of the same thing
 without version in it, but this time no structure changes ...



 Is there a way to migrate old tables to new format ?

 Changing a repository.xml by subtitutions is OK ?

 Do we have to plan such problems for future versions ?

 ___
 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] Temporal reasoning with external persistence not working

2011-07-12 Thread rp2
Could someone please provide an answer?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Temporal-reasoning-with-external-persistence-not-working-tp3158399p3163063.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] decision tables and default rules for case when part of LHS failes for other rules

2011-07-12 Thread Syargey
It doesn't suit :( 

A blank column causes an action applies additionally.

But I need it applies only if no other conditions from first column is true.

--
View this message in context: 
http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3163069.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] decision tables and default rules for case when part of LHS failes for other rules

2011-07-12 Thread Michael Anstis
Is this XLS decision tables or in Guvnor?

In Guvnor, if a condition uses either the == or != operator you can use the
otherwise special value that achieves what you're looking for.

It isn't possible with XLS at present, although there is a JIRA for the
change.

On 12 July 2011 17:47, Syargey syar...@tut.by wrote:

 It doesn't suit :(

 A blank column causes an action applies additionally.

 But I need it applies only if no other conditions from first column is
 true.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3163069.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] how to eval with property inside a nested object

2011-07-12 Thread gmkumar2005
Hi everyone.
I have a BaseProduct with paymentMode as a property 
BaseProduct is assigned to a Customer
Customer creates a uProduct. uProduct is a customized product created by the
customer. It contains multiple BaseProducts.

for eg
Music is a Baseproduct with Wire paymentMode
Picture is a product with CreditCard paymentMode
Movie is a product with DebitCard paymentMode

iPod is a uProduct which contains Music and Pictures implies that it 
supports Wire and CreditCard 
iPad is a uProduct with contains Music, Movies and Pictures implies that it
supports all paymentModes

rule Non Mandatory
// calculates all non mandatory fields for display
when 
   $transaction : Transaction($paymentModes :uProduct.baseProduct) 
// select all the paymentModes supported by the uProduct
   $displayMode : Property(payMode in $paymentModes)
// select a property which has a valid paymentMode
   ... someOther conditions  
then
...

in the above rule $paymentModes returns arrayList of baseProducts. But I
want to access the list of paymentModes. ie, when Transaction has iPod
$paymentMode should return [wire,CreditCard], when Transaction has iPad it
should return [wire,CreditCard,DebitCard]

Question : How do I access array of a selected property which are again part
of Array of an object ?

Any suggestion ?
Thanks a lot.


--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-eval-with-property-inside-a-nested-object-tp3163169p3163169.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] SlidingTimeWindow$BehaviorExpireWMAction

2011-07-12 Thread Michael Anstis
Looks like some form of exception to me.

On 12 July 2011 17:54, Andre morpheusan...@web.de wrote:

 ERROR Caused by: [org.apache.camel.RuntimeCamelException -
 org.drools.RuntimeDroolsException: Unexpected exception executing action
 org.drools.rule.SlidingTimeWindow$BehaviorExpireWMAction@1414306]
 whats that?

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/SlidingTimeWindow-BehaviorExpireWMAction-tp3163096p3163096.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Temporal reasoning with external persistence not working

2011-07-12 Thread Wolfgang Laun
Objects produced by a from clause that haven't been inserted into Working
Memory previously are not facts, let alone events.

As the presented code shows, the timestamp of event User should be set by
Drools when the fact is inserted. Frist, with from it isn't inserted at
all, and second, if it were inserted, what timestamp would it receive - the
time it was taken from session.getUserByIndex(0)?

Not knowing why you do what you do it's difficult to suggest alternatives.

-W


On 12 July 2011 18:46, rp2 amant...@gmail.com wrote:

 Could someone please provide an answer?

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Temporal-reasoning-with-external-persistence-not-working-tp3158399p3163063.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] decision tables and default rules for case when part of LHS failes for other rules

2011-07-12 Thread Syargey
It is in XLS decision table.

--
View this message in context: 
http://drools.46999.n3.nabble.com/decision-tables-and-default-rules-for-case-when-part-of-LHS-failes-for-other-rules-tp3162872p3163227.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] Temporal reasoning with external persistence not working

2011-07-12 Thread rp2
Thanks. 
Basically I am trying to retrieve (and store) events from an external store
like in http://magazine.redhat.com/2008/07/11/jboss-drools-meets-hibernate/
expect that the backing store in not a relational db but a custom key-value
store. 

This example also does not show the facts/events being inserted. Is this
incorrect?

All it does is 
... ...
workingMemory.setGlobal(hibernateSession, session); // sets a hibernate
session
workingMemory.fireAllRules();



--
View this message in context: 
http://drools.46999.n3.nabble.com/Temporal-reasoning-with-external-persistence-not-working-tp3158399p3163303.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] Temporal reasoning with external persistence not working

2011-07-12 Thread Wolfgang Laun
On 12 July 2011 19:47, rp2 amant...@gmail.com wrote:

 Thanks.
 Basically I am trying to retrieve (and store) events from an external store
 like in
 http://magazine.redhat.com/2008/07/11/jboss-drools-meets-hibernate/
 expect that the backing store in not a relational db but a custom key-value
 store.

 This example also does not show the facts/events being inserted. Is this
 incorrect?


The example does not use events, as in @role(event). You can maintain
a value of type java.util.Date in your hibernated facts, but don't make
them events the way you do.

-W



 All it does is
 ... ...
 workingMemory.setGlobal(hibernateSession, session); // sets a hibernate
 session
 workingMemory.fireAllRules();



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Temporal-reasoning-with-external-persistence-not-working-tp3158399p3163303.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow

2011-07-12 Thread Wishing Carebear
Any pointers?

On Tuesday, July 12, 2011, Wishing Carebear wishing.careb...@gmail.com wrote:
 Hi,
 If I have a ruleflow with a sequence of rule tasks, should an update be 
 called to reflect the state of the fact in the working memory? In another 
 words If all the rules are mutually exclusive within a rule task, will the 
 changes made in first rule task, if used as a condition in the next rule task 
 will be reflected without calling explicit update.

 Thanks for your time and help.


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


Re: [rules-users] Temporal reasoning with external persistence not working

2011-07-12 Thread rp2

Wolfgang Laun-2 wrote:
 
 The example does not use events, as in @role(event). You can maintain
 a value of type java.util.Date in your hibernated facts, but don't make
 them events the way you do.
 
 
It is important for me to use temporal reasoning and CEP, and hence HAD to
define these as @events. 

In addition I wanted to load and persist these events from/in a custom non
JPA compliant key-value store because I will be running multiple instances
of drools as opposed to only one server. Therefore relying on  RAM based
working memory is not enough.

What would be your suggestion in that regard?  

--
View this message in context: 
http://drools.46999.n3.nabble.com/Temporal-reasoning-with-external-persistence-not-working-tp3158399p3164267.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] BRMS on WebLogic

2011-07-12 Thread Benson Fung
Hi,

Is there installation documentation how BRMS/Drools Guvnor is
installed on WebLogic server?  Please help.


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


Re: [rules-users] Drools Planner intro

2011-07-12 Thread Mauricio Salatino
Here is a good place to ask questions. Geofrey De Smet is the author of
Drools Planner and he is here and in the channel everyday.
Cheers

On Tue, Jul 12, 2011 at 11:47 PM, DroolersEye sprabak...@gmail.com wrote:

 Hi, I am planning to use drools planner to find solution for our planning
 problem. Is there any material available to refer, other than the drools
 official site one, so far i am not finding anything other than drools
 official site. Providing the valuable information would be appreciated.

 Thanks,

 -
 Drooler
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Planner-intro-tp3164587p3164587.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




-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

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


Re: [rules-users] Drools Planner intro

2011-07-12 Thread DroolersEye
thanks you very much Salaboy

-
Drooler
--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Planner-intro-tp3164587p3164602.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 intro

2011-07-12 Thread DroolersEye
Is RedHat providing official support like other drools product?

-
Drooler
--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Planner-intro-tp3164587p3164619.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 intro

2011-07-12 Thread Mark Proctor
On 13/07/2011 03:58, DroolersEye wrote:
 Is RedHat providing official support like other drools product?
Planner is still a community level project and needs more bake in time 
before we can start supporting it at a product level. There are no 
timelines yet for that and it all depends on how much community 
engagement there is for this, both at a user level and contributor level.

Red Hat may be able to provide consultancy support for planner, via it's 
professional services devision, but this is done on a case by case basis 
as it's an early project. Contact sa...@jboss.com for more information.

Mark

 -
 Drooler
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-Planner-intro-tp3164587p3164619.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Temporal reasoning with external persistence not working

2011-07-12 Thread Wolfgang Laun
First of all, don't use automated time stamping of events; add a field
carrying the (original) event time. I think you could also run the session
in CLOUD mode.

Also, it may not be advisable to pull in facts and reason over them in the
same rule. Perhaps retrieval and proper insertion of facts should even be
coded in Java, kept separate from the rule logic.

Much depends on the required use cases for running those multiple sessions,
and how canned events relate to other data.

-W


On 13 July 2011 02:13, rp2 amant...@gmail.com wrote:


 Wolfgang Laun-2 wrote:
 
  The example does not use events, as in @role(event). You can maintain
  a value of type java.util.Date in your hibernated facts, but don't make
  them events the way you do.
 
 
 It is important for me to use temporal reasoning and CEP, and hence HAD to
 define these as @events.

 In addition I wanted to load and persist these events from/in a custom non
 JPA compliant key-value store because I will be running multiple instances
 of drools as opposed to only one server. Therefore relying on  RAM based
 working memory is not enough.

 What would be your suggestion in that regard?

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Temporal-reasoning-with-external-persistence-not-working-tp3158399p3164267.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Mvel versus java dialect

2011-07-12 Thread Mark Proctor
On 13/07/2011 05:49, Wishing Carebear wrote:
 Hello,
 When should the mvel and java dialect be used?
MVEL is a nicer and friendly language to use than java. Although it does 
execute slightly slower and doesn't have support for anonymous classes.

I suggest you try MVEL and switch to java if you hit problems.

Mark

 Thanks,
 Cabe
 ___
 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] BRMS on WebLogic

2011-07-12 Thread Jervis Liu
On 2011/7/13 10:30, Benson Fung wrote:
 Hi,

 Is there installation documentation how BRMS/Drools Guvnor is
 installed on WebLogic server?  Please help.


https://community.jboss.org/wiki/DroolsGuvnor50Installation
 Thanks
 Benson
 ___
 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