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