Drools integration with Mysql
by Nilima R
Hello All ,
I need to integrate Mysql with Drools
1)I have made the following changes in the repositry..xml file
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
<param name="url"
value="jdbc:mysql://localhost.:3306/guvnor_db;create=true"/>
<param name="user" value="root"/>
<param name="password" value="root123"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
2)Also i have included mysqlconnector jar in jboss AS .
Please help with above steps as am not able to connect to mysql.No tables
are created in guvnor_db.
Nilima
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
14 years, 9 months
Problem with date
by Bertrand Grottier
Dear all,
I am a newbie with Drools (Drools 5). I just want to make a date comparison but failed until now. Here is my drl file :
package com.sample
import com.sample.DroolsTest.Produit;
rule "Prix premier semestre"
when
p1 : Produit( dDeb < "01-Jan-2010" )
then
p1.setPrix( 10 );
update( p1 );
end
I get a build error in Eclipse : Unable to create restriction.
This must be an obvious problem but I am struggling for a while now.
Any help would be appreciated.
Benoit
_________________________________________________________________
Hotmail et MSN dans la poche? HOTMAIL et MSN sont dispo gratuitement sur votre téléphone!
http://www.messengersurvotremobile.com/?d=Hotmail
14 years, 9 months
SAP JCO (Drools)
by Young Matthew (4004)
Searched the mail archives....
About using Drools with SAP via JCO (similar to how SAP connects to
RuleBurst) without finding any information. Just wants to pool the
mailing list again to see if there are any active Drools/SAP users and
their experience writing a JCO package for DRools.
thanks / matthew
14 years, 9 months
How to traverse the Collection by index
by dhari
Hi all,
I want to compare all elements in the collection with other element of the
same collection. In my case I have collection of Segment, a Segment contains
startDate and endDate. The whole collection of Segment should consists on
complete calendar year and every segment in the list must start 1+ from the
endDate of last element. Valid fact should be:
MemberShip
Segment 1: StartDate: 01-01-2010 EndDate: 30-05-2010
Segment 2: StartDate: 31-05-2010 EndDate: 08-08-2010
Segment 3: StartDate 09-08-2010 EndDate: 31-12-2010
Data structure
class Segment{
java.util.Date startDate;
java.util.Date endDate;
}
class Membership{
java.util.ArrayList<Segment> segments;
}
I know the date functions. I just want to know how can I traverse the List
from get element on Index and Index+1?
--
View this message in context: http://n3.nabble.com/How-to-traverse-the-Collection-by-index-tp435000p435...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 9 months
How to traverse the Collection by index
by dhari
Hi all,
I want to compare all elements in the collection with other element of the
same collection. In my case I have collection of Segment, a Segment contains
startDate and endDate. The whole collection of Segment should consists on
complete calendar year and every segment in the list must start 1+ from the
endDate of last element. Valid fact should be:
MemberShip
Segment 1: StartDate: 01-01-2010 EndDate: 30-05-2010
Segment 2: StartDate: 31-05-2010 EndDate: 08-08-2010
Segment 3: StartDate 09-08-2010 EndDate: 31-12-1020
Data structure
class Segment{
java.util.Date startDate;
java.util.Date endDate;
}
class Membership{
java.util.ArrayList<Segment> segments;
}
I know the date functions. I just want to know how can I traverse the List
from get element on Index and Index+1?
--
View this message in context: http://n3.nabble.com/How-to-traverse-the-Collection-by-index-tp434756p434...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 9 months
Task Server gives error cannot use getTransaction()
by Todd Pagni
When I configure the Task Server(org.drools.task) to be JTA I get the
following error when adding a Human Task work item. Is the following
Persistence Unit configuration valid? It works when the org.drools.task
trans type is set to LOCAL_RESOURCE.
Using drools 5.1.0.M1 in JBoss 5.1
<?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.persistence.jpa"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/processInstanceDS</jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<class>org.drools.persistence.session.SessionInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceInfo</class
>
<class>org.drools.persistence.processinstance.WorkItemInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.JPAPersisted
Variable</class>
<class>org.drools.persistence.processinstance.variabletypes.VariableInst
anceInfo</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.SQLServerDialect" />
<property name="hibernate.max_fetch_depth" value="3"
/>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update"
/>
<property name="hibernate.connection.release_mode"
value="auto" />
<property
name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property
name="jboss.entity.manager.factory.jndi.name"
value="java:/WorkflowServerPU" />
</properties>
</persistence-unit>
<persistence-unit name="org.drools.task" transaction-type="
RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/processInstanceDS</jta-data-source>
<mapping-file>META-INF/taskorm.xml</mapping-file>
<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.max_fetch_depth" value="3"
/>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update"
/>
<property name="hibernate.connection.release_mode"
value="auto" />
<property
name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property
name="jboss.entity.manager.factory.jndi.name"
value="java:/WorkflowServerPU" />
</properties>
</persistence-unit>
</persistence>
10:48:22,887 INFO [STDOUT] Hibernate: update WorkItemInfo set
creationDate=?, name=?, processInstanceId=?, state=?, OPTLOCK=?,
workItemByteArray=? where workItemId=? and OPTLOCK=?
10:48:22,887 INFO [STDOUT] [2010:01:20 10:01:887:debug] Message
receieved on server : AddTaskRequest
10:48:22,887 INFO [STDOUT] [2010:01:20 10:01:887:debug] Arguments :
[org.drools.task.Task@537c3c9e,
org.drools.task.service.ContentData@b2a90]
10:48:22,887 INFO [STDOUT] [2010:01:20 10:01:887:exception] A JTA
EntityManager cannot use getTransaction()
10:48:22,887 INFO [STDOUT] java.lang.IllegalStateException: A JTA
EntityManager cannot use getTransaction()
10:48:22,887 INFO [STDOUT] at
org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntit
yManagerImpl.java:324)
10:48:22,887 INFO [STDOUT] at
org.drools.task.service.TaskServiceSession.doOperationInTransaction(Task
ServiceSession.java:676)
10:48:22,887 INFO [STDOUT] at
org.drools.task.service.TaskServiceSession.addTask(TaskServiceSession.ja
va:118)
10:48:22,887 INFO [STDOUT] at
org.drools.task.service.TaskServerHandler.messageReceived(TaskServerHand
ler.java:88)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.message
Received(DefaultIoFilterChain.java:752)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defaul
tIoFilterChain.java:49)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messag
eReceived(DefaultIoFilterChain.java:832)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputIm
pl.flush(ProtocolCodecFilter.java:379)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Protoco
lCodecFilter.java:173)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defaul
tIoFilterChain.java:49)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messag
eReceived(DefaultIoFilterChain.java:832)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilt
er.java:95)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defaul
tIoFilterChain.java:49)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messag
eReceived(DefaultIoFilterChain.java:832)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$HeadFilter.message
Received(DefaultIoFilterChain.java:616)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceive
d(DefaultIoFilterChain.java:408)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPol
lingIoProcessor.java:578)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstract
PollingIoProcessor.java:540)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstract
PollingIoProcessor.java:532)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(Abstr
actPollingIoProcessor.java:58)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(Abstr
actPollingIoProcessor.java:857)
10:48:22,887 INFO [STDOUT] at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.j
ava:51)
10:48:22,887 INFO [STDOUT] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:651)
10:48:22,887 INFO [STDOUT] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:676)
10:48:22,887 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
10:48:22,887 ERROR [STDERR] java.lang.IllegalStateException: A JTA
EntityManager cannot use getTransaction()
10:48:22,887 ERROR [STDERR] at
org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntit
yManagerImpl.java:324)
10:48:22,887 ERROR [STDERR] at
org.drools.task.service.TaskServiceSession.doOperationInTransaction(Task
ServiceSession.java:676)
10:48:22,887 ERROR [STDERR] at
org.drools.task.service.TaskServiceSession.addTask(TaskServiceSession.ja
va:118)
10:48:22,887 ERROR [STDERR] at
org.drools.task.service.TaskServerHandler.messageReceived(TaskServerHand
ler.java:88)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.message
Received(DefaultIoFilterChain.java:752)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defaul
tIoFilterChain.java:49)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messag
eReceived(DefaultIoFilterChain.java:832)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputIm
pl.flush(ProtocolCodecFilter.java:379)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Protoco
lCodecFilter.java:173)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defaul
tIoFilterChain.java:49)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messag
eReceived(DefaultIoFilterChain.java:832)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilt
er.java:95)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(Defaul
tIoFilterChain.java:49)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messag
eReceived(DefaultIoFilterChain.java:832)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$HeadFilter.message
Received(DefaultIoFilterChain.java:616)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageRec
eived(DefaultIoFilterChain.java:414)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceive
d(DefaultIoFilterChain.java:408)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPol
lingIoProcessor.java:578)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstract
PollingIoProcessor.java:540)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstract
PollingIoProcessor.java:532)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(Abstr
actPollingIoProcessor.java:58)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(Abstr
actPollingIoProcessor.java:857)
10:48:22,887 ERROR [STDERR] at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.j
ava:51)
10:48:22,887 ERROR [STDERR] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:651)
10:48:22,887 ERROR [STDERR] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:676)
10:48:22,887 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
10:48:22,903 INFO [LoggingFilter] SENT: HeapBuffer[pos=0 lim=2200
cap=4096: 00 00 08 94 AC ED 00 05 73 72 01 00 1F 6F 72 67...]
10:48:22,903 INFO [LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0:
empty]
10:48:22,903 INFO [STDOUT] [2010:01:20 10:01:903:debug] Message
receieved on client : AddTaskResponse
10:48:22,903 INFO [STDOUT] [2010:01:20 10:01:903:debug] Arguments :
[java.lang.IllegalStateExcep
14 years, 9 months
Re: [rules-users] Spring jars for Drools 5.0
by Agrawal, Swapnil
Thanks Kiran
I will check the feasibility of moving to spring 2.5.*
Thanks
Swapnil Agrawal
cell: 201 616 1189
desk: 212 816 7024
Message: 2
Date: Thu, 4 Mar 2010 21:30:08 -0800 (PST)
From: KiranP <phadatarekiran(a)gmail.com>
Subject: Re: [rules-users] Spring jars for Drools 5.0
To: rules-users(a)lists.jboss.org
Message-ID: <1267767008271-429965.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
hi swapnil,
i m still new to drools but just can tell u that drools 5.0 works fine with
Spring 2.5.3 and 2.5.6
regards
kiranP
--
View this message in context: http://n3.nabble.com/Spring-jars-for-Drools-5-0-tp429248p429965.html
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 9 months