Hi,
Are you suggesting to maintain a list of B values in A?
Like A { list<B>();}
// inside my A
And then to populate the list and iterate through that list??
Is that not too much extra data storing?
Thanks
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of rules-users-request(a)lists.jboss.org
Sent: Wednesday, June 16, 2010 8:31 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 90
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: deleting records using rules (Esteban Aliverti)
----------------------------------------------------------------------
Message: 1
Date: Wed, 16 Jun 2010 09:30:37 -0300
From: Esteban Aliverti <esteban.aliverti(a)gmail.com>
Subject: Re: [rules-users] deleting records using rules
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTimi5kjHEazXWcgjNMXAY229l82rkPCFR8sFp8i0(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
If B has a getA() method, you could do something like this:
rule "XX"
when
$list: List(size > 0) from collect B(a.name = "x")
then
someGlobalList.addAll($list);
end
best,
On Wed, Jun 16, 2010 at 9:15 AM, Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>wrote:
Hi,
Thanks. Sorry for not being clear.
I have the following:
A = new A(); A1 = new A()
B b1 = new B(A)
B b2 = new B(A)
B b3 = new B(A1)
Each of the B above have a parameter "name"
I am setting the name in one of my rules which works properly.
I want to create an output list which:
Checks that all B objects pointing to a single A object (eg. A1 or A in
this case) have same name. If they don't I don't want to have them on my
output list.
I tried using forAll for the rule but that checks forALL B's in genral
having same A object which is not what I want.
Could you give me a starter / hint to create the rule.
I even thought that I could maybe populate a list for each A object:
When $a : A()
b : B(a : $a , name == "x")
Then
Modify($a){
setAList(b) // adding all b's to a list contained in a
};
But that does not help me achieve the second part as I cant traverse
through a list inside rules.
Any idea??
Please help.
Thanks
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:
rules-users-bounces(a)lists.jboss.org] On Behalf Of
rules-users-request(a)lists.jboss.org
Sent: Wednesday, June 16, 2010 2:22 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 84
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Flow persistence (Rob Collins)
2. Re: deleting records using rules (Wolfgang Laun)
----------------------------------------------------------------------
Message: 1
Date: Tue, 15 Jun 2010 18:55:03 -0700
From: Rob Collins <RCollins(a)patientsafesolutions.com>
Subject: Re: [rules-users] Flow persistence
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<0019F265-AA56-4104-B657-083C37AAE636(a)patientsafesolutions.com>
Content-Type: text/plain; charset="us-ascii"
You were right the first time - I am sharing the environment between
multiple sessions. That is easy for me to fix.
Can I share the EntityManagerFactory, or should I create one for each
session?
Thanks,
Rob
On Jun 15, 2010, at 9:47 PM, Mauricio Salatino wrote:
oh.. sorry.. you are creating a new env per each session.. but the problem
is related with that..
I will review that and let you know.
On Tue, Jun 15, 2010 at 9:45 PM, Mauricio Salatino <salaboy(a)gmail.com
<mailto:salaboy@gmail.com>> wrote:
yes the problem is the environment.. I saw that problem in the past..
you need to create a separate environment object per each session.
On Tue, Jun 15, 2010 at 9:41 PM, Rob Collins <
RCollins@patientsafesolutions.com<mailto:RCollins@patientsafesolutions.com>>
wrote:
The idea of the tests is to ensure that our implementation is thread-safe.
Each thread in the test creates its own Drools session and executes its own
workflow (which contains actions and work items that involve user
interaction that is simulated by the unit test).
This scenario tests the real-world case of our server handling sessions
from multiple users. There should NOT be cross-talk between these sessions.
Without persistence, everything works as expected. With persistence enabled,
two sessions running in parallel are enough to fail 100% of the time.
Each thread creates a session like this:
session =
JPAKnowledgeService.newStatefulKnowledgeSession(getKnowledgeBase(), null,
getEnvironment());
The calls to getEnvironment() return the same value each time it is called
called. Is this right?
The environment is created like this:
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
environment = KnowledgeBaseFactory.newEnvironment();
environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
Any idea where I messed up?
Thanks,
Rob
On Jun 15, 2010, at 5:58 PM, Mauricio Salatino wrote:
What kind of thread safe tests are you doing?
if multiple threads modify the status of the process, only one of them will
commit the new status, and the other ones will rollback the transaction
because of a bad state.
Is that what you are looking for?
On Tue, Jun 15, 2010 at 3:33 PM, Rob Collins <
RCollins@patientsafesolutions.com<mailto:RCollins@patientsafesolutions.com
><mailto:RCollins@patientsafesolutions.com<mailto:
RCollins(a)patientsafesolutions.com>>> wrote:
We are using version 5.1.0.M1. We have long-running processes (flows). They
are long-running because we have work item nodes that involve the user of
our application to do something. We are in the development cycle of our
product and everything is going well. I am trying to configure persistence
and running into some issues.
I am to the point where our basic unit tests appear to be running fine with
persistence enabled both in the container (tomcat6) and in our unit testing
environment (ServletUnit).
We have unit tests that run the same test in multiple threads in parallel
(the idea is to try to expose thread safety issues), and these tests always
fail. At the end of this message, I have pasted a few of the different stack
traces I have seen.
I expect that I have done something silly in the configuration, and I could
use some help in finding it. I am not sure if the problem is my
configuration of JPA, Hibernate, the DataSource, or if it is an interaction
between what Drools is expecting and the details of my configuration.
Thanks,
Rob Collins
>From my spring configuration:
<!-- Spring JtaTransactionManager -->
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager"
depends-on="bitronixTransactionManager">
<property name="transactionManager"
ref="bitronixTransactionManager"
/>
<property name="userTransaction"
ref="bitronixTransactionManager" />
</bean>
<!-- Bitronix Transaction Manager embedded configuration -->
<bean id="btmConfig"
class="bitronix.tm.TransactionManagerServices"
factory-method="getConfiguration">
<property name="serverId" value="spring-btm" />
</bean>
<!-- create Bitronix Transaction Manager transaction manager -->
<bean id="bitronixTransactionManager"
class="bitronix.tm.TransactionManagerServices"
factory-method="getTransactionManager" depends-on="btmConfig"
destroy-method="shutdown" />
<bean id="sessionDataSource"
class="bitronix.tm.resource.jdbc.PoolingDataSource"
init-method="init"
destroy-method="close">
<property name="className"
value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" />
<property name="uniqueName" value="jdbc/processInstanceDS"
/>
<property name="maxPoolSize" value="8" />
<property name="allowLocalTransactions" value="true" />
<property name="driverProperties">
<props>
<prop key="URL">${db.session.connection.url}</prop>
<prop key="user">${db.session.username}</prop>
<prop key="password">${db.session.password}</prop>
</props>
</property>
</bean>
My persistence.xml:
<?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">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/processInstanceDS</jta-data-source>
<class>org.drools.persistence.session.SessionInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceEventInfo</class>
<class>org.drools.persistence.processinstance.WorkItemInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
<properties>
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.BTMTransactionManagerLookup" />
<property name="hibernate.jndi.class"
value="bitronix.tm.jndi.BitronixInitialContextFactory" />
</properties>
</persistence-unit>
</persistence>
java.lang.NullPointerException
at
org.drools.persistence.processinstance.JPAProcessInstanceManager.addProcessInstance(JPAProcessInstanceManager.java:33)
at
org.drools.process.instance.AbstractProcessInstanceFactory.createProcessInstance(AbstractProcessInstanceFactory.java:37)
at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1706)
at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1682)
at
org.drools.workflow.instance.node.SubProcessNodeInstance.internalTrigger(SubProcessNodeInstance.java:115)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
at
org.drools.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152)
at
org.drools.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:74)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
at
org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at
org.drools.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:16)
at
org.drools.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:185)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:230)
at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1689)
at
org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:289)
at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:52)
at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:14)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:254)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:163)
at
com.patientsafesolutions.application.controllers.DroolsWorkflowController.startWorkflowProcess(DroolsWorkflowController.java:310)
at
com.patientsafesolutions.application.controllers.DroolsWorkflowController.drools(DroolsWorkflowController.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:76)
at
com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:126)
at com.meterware.httpunit.WebClient.createResponse(WebClient.java:667)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:220)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:181)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:122)
at com.patientsafesolutions.test.http.Request.submit(Request.java:115)
at com.patientsafesolutions.test.http.Request.post(Request.java:20)
at
com.patientsafesolutions.api.httptest.LogicalViewHttpTest.navigateToHome(LogicalViewHttpTest.java:57)
at
com.patientsafesolutions.api.httptest.LogicalViewHttpTest.navigateToPatient(LogicalViewHttpTest.java:100)
at
com.patientsafesolutions.api.httptest.HomeTests.homeLogicalView(HomeTests.java:14)
at com.patientsafesolutions.api.httptest.HomeTests$1.run(HomeTests.java:23)
at
com.patientsafesolutions.test.http.HttpTest$ThreadWithThrowable$1.run(HttpTest.java:241)
at java.lang.Thread.run(Thread.java:637)
org.hibernate.exception.GenericJDBCException: Cannot release connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at
org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:455)
at
org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:406)
at
org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:298)
at
org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225)
at
org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
at
bitronix.tm.BitronixTransaction.fireAfterCompletionEvent(BitronixTransaction.java:416)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:195)
at
bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:95)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:258)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:163)
at
com.patientsafesolutions.application.controllers.DroolsWorkflowController.startWorkflowProcess(DroolsWorkflowController.java:310)
at
com.patientsafesolutions.application.controllers.DroolsWorkflowController.drools(DroolsWorkflowController.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:76)
at
com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:126)
at com.meterware.httpunit.WebClient.createResponse(WebClient.java:667)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:220)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:181)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:122)
at com.patientsafesolutions.test.http.Request.submit(Request.java:115)
at com.patientsafesolutions.test.http.Request.post(Request.java:20)
at
com.patientsafesolutions.api.httptest.LogicalViewHttpTest.navigateToHome(LogicalViewHttpTest.java:57)
at
com.patientsafesolutions.api.httptest.LogicalViewHttpTest.navigateToPatient(LogicalViewHttpTest.java:100)
at
com.patientsafesolutions.api.httptest.HomeTests.homeLogicalView(HomeTests.java:14)
at com.patientsafesolutions.api.httptest.HomeTests$1.run(HomeTests.java:23)
at
com.patientsafesolutions.test.http.HttpTest$ThreadWithThrowable$1.run(HttpTest.java:241)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.sql.SQLException: error requeueing a JdbcPooledConnection
from datasource jdbc/processInstanceDS in state ACCESSIBLE wrapping
com.mysql.jdbc.jdbc2.optional.MysqlXAConnection@4128dca6
at
bitronix.tm.resource.jdbc.JdbcPooledConnection.release(JdbcPooledConnection.java:148)
at
bitronix.tm.resource.jdbc.JdbcConnectionHandle.close(JdbcConnectionHandle.java:77)
at
org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:74)
at
org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:451)
... 40 more
Caused by: bitronix.tm.internal.BitronixSystemException: cannot close a
resource when its XAResource is taking part in an unfinished global
transaction
at
bitronix.tm.resource.common.TransactionContextHelper.requeue(TransactionContextHelper.java:117)
at
bitronix.tm.resource.jdbc.JdbcPooledConnection.release(JdbcPooledConnection.java:146)
... 43 more
java.lang.IllegalArgumentException: Unknown node instance type:
org.drools.workflow.instance.node.ActionNodeInstance@2b7194a4
at
org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeNodeInstanceContent(AbstractProcessInstanceMarshaller.java:243)
at
org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeNodeInstance(AbstractProcessInstanceMarshaller.java:117)
at
org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeProcessInstance(AbstractProcessInstanceMarshaller.java:106)
at
org.drools.persistence.processinstance.ProcessInstanceInfo.update(ProcessInstanceInfo.java:237)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.ejb.event.BeanCallback.invoke(BeanCallback.java:23)
at
org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:80)
at
org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:65)
at
org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:41)
at
org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:308)
at
org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:248)
at
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:128)
at
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
at
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
at
org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
at
org.drools.persistence.processinstance.JPASignalManager.getProcessInstancesForEvent(JPASignalManager.java:53)
at
org.drools.persistence.processinstance.JPASignalManager.signalEvent(JPASignalManager.java:29)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:191)
at
org.drools.workflow.instance.node.EndNodeInstance.internalTrigger(EndNodeInstance.java:56)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:74)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
at
org.drools.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:62)
at
org.drools.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:58)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:74)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
at
org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:37)
at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:101)
at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:82)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:192)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:246)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:222)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:258)
at
org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:96)
at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:46)
at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:12)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:254)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:118)
at
com.patientsafesolutions.application.controllers.DroolsWorkflowController.drools(DroolsWorkflowController.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:76)
at
com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:126)
at com.meterware.httpunit.WebClient.createResponse(WebClient.java:667)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:220)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:181)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:122)
at com.patientsafesolutions.test.http.Request.submit(Request.java:115)
at com.patientsafesolutions.test.http.Request.post(Request.java:25)
at
com.patientsafesolutions.api.httptest.LogicalViewHttpTest.loginUser(LogicalViewHttpTest.java:80)
at
com.patientsafesolutions.api.httptest.LogicalViewHttpTest.navigateToPatient(LogicalViewHttpTest.java:102)
at
com.patientsafesolutions.api.httptest.HomeTests.homeLogicalView(HomeTests.java:14)
at com.patientsafesolutions.api.httptest.HomeTests$1.run(HomeTests.java:23)
at
com.patientsafesolutions.test.http.HttpTest$ThreadWithThrowable$1.run(HttpTest.java:241)
at java.lang.Thread.run(Thread.java:637)
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org><mailto:
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>>
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @
http://www.plugtree.com<http://www.plugtree.com/><
http://www.plugtree.com/>
- MyJourney @
http://salaboy.wordpress.com<http://salaboy.wordpress.com/><
http://salaboy.wordpress.com/>
- Co-Founder @
http://www.jbug.com.ar<http://www.jbug.com.ar/><
http://www.jbug.com.ar/>
- Salatino "Salaboy" Mauricio -
<ATT00001..txt>
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @
http://www.plugtree.com<http://www.plugtree.com/>
- MyJourney @
http://salaboy.wordpress.com<http://salaboy.wordpress.com/>
- Co-Founder @
http://www.jbug.com.ar<http://www.jbug.com.ar/>
- Salatino "Salaboy" Mauricio -
--
- CTO @
http://www.plugtree.com<http://www.plugtree.com/>
- MyJourney @
http://salaboy.wordpress.com<http://salaboy.wordpress.com/>
- Co-Founder @
http://www.jbug.com.ar<http://www.jbug.com.ar/>
- Salatino "Salaboy" Mauricio -
<ATT00001..txt>
------------------------------
Message: 2
Date: Wed, 16 Jun 2010 08:22:10 +0200
From: Wolfgang Laun <wolfgang.laun(a)gmail.com>
Subject: Re: [rules-users] deleting records using rules
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTimVxCgrbKHDCck1x1cVi_JTgIcTzhWV4BmApEfb(a)mail.gmail.com>
Content-Type: text/plain; charset=windows-1252
If you can do it in Java, you can do it in a rule.
Asking questions in this very general way will only (if at all) give
you very general answers.
-W
2010/6/15 Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>:
> Hi,
>
> How can I delete records using rules??
>
> I want to fire my rules on a dataset ? modify the dataset and delete data
> not concerned to me after the modification.
>
> can I do this with my rules directly?
>
>
>
> Thanks
>
> M
>
> ________________________________
>
> Please consider the environment before printing this email.
>
> Visit our website at
http://www.nyse.com
>
*****************************************************************************
> Note: The information contained in this message and any attachment to it
is
> privileged, confidential and protected from disclosure. If the reader of
> this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please notify the sender immediately by replying
to
> the message, and please delete it from your system. Thank you. NYSE
> Euronext.
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 43, Issue 84
*******************************************
Please consider the environment before printing this email.
Visit our website at
http://www.nyse.com
****************************************************
Note: The information contained in this message and any attachment to it
is privileged, confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by replying to
the message, and please delete it from your system. Thank you. NYSE
Euronext.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users