Small patch against WorkingMemoryInMemoryLogger
by jschmied
Hi!
The WorkingMemoryInMemoryLogger writes a different format compared to the
WorkingMemoryFileLogger. This patch fixes this.
--------
--- Desktop/WorkingMemoryInMemoryLogger.java Thu Jan 27 15:49:55 2011
+++ WorkingMemoryInMemoryLogger.java Fri Oct 15 11:16:19 2010
@@ -52,15 +52,19 @@
super( session );
}
+ @Override
@SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
super.readExternal(in);
events = (List<LogEvent>) in.readObject();
}
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
- out.writeObject(events);
+ for (LogEvent event : events) {
+ out.writeObject(event);
+ }
}
public String getEvents() {
@@ -68,7 +72,9 @@
StringWriter writer = new StringWriter();
try {
final ObjectOutputStream out =
xstream.createObjectOutputStream(writer);
- out.writeObject( this.events );
+ for (LogEvent event : events) {
+ out.writeObject(event);
+ }
out.close();
} catch (Throwable t) {
throw new RuntimeException("Unable to create event output: " +
t.getMessage());
--------
could somebody apply this?
Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Small-patch-against-W...
Sent from the Drools - Dev mailing list archive at Nabble.com.
13 years, 11 months
Need to audit decision table action column values
by gomodus
We have a decision table that has a number of rows. Each row has a few Action
columns that hold values that change over a period of time => new versions
of the decision table are created.
We are required to create a report that shows how the values have changed
over time. In essence, we need the report to have the following layout:
date/timestamp | condition column 1 value | condition column 2 value |
action column 1 old value | action column 1 new value | action column 2 old
value | action column 2 new value
The report is to be built in a package that mainly works off a SQL database.
So, we need a way to put decision table changes into one or more database
tables.
Fetching multiple versions of the decision table XML from JCR and parsing
the XML appears complicated. Please suggest what are our options - any
listeners, loggers that can help extract these values?
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Need-to-audit-decisio...
Sent from the Drools - Dev mailing list archive at Nabble.com.
13 years, 11 months
Guvnor build problems?
by Michael Anstis
Hi,
I tried building a WAR for Guvnor and found a couple of hick-ups (although
it was with my local copy of master taken a few months ago).
I mention them here in case they are unknown issues (feel free to beat me up
if I simply need to resync with master; which will happen as part of my
dtable commit...)
1) In \drools-guvnor
mvn package -DskipTests=true -PfullProfile
Didn't build dependant drools-ide-common, as I'd expect and I had to "mvn
install" this first.
2) In \drools-guvnor
mvn package -DskipTests=true -PfullProfile
Built the WAR however the test classes are also included, leading to a Seam
error when deploying:-
SEVERE: Exception sending context initialized event to listener instance of
class org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: Two components with the same name and
precedence - component name:
org.drools.guvnor.server.security.RoleBasedPermissionStore, component
classes: org.drools.guvnor.server.security.MockRoleBasedPermissionStore,
org.drools.guvnor.server.security.RoleBasedPermissionStore
at
org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:586)
at
org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:927)
at
org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:874)
at org.jboss.seam.init.Initialization.init(Initialization.java:687)
This traced back to "MockRoleBasedPermissionStore" in the test classes and
"RoleBasedPermissionStore" in the non-test classes.
Tomcat 6.x.
3) Alot of Guvnor tests failed, however I assume Toni Rikkola could have
fixed recently with his work in this area.
Cheers,
Mike
13 years, 11 months
Configuring JBoss / Guvnor for Compilation Compatibility
by Michael Kirchmann
Hello Dev List,
I have a question regarding Guvnor Configuration, version 5.0 and 5.1.1 respectively.
Assume that I run Guvnor with a JDK 6.
How do I configure Guvnor such that when the user presses the "Build Package" button, that classes are compatible for JRE 5.0?
The problem is that the client accessing the Rules PKG is running with JRE5/JDK5 and thus cannot understand classes that are compiled without backward compatibility.
Mit besten Grüßen / Best regards
Michael Kirchmann
IT Consultant / Software Engineer
PRODYNA AG
Eschborner Landstraße 42-50
60489 Frankfurt
13 years, 11 months
JDK1.5 Future for Drools and jBPM
by Mark Proctor
http://blog.athico.com/2011/01/jdk15-future-for-drools-and-jbpm.html
Dropping JDK1.5 is something that rears it's head from time to time, and
we know we have to address it sooner or later.
We recognise that the majority of people would like to see JDK1.5
dropped, but there are still a few large critical enterprises using
Drools and jBPM on JDK1.5.
Technically for us there isn't a huge advantage, and certainly no "must
have" feature, in the same way that moving from 1.4 to 1.5 was. However
it does make the project easier to manage: less runtime targets to test
against and we don't need to double check people are putting JDK1.6 only
classes in Drools and jBPM.
My personally opinion is that we need a widest audience possible for the
up coming jBPM5 release and we still have some critical things I'd like
to see in Drools first. So personally I'd like to wait until the last
few months of this year, say October, before dumping JDK1.5; which would
allow for a very late 2011 release or very ealry 2012 release that is
JDK1.6+.
What do people think? Comments welcome, I've also added a poll on the
right side.
Mark
13 years, 11 months
Drools running in Google App Engine - list of changes made to code
by Paul Browne
Folks,
A little bit later than expected (!) I've managed to get Drools running
within Google App Engine.
A list of the changes that I made to the Drools Core and Drools Util code
are below. A lot of these changes are NullPointer checks when reading
properties from a file (i.e. things that you might want in the codebase
anyway).
Notes on the sample I used to try this out are at
http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine
The sample (for the moment) is running a pre-built KnowledgeBase within GAE
(i.e. no rule compilation, nor any of the advanced features).
What is the best way of submitting the actual code changes for review and
possible inclusion as part of the Drools source code?
Thanks
Paul
* Drools Core *
AbstractRuleBase.java // line 265 surrounded by try / catch
this.config = (RuleBaseConfiguration) droolsStream.readObject();
RuleBaseConfiguration.java // - line 985 surround by try / catch
this.classLoader = ClassLoaderUtil.getClassLoader
RuleBaseConfiguration.java // line 395 surround by try / catch
this.chainedProperties = new ChainedProperties( "rulebase.conf",
RuleBaseConfiguration.java // line 457 surround by try / catch,
default Conflict Resolver
setConflictResolver( determineConflictResolver(
this.chainedProperties.getProperty( "drools.conflictResolver",
* Drools Util *
ChainedProperties.java // line 98 - exception check around
ClassLoader.getSystemClassLoader();
ChainedProperties.java // line 125 - exception check around
ClassLoader.getSystemClassLoader();
ChainedProperties.java // line 160
- null check for properties /key and return default
ChainedProperties.java // line 240 - surround by try / catch for
securityaccessexception
if ( file != null && file.exists() ) {
ChainedProperties.java // line 270 - surround by try / catch for
securityaccessexception
if ( file != null && file.exists() ) {
ClassFieldInspector.java // line 166 -
return "/" + clazz.getCanonicalName() + ".class";
ClassLoaderUtil.java // line 25 - surround by try / catch for
securityaccessexception
ClassLoader systemClassLoader =
13 years, 11 months
Decision table
by Wolfgang Laun
All of these are now valid cells in the 1st line below CONDITION:
Type
Type()
Type from $east
Type() from $west
and constraints from one or more snippets in the 2nd line are handled as
should be.
... eval
... eval()
are also accepted and expressions from one or more snippets in the 2nd line
are joined with '&&' and inserted into the eval.
And: memberOf and str[...] are recognized as trailing operators.
-W
>
13 years, 11 months
Drools running in Google App Engine
by Paul Browne
@Mark
Hope married life is treating you well (yep, it's been that long!)
The code that I'm using to Package up the Drools Rules is at the link below.
Pretty much just serializing the KnowledgeBase to a file, that is later read
in via a URL when it is deployed on App Engine ; Encountered plenty of
java.io.File restrictions, but no problems at all around the bytecode (at
the moment the code is generated within Eclipse, using the GAE plugin, which
modifies Java not Rule code after the normal compile) .
http://code.google.com/p/red-piranha/source/browse/trunk/src/net/firstpar...
Will try to package create a patch using GIT - give me a couple of days to
figure that out!
@salaboy
It's a very basic feature set at the moment; Just rule load, insert facts,
globals and get output.
The online sample loads a spreadsheet, rules fire that update the
spreadsheet, marks the changed cells in Orange. I have the simple sample
deployed as of today (17th Jan '11) - might take down or modify later).
Original Spreadsheet;
http://red-piranha.appspot.com/spreadsheet/chocolate-data.xls
Rules file;
http://red-piranha.appspot.com/spreadsheet/log-then-modify-rules.drl
Run the sample online; http://red-piranha.appspot.com/ - check out the 'log'
tab in the spreadsheet to see what rules have fired.
Red-Piranha project aim is to make the power of Drools available to Excel
users *without* Java code. Number 1 complaint about my book was the 'techie
setup bit' in Chapter 2 (remember the audience was Excel power users);
Deploying online allows people to try without the setup.
So, most of the features I want to add will be case-by-case as needed by the
samples. It would be *cool* to compile the rules online; When I tried this
12 months ago there were problems with the Apache Mvel library so I may be
brave enough to try again later, but current priority is to get the Core /
Runtime changes submitted as a JIRA patch.
Paul
----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 17 Jan 2011 19:25:54 +0000
> From: Paul Browne <paulb(a)firstpartners.net>
> Subject: [rules-dev] Drools running in Google App Engine - list of
> changes made to code
> To: rules-dev(a)lists.jboss.org
> Message-ID:
> <AANLkTimAwC3nb2P0LRx40LBpUg3Jx+7dEuuyYQ7tbOTZ(a)mail.gmail.com<AANLkTimAwC3nb2P0LRx40LBpUg3Jx%2B7dEuuyYQ7tbOTZ(a)mail.gmail.com>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Folks,
>
> A little bit later than expected (!) I've managed to get Drools running
> within Google App Engine.
>
> A list of the changes that I made to the Drools Core and Drools Util code
> are below. A lot of these changes are NullPointer checks when reading
> properties from a file (i.e. things that you might want in the codebase
> anyway).
>
> Notes on the sample I used to try this out are at
> http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine
> The sample (for the moment) is running a pre-built KnowledgeBase within GAE
> (i.e. no rule compilation, nor any of the advanced features).
>
> What is the best way of submitting the actual code changes for review and
> possible inclusion as part of the Drools source code?
>
> Thanks
>
> Paul
>
> * Drools Core *
>
> AbstractRuleBase.java // line 265 surrounded by try / catch
> this.config = (RuleBaseConfiguration) droolsStream.readObject();
>
> RuleBaseConfiguration.java // - line 985 surround by try / catch
> this.classLoader = ClassLoaderUtil.getClassLoader
>
> RuleBaseConfiguration.java // line 395 surround by try / catch
> this.chainedProperties = new ChainedProperties( "rulebase.conf",
>
> RuleBaseConfiguration.java // line 457 surround by try / catch,
> default Conflict Resolver
> setConflictResolver( determineConflictResolver(
> this.chainedProperties.getProperty( "drools.conflictResolver",
>
> * Drools Util *
>
> ChainedProperties.java // line 98 - exception check around
> ClassLoader.getSystemClassLoader();
>
> ChainedProperties.java // line 125 - exception check around
> ClassLoader.getSystemClassLoader();
>
> ChainedProperties.java // line 160
> - null check for properties /key and return default
>
> ChainedProperties.java // line 240 - surround by try / catch for
> securityaccessexception
> if ( file != null && file.exists() ) {
>
> ChainedProperties.java // line 270 - surround by try / catch for
> securityaccessexception
> if ( file != null && file.exists() ) {
>
> ClassFieldInspector.java // line 166 -
> return "/" + clazz.getCanonicalName() + ".class";
>
> ClassLoaderUtil.java // line 25 - surround by try / catch for
> securityaccessexception
> ClassLoader systemClassLoader =
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/42248168/...
>
> ------------------------------
>
> Message: 2
> Date: Mon, 17 Jan 2011 19:32:15 +0000
> From: Mark Proctor <mproctor(a)codehaus.org>
> Subject: Re: [rules-dev] Drools running in Google App Engine - list of
> changes made to code
> To: rules-dev(a)lists.jboss.org
> Message-ID: <4D34993F.7070102(a)codehaus.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On 17/01/2011 19:25, Paul Browne wrote:
> > Folks,
> >
> > A little bit later than expected (!) I've managed to get Drools
> > running within Google App Engine.
> I thought App Engine wouldn't work with runtime generated bytecode and
> had classloader restrictions?
>
> Mark
> >
> > A list of the changes that I made to the Drools Core and Drools Util
> > code are below. A lot of these changes are NullPointer checks when
> > reading properties from a file (i.e. things that you might want in the
> > codebase anyway).
> >
> > Notes on the sample I used to try this out are at
> >
> http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine
> > The sample (for the moment) is running a pre-built KnowledgeBase
> > within GAE (i.e. no rule compilation, nor any of the advanced features).
> >
> > What is the best way of submitting the actual code changes for review
> > and possible inclusion as part of the Drools source code?
> A patch against trunk attached to a jira should suffice, don't forget
> we've moved to GIT.
>
> Mark
> >
> > Thanks
> >
> > Paul
> >
> > *Drools Core *
> >
> > AbstractRuleBase.java// line 265 surrounded by try / catch
> >
> > this.config= (RuleBaseConfiguration) droolsStream.readObject();
> > RuleBaseConfiguration.java// - line 985 surround by try / catch
> >
> > this.classLoader= ClassLoaderUtil.getClassLoader
> > RuleBaseConfiguration.java// line 395 surround by try / catch
> >
> > this.chainedProperties= new ChainedProperties( "rulebase.conf",
> > RuleBaseConfiguration.java// line 457 surround by try / catch, default
> Conflict Resolver
> >
> > setConflictResolver( determineConflictResolver(
> this.chainedProperties.getProperty( "drools.conflictResolver",
> >
> > *Drools Util *
> >
> > ChainedProperties.java// line 98 - exception check around
> ClassLoader.getSystemClassLoader();
> > ChainedProperties.java// line 125 - exception check around
> ClassLoader.getSystemClassLoader();
> > ChainedProperties.java// line 160
> > - null checkfor properties/keyand return default
> > ChainedProperties.java// line 240 - surround by try / catch for
> securityaccessexception
> >
> > if ( file!= null && file.exists() ) {
> > ChainedProperties.java// line 270 - surround by try / catch for
> securityaccessexception
> >
> > if ( file!= null && file.exists() ) {
> > ClassFieldInspector.java// line 166 -
> > return "/" + clazz.getCanonicalName() + ".class";
> > ClassLoaderUtil.java// line 25 - surround by try / catch for
> securityaccessexception
> >
> > ClassLoader systemClassLoader=
> >
> >
> > _______________________________________________
> > rules-dev mailing list
> > rules-dev(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-dev
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/fca45461/...
>
> ------------------------------
>
> Message: 3
> Date: Mon, 17 Jan 2011 17:33:57 -0300
> From: Mauricio Salatino <salaboy(a)gmail.com>
> Subject: Re: [rules-dev] Drools running in Google App Engine - list of
> changes made to code
> To: Rules Dev List <rules-dev(a)lists.jboss.org>
> Message-ID:
> <AANLkTi=e3wPiKAtGrDbe+p10KqxT-M-8DiKU4XYnLJ0e(a)mail.gmail.com<e3wPiKAtGrDbe%2Bp10KqxT-M-8DiKU4XYnLJ0e(a)mail.gmail.com>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> That sounds really nice!
> Can you mention the features that you get working? which are left out?
>
>
> On Mon, Jan 17, 2011 at 4:32 PM, Mark Proctor <mproctor(a)codehaus.org>
> wrote:
>
> > On 17/01/2011 19:25, Paul Browne wrote:
> >
> > Folks,
> >
> > A little bit later than expected (!) I've managed to get Drools running
> > within Google App Engine.
> >
> > I thought App Engine wouldn't work with runtime generated bytecode and
> had
> > classloader restrictions?
> >
> > Mark
> >
> >
> > A list of the changes that I made to the Drools Core and Drools Util code
> > are below. A lot of these changes are NullPointer checks when reading
> > properties from a file (i.e. things that you might want in the codebase
> > anyway).
> >
> > Notes on the sample I used to try this out are at
> >
> http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine
> > The sample (for the moment) is running a pre-built KnowledgeBase within
> GAE
> > (i.e. no rule compilation, nor any of the advanced features).
> >
> > What is the best way of submitting the actual code changes for review and
> > possible inclusion as part of the Drools source code?
> >
> > A patch against trunk attached to a jira should suffice, don't forget
> we've
> > moved to GIT.
> >
> > Mark
> >
> >
> > Thanks
> >
> > Paul
> >
> > * Drools Core *
> >
> > AbstractRuleBase.java // line 265 surrounded by try / catch
> >
> > this.config = (RuleBaseConfiguration) droolsStream.readObject();
> >
> > RuleBaseConfiguration.java // - line 985 surround by try / catch
> >
> > this.classLoader = ClassLoaderUtil.getClassLoader
> >
> > RuleBaseConfiguration.java // line 395 surround by try / catch
> >
> > this.chainedProperties = new ChainedProperties( "rulebase.conf",
> >
> > RuleBaseConfiguration.java // line 457 surround by try / catch, default
> Conflict Resolver
> >
> > setConflictResolver( determineConflictResolver(
> this.chainedProperties.getProperty( "drools.conflictResolver",
> >
> > * Drools Util *
> >
> > ChainedProperties.java // line 98 - exception check around
> ClassLoader.getSystemClassLoader();
> >
> > ChainedProperties.java // line 125 - exception check around
> ClassLoader.getSystemClassLoader();
> >
> > ChainedProperties.java // line 160
> > - null check for properties /key and return default
> >
> > ChainedProperties.java // line 240 - surround by try / catch for
> securityaccessexception
> >
> > if ( file != null && file.exists() ) {
> >
> > ChainedProperties.java // line 270 - surround by try / catch for
> securityaccessexception
> >
> > if ( file != null && file.exists() ) {
> >
> > ClassFieldInspector.java // line 166 -
> > return "/" + clazz.getCanonicalName() + ".class";
> >
> > ClassLoaderUtil.java // line 25 - surround by try / catch for
> securityaccessexception
> >
> > ClassLoader systemClassLoader =
> >
> >
> >
> > _______________________________________________
> > rules-dev mailing listrules-dev@lists.jboss.orghttps://
> lists.jboss.org/mailman/listinfo/rules-dev
> >
> >
> >
> > _______________________________________________
> > rules-dev mailing list
> > rules-dev(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-dev
> >
> >
>
>
> --
> - CTO @ http://www.plugtree.com
> - MyJourney @ http://salaboy.wordpress.com
> - Co-Founder @ http://www.jbug.com.ar
>
> - Salatino "Salaboy" Mauricio -
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/5b76097b/...
>
> ------------------------------
>
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
> End of rules-dev Digest, Vol 49, Issue 11
> *****************************************
>
13 years, 11 months
expert documentation update
by Wolfgang Laun
Recent changes and additions to decision tables and DSL are now fully
documented.
However.
The previous version of the DSL documention had some references to
functionality provided by the IDE and/or BRMS. These texts were not very
clear and (I think) far from being comprehensive. This needs to be
rewritten, but I'm not knowledgeable enough to do that.
Cheers
Wolfgang
13 years, 11 months