Re: [rules-users] drools vs jbpm

2010-09-21 Thread Bernd Rücker
Hey!

If you asked for just a rule engine, this is nothing available in jBPM
(which is a process engine).

If you asked for processes and workflow then I have a follow up question
for Mark: Is there already any timeline on jBPM 5?

Cheers
Bernd

-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Mark Proctor
Gesendet: Dienstag, 21. September 2010 19:52
An: rules-users@lists.jboss.org
Betreff: Re: [rules-users] drools vs jbpm

  On 21/09/2010 18:07, woods5242-photogra...@yahoo.com wrote:
 Hi,
 We need a rules engine for our project and I am trying to determine the
main
 differences between Drools and JBPM. Can anyone on here provide a brief
 explanation maybe offering why one is better than the other, chances of
them
 being merged or one being retired over the other?  Are they competing
projects?
Drools Flow will be incorporated into jBPM5. The safest bet for now is
to adopt Drools Flow, as the changes for adoptiong jBPM5 when we release
it will be minimal.

Mark
 thanks!

 ___
 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] Question about BPMN2 and Drools

2010-09-05 Thread Bernd Rücker
Hi Christiano.

The interesting question is: What is done by the Process Engine (e.g.
Drools Flow) if you have multiple pools? Normally one pool = one process
authority meaning one Process Engine... At least if you model for
executability (see e.g.
http://www.bpm-guide.de/2010/07/15/bpmn-2-0-am-beispiel-incident-managemen
t/).

By the way, in Activiti Cycle we can already cut out the Process Engine
pool on the fly when creating the technical BPMN from the business BPMN
:-) Blog in a few days about it, but a bit like described with the
developer friendly BPMN here:
http://www.bpm-guide.de/2010/08/27/activiti-cycle-explained/. And I think
it shouldn't be a big deal to use Activiti Cycle together with Drools
Flow...

Cheers
Bernd

-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Cristiano
Gavião
Gesendet: Freitag, 3. September 2010 23:49
An: Rules Users List
Betreff: [rules-users] Question about BPMN2 and Drools

Hi,

I'm investigating the new Oryx editor... I'm delighted with it. It's a
such nice work :-)

and I would like to know how will Drools to address BPMN2 diagrams with
more than one pool/ swimlanes.

Something like this:
http://blog.bpmn.info/wp-content/uploads/2008/10/chor1.png, will be
runnable by Drools flow and editable at eclipse editor?

thanks

cheers

Cristiano


___
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] Rule Templates and null values

2010-02-26 Thread Bernd Rücker
Hi all.



I question myself if I can get the Rule Templates to works like it is in
Excel: If one “parameter” is not set (null), the whole line of the
template is skipped?



Since we want to build a template for a lot of rules, fed from a database.
There some conditions can be null, so they should not be included in the
rule at all. Has anybody an idea to this? I haven’t found anything,
neither in the docs, nor in the testcases…



Thanks a lot

Bernd



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


Re: [rules-users] Rule Templates and null values

2010-02-26 Thread Bernd Rücker
Okay, digging more into the source code I found the method
“replaceOptionals” which does exactly what I need. So despite the missing
docs, a line IS skipped if the according parameter used in that line is
null. Perfect :-)



Sorry for the interruption…



Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Bernd Rücker
Gesendet: Freitag, 26. Februar 2010 12:30
An: rules-users@lists.jboss.org
Betreff: [rules-users] Rule Templates and null values



Hi all.



I question myself if I can get the Rule Templates to works like it is in
Excel: If one “parameter” is not set (null), the whole line of the
template is skipped?



Since we want to build a template for a lot of rules, fed from a database.
There some conditions can be null, so they should not be included in the
rule at all. Has anybody an idea to this? I haven’t found anything,
neither in the docs, nor in the testcases…



Thanks a lot

Bernd



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


Re: [rules-users] Rule Templates and null values

2010-02-26 Thread Bernd Rücker
It works out of the box. So in this example:

12 rule Cheese fa...@{row.rownumber}
13 when
14Person(age == @{age})
15Cheese(type == @{type})
16 then
17list.add(@{log});
18 end

If you provide age=null, line 14 is not included in the rule
automatically.



-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Pavel Tavoda
Gesendet: Freitag, 26. Februar 2010 14:46
An: Rules Users List
Betreff: Re: [rules-users] Rule Templates and null values

Enlighten us. Where is this method and how to use it? I'm also interested.

Palo

2010/2/26 Bernd Rücker bernd.ruec...@camunda.com:
 Okay, digging more into the source code I found the method
 “replaceOptionals” which does exactly what I need. So despite the
missing
 docs, a line IS skipped if the according parameter used in that line is
 null. Perfect :-)



 Sorry for the interruption…



 Von: rules-users-boun...@lists.jboss.org
 [mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Bernd Rücker
 Gesendet: Freitag, 26. Februar 2010 12:30
 An: rules-users@lists.jboss.org
 Betreff: [rules-users] Rule Templates and null values



 Hi all.



 I question myself if I can get the Rule Templates to works like it is in
 Excel: If one “parameter” is not set (null), the whole line of the
template
 is skipped?



 Since we want to build a template for a lot of rules, fed from a
database.
 There some conditions can be null, so they should not be included in the
 rule at all. Has anybody an idea to this? I haven’t found anything,
neither
 in the docs, nor in the testcases…



 Thanks a lot

 Bernd



 ___
 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] Serialization of packages: NotSerializableException (KnowledgePackageImp) and InvalidClassException (serialVersionUID)

2009-10-28 Thread Bernd Rücker
Has anybody an idea what’s these problems? I didn’t find any test cases,
are there any test cases for serializing the PKG files? What am I doing
wrong?







Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Bernd Rücker
Gesendet: Dienstag, 1. September 2009 17:26
An: rules-users@lists.jboss.org
Betreff: [rules-users] WG: Serialization of packages:
InvalidClassException / serialVersionUID



The exception of the KnowledgePackage serialization (by the way, this is
described in the docs, that you can serialize the KnowledgePackages!):



/home/bruecker/workspace/1/iKS2/iks_drools_rules/drools-rules.pkg

Exception in thread main java.io.NotSerializableException:

org.drools.definitions.impl.KnowledgePackageImp

at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)

at

org.drools.util.DroolsStreamUtils.streamOut(DroolsStreamUtils.java:79)

at

org.drools.util.DroolsStreamUtils.streamOut(DroolsStreamUtils.java:61)





So this doesn’t work either
(http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/ht
ml_single/index.html#d0e992):



3.2.4. Building and Deployment in Separate Processes

Both the KnowledgeBase and the KnowledgePackage are units of deployment
and serializable. This means you can have one machine do any necessary
building, requiring drools-compiler.jar, and have another machine deploy
and execute everything, needing only drools-core.jar.

Although serialization is standard Java, we present an example of how one
machine might write out the deployment unit and how another machine might
read in and use that deployment unit.

Example 3.15. Writing the KnowledgePackage to an OutputStream

ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(
fileName ) );

out.writeObject( kpkgs );

out.close();



Example 3.16. Reading the KnowledgePackage from an InputStream

ObjectInputStream in = new ObjectInputStream( new FileInputStream(
fileName ) );

// The input stream might contain an individual

// package or a collection.

@SuppressWarnings( unchecked )

CollectionKnowledgePackage kpkgs =

()in.readObject( CollectionKnowledgePackage );

in.close();



KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

kbase.addKnowledgePackages( kpkgs );



The KnowledgeBase is also serializable and some people may prefer to build
and then store the KnowledgeBase itself, instead of the Knowledge
Packages.

Drools Guvnor, our server side management system, uses this deployment
approach. After Guvnor has compiled and published serialized Knowledge
Packages on a URL, Drools can use the URL resource type to load them.





Von: Bernd Rücker [mailto:bernd.ruec...@camunda.com]
Gesendet: Dienstag, 1. September 2009 17:21
An: 'rules-users@lists.jboss.org'
Betreff: Serialization of packages: InvalidClassException /
serialVersionUID



Hi!



I really struggled some time with serialization issues: I want to create a
pkg and package that with the jar. From there I want to read it during
runtime.



Easy I thought. Drools 5 way should be to serialize the KnowledgeBase,
right? At least, this is what the AntTask does.



If I try to serialize the KnowledgePackage I get an excpetion anyway:





Okay. Back to the KnowledgeBase. Serialized with Drools 5.0.0.M4 and try
to read it with 5.0.0.M5:



Caused by: java.io.InvalidClassException:

  org.drools.impl.KnowledgeBaseImpl;

  local class incompatible: stream classdesc serialVersionUID =
-4540376767025107954,

  local class serialVersionUID = -3186110098262381425



So it seems Drools Packages are NOT compatible between minor versions?
This would be a disaster for deployment. Or do I serialize the wrong
thing? Unfortunately I didn’t find anything in the docs about it.



Then I tried to do it the “old” Drools 4 way and serialize Package
objects, but same problem with a different serialVersionUID!



Why do these important classes don’t have a serialVersionUID? Or how
should that be loaded? Must be a big issue with Govner, so I think there
must be a solution already?



Thanks for any help!



Cheers

Bernd



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


Re: [rules-users] Better way to run each rule once?

2009-10-10 Thread Bernd Rücker
Hey guys.

II think Daves use case is completely valid in that case. This is what is
normally done in Business Rules - not complex AI problems, but extracting
rules from code. Actually the much more common problem I think...

Cheers
Bernd

-Ursprüngliche Nachricht-
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Dave
Schweisguth
Gesendet: Samstag, 10. Oktober 2009 03:14
An: Rules Users List
Cc: Rules Dev List
Betreff: Re: [rules-users] Better way to run each rule once?

James,

On Fri, Oct 09, 2009 at 06:28:21PM -0500, James Owen wrote:
 [...] The whole thing sounds like a procedural problem where values
are
 modified and rules are fired only once. [...]

You're right, and I've felt bad about using this very powerful system in
such a limited way. Nonetheless Drools feels like an excellent fit for us:
we do have the requirement of having rules editable by non-engineers, and
Drools provides all of the structure around that that we'd otherwise have
had to come up with, plus a lot of room to grow. I've actually been
wondering whether anyone would suggest a way to solve the problem by
designing the rules and/or facts differently!

I also left out various complications: we have other classes of facts on
the LHS, and Thing's attributes appear on the LHS as well as its
unmodifiable properties. I considered a design where attributes were
first-
class facts, but it seemed to run in to the same problem. I don't think
any
of that goes against your basic point, however. What I wonder is whether
it's
an inappropriate problem for the tool or merely inexpert use of the tool.

Cheers,

--
| Dave Schweisguth   http://schweisguth.org/~dave/
|
| Home: dave at schweisguth.orgWork: http://www.nileguide.com/
|
| For compliance with the NJ Right to Know Act: Contents partially unknown
|
___
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] Maven Plugin to build pkg files

2009-09-02 Thread Bernd Rücker
Hi Eric.



Thanks for the answer. Basically I developed that code yesterday, yes. I
did it somehow similar to the Ant Task. But I had some serious
serialization issues as posted yesterday. Maybe you have an idea about
that?



 If one doesn’t exist and there’s enough interest, we

 could use what I have as a starting point as an open source plugin for
it.



You mean in the drools codebase? Basically, yes, sure. Should be no
problem to contribute it. Just tell me how to progress in that area.



Cheers

Bernd



Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag von Miles, Eric
Gesendet: Mittwoch, 2. September 2009 14:27
An: Rules Users List
Betreff: Re: [rules-users] Maven Plugin to build pkg files



Bernd,



Something didn’t exist as of Drools 4.x (at least nothing official).  With
the latest release of Drools, the amount of code needed to be written to
compile is actually pretty small.  Making a Maven plugin would not be that
difficult.  I’ve made one that is just a couple of hundred lines long and
most of that is the Maven framework glue.



If one doesn’t exist and there’s enough interest, we could use what I have
as a starting point as an open source plugin for it.



Eric



  _

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Bernd Rücker
Sent: Monday, August 31, 2009 10:57 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Maven Plugin to build pkg files



Hi all.



I wonder if there exists a maven plugin to build pkg files out of the rule
base during the maven packaging. Because we don’t use the Guvnor
repository in this project and I want to package the pkg files with the
overall ear.



I searched a bit, but didn’t found anything… Okay, not hard to write
ourself, but would be nicer to reuse existing stuff…



Thanks

Bernd



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


[rules-users] Serialization of packages: InvalidClassException / serialVersionUID

2009-09-01 Thread Bernd Rücker
Hi!



I really struggled some time with serialization issues: I want to create a
pkg and package that with the jar. From there I want to read it during
runtime.



Easy I thought. Drools 5 way should be to serialize the KnowledgeBase,
right? At least, this is what the AntTask does.



If I try to serialize the KnowledgePackage I get an excpetion anyway:





Okay. Back to the KnowledgeBase. Serialized with Drools 5.0.0.M4 and try
to read it with 5.0.0.M5:



Caused by: java.io.InvalidClassException:

  org.drools.impl.KnowledgeBaseImpl;

  local class incompatible: stream classdesc serialVersionUID =
-4540376767025107954,

  local class serialVersionUID = -3186110098262381425



So it seems Drools Packages are NOT compatible between minor versions?
This would be a disaster for deployment. Or do I serialize the wrong
thing? Unfortunately I didn’t find anything in the docs about it.



Then I tried to do it the “old” Drools 4 way and serialize Package
objects, but same problem with a different serialVersionUID!



Why do these important classes don’t have a serialVersionUID? Or how
should that be loaded? Must be a big issue with Govner, so I think there
must be a solution already?



Thanks for any help!



Cheers

Bernd



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


[rules-users] WG: Serialization of packages: InvalidClassException / serialVersionUID

2009-09-01 Thread Bernd Rücker
The exception of the KnowledgePackage serialization (by the way, this is
described in the docs, that you can serialize the KnowledgePackages!):



/home/bruecker/workspace/1/iKS2/iks_drools_rules/drools-rules.pkg

Exception in thread main java.io.NotSerializableException:

org.drools.definitions.impl.KnowledgePackageImp

at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)

at

org.drools.util.DroolsStreamUtils.streamOut(DroolsStreamUtils.java:79)

at

org.drools.util.DroolsStreamUtils.streamOut(DroolsStreamUtils.java:61)





So this doesn’t work either
(http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/ht
ml_single/index.html#d0e992):



3.2.4. Building and Deployment in Separate Processes

Both the KnowledgeBase and the KnowledgePackage are units of deployment
and serializable. This means you can have one machine do any necessary
building, requiring drools-compiler.jar, and have another machine deploy
and execute everything, needing only drools-core.jar.

Although serialization is standard Java, we present an example of how one
machine might write out the deployment unit and how another machine might
read in and use that deployment unit.

Example 3.15. Writing the KnowledgePackage to an OutputStream

ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(
fileName ) );

out.writeObject( kpkgs );

out.close();



Example 3.16. Reading the KnowledgePackage from an InputStream

ObjectInputStream in = new ObjectInputStream( new FileInputStream(
fileName ) );

// The input stream might contain an individual

// package or a collection.

@SuppressWarnings( unchecked )

CollectionKnowledgePackage kpkgs =

()in.readObject( CollectionKnowledgePackage );

in.close();



KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

kbase.addKnowledgePackages( kpkgs );



The KnowledgeBase is also serializable and some people may prefer to build
and then store the KnowledgeBase itself, instead of the Knowledge
Packages.

Drools Guvnor, our server side management system, uses this deployment
approach. After Guvnor has compiled and published serialized Knowledge
Packages on a URL, Drools can use the URL resource type to load them.





Von: Bernd Rücker [mailto:bernd.ruec...@camunda.com]
Gesendet: Dienstag, 1. September 2009 17:21
An: 'rules-users@lists.jboss.org'
Betreff: Serialization of packages: InvalidClassException /
serialVersionUID



Hi!



I really struggled some time with serialization issues: I want to create a
pkg and package that with the jar. From there I want to read it during
runtime.



Easy I thought. Drools 5 way should be to serialize the KnowledgeBase,
right? At least, this is what the AntTask does.



If I try to serialize the KnowledgePackage I get an excpetion anyway:





Okay. Back to the KnowledgeBase. Serialized with Drools 5.0.0.M4 and try
to read it with 5.0.0.M5:



Caused by: java.io.InvalidClassException:

  org.drools.impl.KnowledgeBaseImpl;

  local class incompatible: stream classdesc serialVersionUID =
-4540376767025107954,

  local class serialVersionUID = -3186110098262381425



So it seems Drools Packages are NOT compatible between minor versions?
This would be a disaster for deployment. Or do I serialize the wrong
thing? Unfortunately I didn’t find anything in the docs about it.



Then I tried to do it the “old” Drools 4 way and serialize Package
objects, but same problem with a different serialVersionUID!



Why do these important classes don’t have a serialVersionUID? Or how
should that be loaded? Must be a big issue with Govner, so I think there
must be a solution already?



Thanks for any help!



Cheers

Bernd



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


[rules-users] Maven Plugin to build pkg files

2009-08-31 Thread Bernd Rücker
Hi all.



I wonder if there exists a maven plugin to build pkg files out of the rule
base during the maven packaging. Because we don’t use the Guvnor
repository in this project and I want to package the pkg files with the
overall ear.



I searched a bit, but didn’t found anything… Okay, not hard to write
ourself, but would be nicer to reuse existing stuff…



Thanks

Bernd



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


Re: [rules-users] not able to debug drools flow

2009-08-24 Thread Bernd Rücker
Same for me, Eclipse 3.5.0 with jdk 6 and Drools 5 (contained in JBoss
Tools) under Windows XP.

 

I get exactly the same exception when trying to debug.

 

With Eclipse 3.4.2 it works (the other environment keeps the same).

 

Cheers

Bernd

 

P.S: Maybe the wrong place and time, but a forum for drools users would be
much more handy to use than the mailing list ;-)

 

--

Hi,

 

I am using Eclipse 3.5.0, jdk 1.6.0_13-b03 and Drools 5.0 all on Windows
XP

Professional SP3.

 

Jakob

 

 

On Sat, Aug 22, 2009 at 11:47 PM, Kris Verlaenen 

kris.verlae...@cs.kuleuven.be wrote:

 

 I just tried using Eclipse 3.5.0, jdk 1.6.0_06 and the latest Drools

 5.1.0.SNAPSHOT on RHEL and everything seems to be working fine ...

 

 Could you specify the exact environment you are getting this error in,

 so I can at least try to reproduce?

 

 Kris

 

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