Hi Pardeep,
I have gotten this functionality to work.
I am using SQL Server, but that is just a difference in the persistence.xml or
datasource.
You are seeing SessionInfo data, so your persistence is there, did you add this?
<class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
Here is the main points of my code.
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
VariablePersistenceStrategyFactory.getVariablePersistenceStrategy()
.setPersister("javax.persistence.Entity",
"org.drools.persistence.processinstance.persisters.JPAVariablePersister");
session = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase,
null, env);
KnowledgeRuntimeLogger logger =
KnowledgeRuntimeLoggerFactory.newFileLogger(session, "log/claimsdemo");
trackingProcessEventListener = new TrackingProcessEventListener();
session.addEventListener(trackingProcessEventListener);
Map<String, Object> parameterMap =
new HashMap<String, Object>();
parameterMap.put("claim", claim);
processInstance = session.startProcess(CLAIM_FLOW, parameterMap);
Bill
________________________________
From: "[email protected]" <[email protected]>
To: [email protected]
Sent: Thu, October 29, 2009 5:56:18 AM
Subject: [rules-users] Drools Persistence Prob : No values going into
'VaraibleInstanceInfo' Table
Hi,
I am working on persisting Drools session info into the database.
For that I have taken a sample project from
http://blog.athico.com/2009/09/drools-flow-variable-persistence.html.
When I tried to debug the project, no values are inserted into the table
'VaraibleInstanceInfo' table.
However In between the debugging I am able to see data going into the table
'SessionInfo' , 'ProcessInstaceInfo', WorkItemInfo' table. But no data is going
into the 'VaraibleInstanceInfo' and 'ProcessInstanceEventInfo' table.
I have taken the code for VariableInstanceInfo.java,
SerializablePersistedVariable.java, JPAPersistedVariable.java and other
required classes for running the project from
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/
Kindly tell me what going wrong in this. I am using Mysql database for
persistence storage.
Thanks & Regards
Pardeep Ruhil
L&T Infotech Ltd
Mumbai
Ph: +919820283884
Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com
This Document is classified as:
L&T Infotech Proprietary L&T Infotech Confidential L&T Infotech Internal
Use Only L&T Infotech General Business
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.
______________________________________________________________________
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users