<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV>Hi Pardeep,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have gotten this functionality to work.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am using SQL Server, but that is just a difference in the persistence.xml or datasource.&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>You are seeing SessionInfo data, so your persistence is there, did you add this?</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;class&gt;org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable&lt;/class&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is the main points of my code.</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp; EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa");<BR>&nbsp;&nbsp;&nbsp; env = KnowledgeBaseFactory.newEnvironment();<BR>&nbsp;&nbsp;&nbsp; env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);</DIV>
<DIV>&nbsp;&nbsp;&nbsp; VariablePersistenceStrategyFactory.getVariablePersistenceStrategy()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .setPersister("javax.persistence.Entity",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "org.drools.persistence.processinstance.persisters.JPAVariablePersister");</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp; session = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null, env);</DIV>
<DIV>&nbsp;&nbsp;&nbsp; KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(session, "log/claimsdemo");</DIV>
<DIV>&nbsp;&nbsp;&nbsp; trackingProcessEventListener = new TrackingProcessEventListener();<BR>&nbsp;&nbsp;&nbsp; session.addEventListener(trackingProcessEventListener);</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp; Map&lt;String, Object&gt; parameterMap =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new HashMap&lt;String, Object&gt;();<BR>&nbsp;&nbsp;&nbsp; parameterMap.put("claim", claim);<BR>&nbsp;&nbsp;&nbsp; processInstance = session.startProcess(CLAIM_FLOW, parameterMap);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Bill<BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> "Pardeep.Ruhil@lntinfotech.com" &lt;Pardeep.Ruhil@lntinfotech.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> rules-users@lists.jboss.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thu, October 29, 2009 5:56:18 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> [rules-users] Drools Persistence Prob : No values going into 'VaraibleInstanceInfo' Table<BR></FONT><BR><BR><FONT size=2 face="Trebuchet MS">Hi,</FONT> <BR><BR><FONT size=2 face="Trebuchet MS">I am working on persisting Drools session info into the database.</FONT> <BR><FONT size=2 face="Trebuchet MS">For that I have taken a sample project from </FONT>
<TABLE>
<TBODY>
<TR vAlign=top>
<TD><A href="http://blog.athico.com/2009/09/drools-flow-variable-persistence.html" rel=nofollow target=_blank><FONT color=blue size=2 face="Trebuchet MS"><U>http://blog.athico.com/2009/09/drools-flow-variable-<B>persistence</U></B><U>.html</U></FONT></A><FONT size=2 face="Trebuchet MS">.</FONT><FONT size=3> </FONT><BR><FONT size=2 face="Trebuchet MS">When I tried to debug the project, no values are inserted into the table 'VaraibleInstanceInfo' table. </FONT><BR><FONT size=2 face="Trebuchet MS">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.</FONT> <BR><BR><FONT size=2 face="Trebuchet MS">I have taken the code for VariableInstanceInfo.java, SerializablePersistedVariable.java, &nbsp;JPAPersistedVariable.java &nbsp;and other required classes for running the project from
 &nbsp;http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/</FONT> <BR><BR><FONT size=2 face="Trebuchet MS">Kindly tell me what going wrong in this. I am using Mysql database for persistence storage.</FONT> <BR></TR></TBODY></TABLE><BR><BR><FONT size=2 face="Trebuchet MS">Thanks &amp; Regards<BR><BR>Pardeep Ruhil<BR>L&amp;T Infotech Ltd<BR>Mumbai<BR>Ph: +919820283884<BR><B><BR>Larsen &amp; Toubro Infotech Ltd.</B></FONT><FONT color=blue size=2 face="Trebuchet MS"><U><BR></U></FONT><A href="http://www.lntinfotech.com/" rel=nofollow target=_blank><FONT color=blue size=2 face="Trebuchet MS"><U>www.Lntinfotech.com</U></FONT></A><FONT size=2 face="Trebuchet MS"><BR><BR>This Document is classified as: <BR><BR></FONT><INPUT value=on CHECKED type=checkbox name=F1_chkbox><FONT size=2 face="Trebuchet MS">L&amp;T Infotech Proprietary &nbsp; </FONT><INPUT value=on type=checkbox
 name=F1_chkbox><FONT size=2 face="Trebuchet MS">L&amp;T Infotech Confidential &nbsp; </FONT><INPUT value=on type=checkbox name=F1_chkbox><FONT size=2 face="Trebuchet MS">L&amp;T Infotech Internal Use Only &nbsp; </FONT><INPUT value=on type=checkbox name=F1_chkbox><FONT size=2 face="Trebuchet MS">L&amp;T Infotech General Business &nbsp; <BR><BR>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. </FONT><BR>______________________________________________________________________<BR></DIV></DIV></div><br>

      </body></html>