Updating to 5.1 - what jars do I need to replace?
by Stephen Mcgruer
Hi guys,
Really struggling with what jars I need to replace to update to Drools
5.1. I've tried replacing just the "drools" jars, but I get a
"java.io.InvalidClassException:
org.drools.rule.DialectRuntimeRegistry; local class incompatible:
stream classdesc serialVersionUID = 5308493362083281112, local class
serialVersionUID = 510" error, so I assume I need to replace more -
but I don't know which. I tried replacing all of the ones that had new
versions in the drools 5.1 binaries, but this caused Hibernate to fail
on runtime, claiming it couldnt understand annotations! The following
is a list of the jars currently in the project for Drools 5.0 - I did
not put together this list originally, so some might not be needed but
I dont know which. I would much appreciate some help working out which
jars I need to change to get my code to talk to Guvnor 5.1...
Main lib:
activation-1.1.jar
antlr-2.7.6.jar
antlrworks-1.3.1.jar
btm-1.3.2.jar
com.springsource.org.apache.commons.pool-1.5.3.jar
commons-collections-3.1.jar
commons-dbcp-1.4.jar
commons-io-1.3.2.jar
commons-lang-2.4.jar
commons-logging.jar
core-3.4.2.v_883_R34x.jar
dom4j.jar
drools-ant-5.0.1.jar
drools-api-5.0.1.jar
drools-compiler-5.0.1.jar
drools-core-5.0.1.jar
drools-decisiontables-5.0.1.jar
drools-persistence-jpa-5.0.1.jar
drools-process-task-5.0.1.jar
drools-solver-core-5.0.1.jar
drools-templates-5.0.1.jar
drools-verifier-5.0.1.jar
drools-workitems-5.0.1.jar
ejb3-persistence.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-core.jar
hibernate-entitymanager-3.3.2.GA.jar
hibernate3.jar
janino-2.5.15.jar
jars.txt
javassist-3.9.0.GA.jar
joda-time-1.6.jar
jstl.jar
jta-1.1.jar
junit-3.8.1.jar
log4j-1.2.15.jar
mail-1.4.jar
mvel2-2.0.10.jar
mysql-connector-java-5.1.12-bin.jar
persistence-api-1.0.jar
servlet-api-2.3.jar
slf4j-api-1.5.6.jar
slf4j-log4j12-1.5.10.jar
spring-2.5.6.jar
spring-beans-2.5.6.jar
spring-context-2.5.6.jar
spring-context-support-2.5.6.jar
spring-core-2.5.6.jar
spring-test-2.5.6.jar
spring-web-2.5.6.jar
spring-webmvc.jar
spring.jar
standard.jar
xpp3_min-1.1.4c.jar
xstream-1.3.1.jar
WEBINF:
antlr-2.7.6.jar
antlrworks-1.3.1.jar
com.springsource.org.apache.commons.pool-1.5.3.jar
commons-collections-3.1.jar
commons-dbcp-1.4.jar
commons-lang-2.4.jar
commons-logging.jar
dom4j.jar
drools-ant-5.0.1.jar
drools-api-5.0.1.jar
drools-compiler-5.0.1.jar
drools-core-5.0.1.jar
drools-decisiontables-5.0.1.jar
drools-persistence-jpa-5.0.1.jar
drools-process-task-5.0.1.jar
drools-templates-5.0.1.jar
drools-verifier-5.0.1.jar
drools-workitems-5.0.1.jar
ejb3-persistence.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-core.jar
hibernate3.jar
javassist-3.9.0.GA.jar
jstl.jar
jta-1.1.jar
log4j-1.2.15.jar
mvel2-2.0.10.jar
mysql-connector-java-5.1.12-bin.jar
slf4j-api-1.5.6.jar
slf4j-log4j12-1.5.10.jar
spring-webmvc.jar
spring.jar
standard.jar
test.txt
xstream-1.3.1.jar
Cheers,
Stephen
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
12 years, 7 months
Is this a bug? when using Human Task.
by XiaoMiTang
When use the Human Task,some tables were created in DB automatic,but one SQL
statement occured error is this:
create table Notification_EmailNotificationHeader
(
Notification_id numeric(19,0) not null,
emailHeaders_id numeric(19,0) not null,
mapkey varchar(255) null,
primary key (Notification_id, mapkey),
unique (emailHeaders_id)
)
the mapkey is nullable,can not be defined as primary key~
Is this a bug? or something wrong with my development enviroment?
Eclipse + tomcat + MS SQL Server2008
Mina 2.0(hibernate-core-3.3.0.SP1.jar)
persistence.xml is this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence
version="1.0"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.drools.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.drools.task.Attachment</class>
<class>org.drools.task.Content</class>
<class>org.drools.task.BooleanExpression</class>
<class>org.drools.task.Comment</class>
<class>org.drools.task.Deadline</class>
<class>org.drools.task.Comment</class>
<class>org.drools.task.Deadline</class>
<class>org.drools.task.Delegation</class>
<class>org.drools.task.Escalation</class>
<class>org.drools.task.Group</class>
<class>org.drools.task.I18NText</class>
<class>org.drools.task.Notification</class>
<class>org.drools.task.EmailNotification</class>
<class>org.drools.task.EmailNotificationHeader</class>
<class>org.drools.task.PeopleAssignments</class>
<class>org.drools.task.Reassignment</class>
<class>org.drools.task.Status</class>
<class>org.drools.task.Task</class>
<class>org.drools.task.TaskData</class>
<class>org.drools.task.SubTasksStrategy</class>
<class>org.drools.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.drools.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.drools.task.User</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.SQLServerDialect"/>
<property name="hibernate.connection.driver_class"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="hibernate.connection.url"
value="jdbc:sqlserver://192.168.101.91:1433;DatabaseName=BinTest" />
<property name="hibernate.connection.username" value="sa"/>
<property name="hibernate.connection.password" value="sa"/>
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="true" />
</properties>
</persistence-unit>
</persistence>
Can anyone help?
XiaoMiTang
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Is-this-a-bug-when-us...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 7 months
How to use Drools Flow?
by XiaoMiTang
Hi, I am tring to use Drools Flow in a B/S project,but get in trouble.
a simple ruleflow.rf file like this:
===Start====
Start------>Action----->Email----->End
====End==
User A log in the system by a browser,press a button,execute the code below:
================
StatefulKnowledgeSession session = …………
session.startProcess("com.sample.ruleflow");
================
it works ok. the "Action" has been done,the Email has been sent, the whole
of flow was finished.
the problem is how to do with the .rf file like this?
==========
Start--->Action1(need user A to do it)---->Action2(need user B to do
it)-->Email-->End
==========
Can anyone please give me an idea ?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flo...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 7 months
Size of working memory
by Nick Heudecker
I'm working on some capacity planning and I need an accurate way to
determine the size of the working memory. Any suggestions on getting
visibility into the size of the WM?
Thanks.
12 years, 7 months
Reusing Rules in a Rule Flow?
by Jason Davidson
Is it possible to use a rule in a rule flow without a "ruleflow-group"?
Here's our use case: We have a base set of rules that are not part of
a ruleflow-group. But we want to allow the administrators of the
system to build custom rule flows that reuse these existing base
rules. In most instances the "base" rules will be fired but in some
instances the ruleflow will be executed too.
What's the best way to reuse a rule in this case?
Thanks!
Jason
12 years, 7 months
Decision table creation query
by Kripa Nathwani
Hello Admin,
I am new to Drools.
Kindly let me know the steps to create a decision table in Drools Guvnor.
Best Regards,
Kripa
Mail: Kripa.Nathwani(a)lntinfotech.com<mailto:Biswajit.Sahoo@lntinfotech.com>
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
12 years, 7 months
Not able to create object in [then] clause in DSL using Guvnor
by bbarani
Hi,
I am trying to execute a simple DSL as below. Decisions is the bean class
which I have imported in to Guvnor
[when] IMRR action requested is in one of {acts} = Action(action in {acts})
[then] permitted =dec:Decisions dec.setDecision("Granted")
Now I want the object for decision to be created and the value set in a
single mapping. I tried the above code and got the error as below.
[NamedParameterRule] Unable to build expression for 'consequence':
java.lang.Class cannot be cast to org.mvel2.util.MethodStub '
System.out.println("Rule Fired From Guvnor");
dec: Decisions () dec.setDecision("Granted")'
If I create the object in [when] clause it works fine. Any idea when this
error would pop up?? and how to resolve this?
Thanks,
Barani
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Not-able-to-create-ob...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 7 months
fireAllRules() - multiply times.
by Maverickthe6
Hey!
I'm new to drools-expert and try to modell the following situation:
- I have a ruleflow
- I want to collect data and all few seconds (like 10 seconds), I want to
execute fireAllRules(). (Called by a timer).
FireUntilHalt() is not an option, and in the situation above the following
"problem" arises:
I lost some facts, because in a new fireAllRules() run, some of these facts
wasn't touched anymore and therefore didn't set on the agenda once more. So
they will be only regarded in the first fireAllRules() run... But - of
course - I want the facts to be regarded once more in later turns. At the
moment, I update the facts (as last rule that fires) per ruleflow-group,
even if they haven't had been modified. This is..ehm.. not so nice ;) (but
helps..), and the question is now: what is the state-of-the-art to model
this?
And a question that comes along is, how can I design a rule, that has no
condition at the LHS and will be executed each time I call fireAllRules().
Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-multiply...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 7 months
Invocation Patterns
by Kenneth May
I am new to Drools, but am an experienced programmer. I was hoping
somebody with some Drools Flow experience could advise on a good
approach for dealing with the following requirements:
1) A large number of XML files are received: perhaps one every few
seconds (or more frequently). Each time a file is received I want to
process these according to a pre-defined business process. For
example:
- Calling a web service using some data contained in the file to do a
calculation
- Writing to a database
- Copying the file to another directory
- Sending an email
- Logging progress
NB Some of the logic in the flow may vary depending on data within the
file which is being processed.
2) The business process may vary slightly depending on the nature of
the file being received. For example I have four file types: A,B,C
&D. I’d want to invoke 4 slightly different processes. Each of these
may have slight variations depending on the contents of the file.
3) The business processes may be changed occasionally, but usually not
drastically. This doesn’t need to be done dynamically.
I already have code which monitors a folder for new files. With
drools, I’m just not sure what the best pattern is for how to deal
with this in an efficient manner. I was thinking:
Each time a file is received:
- Do an initial parse to determine which business process to invoke,
each of these would be built as a separate drools flow
- Construct the knowledgebase, session etc
- Start the relevant flow
I’m pretty sure this isn’t the easiest or most efficient approach
though! Any thoughts?
Thanks,
Ken
12 years, 7 months