Best practices to hand over from dev to business
by djb
Hi,
So I've worked with Drools v5 on a few projects, and made the move to v6
yesterday.
My programs typically have a model of pojos, plus some service utilities
that do the stuff that's easier in Java than in Drools.
I have implemented the system with DRLs and agenda groups, and one of the
next steps is to hand over to business. My comments will allow a junior
developer to maintain the program, but you'd be surprised how non-technical
the business users can be. They won't touch code.
So I'm hoping that Workbench will be what I need to facilitate the
transition. With Drools 6, I've separated my web app from the DRL files,
which now reside in their own mavenized Jar.
Deployment is also very manual at the moment. Run mvn install, ftp war to
server, drop in Jboss.
So step 1 is probably to load the model and drl files into WB. Should a
kiesession jar have pojos too? Only the parts you want to manage in WB?
Then I presume that the main goal of WB is to provide a graphical ui to
maintain rules, with business users messing around in their sandbox, making
new snapshot versions of the rules jar?
Then i change the web app's dependency to the new snapshot, rebuild and
redeploy?
What is the best scenario, to allow business users a UI and myself a simple
deployment mechanism when business users want to test their changes, that i
can hope to achieve with Drools and it's Uberfire parts?
--
View this message in context: http://drools.46999.n3.nabble.com/Best-practices-to-hand-over-from-dev-to...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Drools 6 Unable to load pom.properties
by djb
Hi guys,
Drools 5 was so nice. I am struggling with 6. (6.0.1-Final)
So I've made a Maven project, ctCharges-0.1-SNAPSHOT, to contain my rules,
and it's basically the same as the named-kiesession example, without any
java files in it. Same kmodule.xml, just my own parentless maven group
instead of org.drools.
I add the dependency to my main project, but when I try this:
KieServices kServices = KieServices.Factory.get();
KieContainer kContainer = kServices.getKieClasspathContainer();
KieSession ksession = kContainer.newKieSession("ksession1");
it gets this:
Found kmodule:
vfs:/C:/jboss-eap/standalone/deployments/iconRules6.war/WEB-INF/lib/ctCharges-0.1-SNAPSHOT.jar/META-INF/kmodule.xml
Virtual file physical path =
C:\jboss-eap\standalone\tmp\vfs\deployment\deployment59bc0232401e9992\ctCharges-0.1-SNAPSHOT.jar-2808edf3c95bef92\ctCharges-0.1-SNAPSHOT.jar
*Unable to load pom.properties*
from\jboss-eap\standalone\tmp\vfs\deployment\deployment59bc0232401e9992\ctCharges-0.1-SNAPSHOT.jar-2808edf3c95bef92\ctCharges-0.1-SNAPSHOT.jar
null
(And then repeats this error couple of times)
If I look in the jar, I see:
META-INF/maven/com.mycompany/myArtifactName/pom.xml and pom.properties
What is going on?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-Unable-to-load-pom-properties-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
External Jar/Pojo in Drools Workbench.
by Leonard93
Hello everyone, I have a small question/problem.
I have created a class (POJO) in Eclipse and I want to be able to write
rules over this class in the Drools Workbench, thus I exported the class and
the classes it depends on (1 other class) to a Jar and imported it in the
Drools workbench.
Now what I did next is I added the jar dependency to my workbench project,
created a new datamodel and set its super class to the external class from
the jar and left the rest empty.
When I then try to use this datamodel in a guided rule or anything I can
access the variables defined in the external class fine when using the rule
editor. But when I save I get various compiler errors.
Currently I tried to make a rule template and I got these errors (I am using
the standard example project to test it out):
Unable to create Field Extractor for *'Destination'Field/method
'destination'* not found for class '*org.mortgages.Test' *
Unable to Analyse Expression *Destination ==
GenericDataObject$Country.Germany*: [Error: unable to resolve method using
strict-mode: *org.mortgages.Test.GenericDataObject$Country()]* [Near : {...*
Destination == GenericDataObject$Country.Germ ....}]* ^ [Line: 9, Column: 2]
The class from the jar looks like this:
public class GenericDataObject {
public enum Country
{
Egypt,
Germany,
Turkey,
France,
Unknown
}
public GenericDataObject()
{
result = new Result();
}
public Result result;
public Country Destination;
public void setDiscount(int amount)
{
result.discount = amount;
}
}
public class Result
{
public int discount;
public Result()
{
discount = 0;
}
}
--
View this message in context: http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
kie-wb 6.0.2 Deployment error on WAS 8.5.5
by Shrinath Managuli
Hi,
Deployment on WAS 8.5.5 gives the following error:
com.ibm.ws.exception.RuntimeWarning: Error while processing references for
EJB-in-WAR: com.ibm.ejs.container.EJBConfigurationException: The
KieSessionRequesMessageBean message-driven bean (MDB) class does not define a
message listener interface.
Thanks,
Shrinath
[Aspire Systems]
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
11 years, 9 months
kie-workbench 6.0.2 on WAS 8.5.5 for developers(error in deployment)
by Shrinath Managuli
Hi,
I'm trying to deploy kie-wb 6.0.2 on WAS 8.5.5 for Developers version. Please guide me through this...
I'got the following stack trace:
SystemErr.log:
[9/4/14 17:21:56:982 IST] 0000004a SystemErr R SLF4J: Class path contains multiple SLF4J bindings.
[9/4/14 17:21:56:982 IST] 0000004a SystemErr R SLF4J: Found binding in [wsjar:file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/appNode01Cell/kie-wb-distribution-wars-6_0_2-20140401_190816-123-was8_war.ear/kie-wb-distribution-wars-6.0.2-20140401.190816-123-was8.war/WEB-INF/lib/slf4j-jdk14-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:21:56:983 IST] 0000004a SystemErr R SLF4J: Found binding in [bundleresource://267.fwk1016322233:1/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:21:56:983 IST] 0000004a SystemErr R SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[9/4/14 17:21:56:984 IST] 0000004a SystemErr R SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
[9/4/14 17:23:43:702 IST] 00000081 SystemErr R 122 [WebContainer : 3] INFO org.apache.bval.jsr303.ConfigurationImpl - ignoreXmlConfiguration == true
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: Class path contains multiple SLF4J bindings.
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: Found binding in [wsjar:file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/app934Node01Cell/kie-wb-distribution-wars-6_0_2-20140401_190816-123-was8_war.ear/kie-wb-distribution-wars-6.0.2-20140401.190816-123-was8.war/WEB-INF/lib/slf4j-jdk14-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: Found binding in [bundleresource://267.fwk1016322233:1/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[9/4/14 17:23:44:058 IST] 00000081 SystemErr R SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
[9/4/14 17:23:56:207 IST] 00000081 SystemErr R com.ibm.ws.exception.RuntimeWarning: Error while processing references for EJB-in-WAR: com.ibm.ejs.container.EJBConfigurationException: The KieSessionRequesMessageBean message-driven bean (MDB) class does not define a message listener interface.
SystemOut.log:
ERROR hbm2ddl.SchemaUpdate: HHH000299: Could not complete schema update
java.lang.NullPointerException
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:156)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:70)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:63)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:196)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178)
mbean exception: com.ibm.ws.exception.RuntimeWarning: Error while processing references for EJB-in-WAR: com.ibm.ejs.container.EJBConfigurationException: The KieSessionRequesMessageBean message-driven bean (MDB) class does not define a message listener interface.
[Aspire Systems]
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
11 years, 9 months
Identical Facts over rules, results being cached?
by Leonard93
Let's say I have 10 rules and I fire the same object over it multiple times.
This means the result that I would get back is the same every time, since it
is the same object over the same rules (In a stateless environment).
Does Drools cache the result internally for such cases? Knowing that when
the same object comes over the same rules it can give the result back right
away instead of going over the rules first.
Just something I want to know and couldn't really find in the documentation
easily.
--
View this message in context: http://drools.46999.n3.nabble.com/Identical-Facts-over-rules-results-bein...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
processing a database with many to many Relationships
by Dave Potts
Most of the drools examples that I seen, will for have an example that
process address, look for address with a given post/zip code etc on a
data source that is already loaded in the knowledge session, but it
include no description of how the data was loaded in the knowledge session.
I have a reference database of trading containers , the database
describes the source, destination, contents etc, relationships between
for example a container may have have many sources and many
destinations. Destinations and sources may be shared between different
containers.
The database is normalised to keep source/destination information as a
single place table, with link tables to define the relationship between
the different containers and places
Q. What is the best way of loading my information in to a knowledge
session?
Expand all the many to many relationship in to a single pojo objects
with multiple references to other pojos or is there a better way?
source destination
eg Container foo England,
England
England
France
England
Scotland
France
England
bar England
Germany
England
France
regards
Dave.
/*
*/
11 years, 9 months