<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
tt
        {font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You have to load the same &#8216;<b><span
style='font-weight:bold'>StatefulKnowledgeSession</span></b>&#8217; in which
you have inserted your objects</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>. </span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>The inserted objects are serialized and stored in the column &#8220;<b><span
style='font-weight:bold'>rules_byte_array</span></b>&#8221; of the <b><span
style='font-weight:bold'>session_info</span></b> table. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>So you have to load the same session &#8211;
to get to your inserted objects. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>There is a difference the way process map
objects are handled &#8211; such as<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='background:
silver'>Map</span>&lt;String, Object&gt; parameters = </span></font><b><font
size=2 color="#7f0055" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold'>new</span></font></b><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> HashMap&lt;String, Object&gt;();</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parameters.put(</span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;x&quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>, </span></font><font size=2 color="#2a00ff"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#2A00FF'>&quot;hello&quot;</span></font><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>);</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parameters.put(</span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;y&quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>, </span></font><font size=2 color="#2a00ff"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#2A00FF'>&quot;hey I am y&quot;</span></font><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>);</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ksession.startProcess( </span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;myprocess&quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>, parameters );</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In the above case the parameters are not
stored as part of the &#8220;session info&#8221; table. These are stored separately
like in &#8220;process instance info&#8221; table + (some/other tables if you
use variable persistence strategy)&#8211; so if you don&#8217;t have the rules
which are based on the objects you are inserting &#8211; you can get the same
done through process parameters in which case you can get hold of the process instance
through &nbsp;any new session or the same session and then its parameters.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Vijay<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
Pardeep.Ruhil@lntinfotech.com [mailto:Pardeep.Ruhil@lntinfotech.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, November 18, 2009
12:38 AM<br>
<b><span style='font-weight:bold'>To:</span></b> rules-users@lists.jboss.org<br>
<b><span style='font-weight:bold'>Cc:</span></b> kris.verlaenen@cs.kuleuven.be;
Vijay K Pandey<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-users] Drools
Flow :Persistence Problem : Restore StatefulKnowledgeSession from database</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
</span></font><font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;
font-family:"Trebuchet MS"'>Hi Kris,</span></font> <br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Thanks for you valuable input and Vijay of course clearing some
of my doubts by asking question on this.</span></font> <br>
<br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Much of my doubt are clear except one. </span></font><br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>When we are reloading the StatefulKnowledgeSession from the
database using the below line</span></font> <br>
<font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;</span></font>
<br>
<font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>StatefulKnowledgeSession
loadSession= JPAKnowledgeService.<i><span style='font-style:italic'>loadStatefulKnowledgeSession</span></i>(id,
<i><font color="#0021bf"><span style='color:#0021BF;font-style:italic'>kbase</span></font></i>,
<b><font color="#820040"><span style='color:#820040;font-weight:bold'>null</span></font></b>,
<i><font color="#0021bf"><span style='color:#0021BF;font-style:italic'>env</span></font></i>);</span></font>
<br>
<br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>This session object is different from the one that is created
when we first created </span></font><br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>StatefulknowledgeSession object using </span></font><br>
<br>
<font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;StatefulKnowledgeSession
<b><span style='font-weight:bold'>initialSession</span></b>=
JPAKnowledgeService.<i><span style='font-style:italic'>newStatefulKnowledgeSession</span></i>(<i><font
color="#0021bf"><span style='color:#0021BF;font-style:italic'>kbase</span></font></i>,
<b><font color="#820040"><span style='color:#820040;font-weight:bold'>null</span></font></b>,
<i><font color="#0021bf"><span style='color:#0021BF;font-style:italic'>env</span></font></i>);</span></font>
<br>
<br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Am I right ?</span></font> <br>
<br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Now In my case I have a <b><span style='font-weight:bold'>HumanWorkItemHandler</span></b>
class for handling the <b><span style='font-weight:bold'>humantask</span></b>
and there is<b><span style='font-weight:bold'> ActionWorkITemHandle</span></b>r
for my customAction workItem, which both are initailsed with the <b><span
style='font-weight:bold'>initialSession </span></b>object.</span></font> <br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Now when I load the session from the database to complete the
HumanWorkItemHandler task I got a different session object i.e. <b><span
style='font-weight:bold'>loadSession. </span></b></span></font><br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Now when I insert something in the loadsession using &nbsp;<b><span
style='font-weight:bold'>loadSession.insert(request);</span></b> So that I can
use the same in ActionWorkItemHandler to exceute the action for the request. </span></font><br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>I am not able to retrieve the same request object i.e.
(HttpServletRequest) from the session in ActionWorkItemHandler </span></font><br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>as when i do </span></font><br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>&nbsp; &nbsp; &nbsp; &nbsp; Collection obj =
loadSession.getObject();</span></font> <br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>I get request as <b><span style='font-weight:bold'>null. &nbsp;</span></b>
Because this loadSession is different from the one I have inserted.</span></font>
<br>
<br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Kindly help in this, or I have misunderstood the concept. </span></font><br>
<br>
<font size=2 face="Trebuchet MS"><span style='font-size:10.0pt;font-family:
"Trebuchet MS"'>Thanks &amp; Regards<br>
<br>
Pardeep Ruhil<br>
</span></font><br>
<br>
<o:p></o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%'>
 <tr>
  <td width="40%" valign=top style='width:40.0%;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><b><font size=1 face="Trebuchet MS"><span
  style='font-size:7.5pt;font-family:"Trebuchet MS";font-weight:bold'>Kris
  Verlaenen &lt;kris.verlaenen@cs.kuleuven.be&gt;</span></font></b><font
  size=1 face="Trebuchet MS"><span style='font-size:7.5pt;font-family:"Trebuchet MS"'>
  </span></font><o:p></o:p></p>
  <p><font size=1 face="Trebuchet MS"><span style='font-size:7.5pt;font-family:
  "Trebuchet MS"'>11/17/2009 04:17 PM</span></font> <o:p></o:p></p>
  </td>
  <td width="59%" valign=top style='width:59.0%;padding:.75pt .75pt .75pt .75pt'>
  <table class=MsoNormalTable border=0 cellpadding=0 width="100%"
   style='width:100.0%'>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face="Trebuchet MS"><span style='font-size:7.5pt;font-family:"Trebuchet MS"'>To</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face="Trebuchet MS"><span style='font-size:
    7.5pt;font-family:"Trebuchet MS"'>Rules Users List
    &lt;rules-users@lists.jboss.org&gt;, Vijay K Pandey
    &lt;VPandey@mdes.ms.gov&gt;</span></font> <o:p></o:p></p>
    </td>
   </tr>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face="Trebuchet MS"><span style='font-size:7.5pt;font-family:"Trebuchet MS"'>cc</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face="Trebuchet MS"><span style='font-size:
    7.5pt;font-family:"Trebuchet MS"'>&quot;Pardeep.Ruhil@lntinfotech.com&quot;
    &lt;Pardeep.Ruhil@lntinfotech.com&gt;</span></font> <o:p></o:p></p>
    </td>
   </tr>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face="Trebuchet MS"><span style='font-size:7.5pt;font-family:"Trebuchet MS"'>Subject</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face="Trebuchet MS"><span style='font-size:
    7.5pt;font-family:"Trebuchet MS"'>Re: [rules-users] Drools Flow
    :Persistence Problem : Restore StatefulKnowledgeSession from database</span></font><o:p></o:p></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
  <table class=MsoNormalTable border=0 cellpadding=0>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'><o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<br>
</span></font><tt><font size=2 face="Courier New"><span style='font-size:10.0pt'>Preferably
you should cache the session itself as well (so you don't</span></font></tt><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt><font face="Courier New">have to recreate it all the time) and reuse that
across you application.</font></tt><br>
<tt><font face="Courier New">&nbsp;Or you could have multiple independent
sessions as well. &nbsp;If you store</font></tt><br>
<tt><font face="Courier New">the key of the session somewhere, you can easily
restore this session</font></tt><br>
<tt><font face="Courier New">(or sessions) after failure.</font></tt><br>
<br>
<tt><font face="Courier New">Kris</font></tt><br>
<br>
<tt><font face="Courier New">Quoting Vijay K Pandey
&lt;VPandey@mdes.ms.gov&gt;:</font></tt><br>
<br>
<tt><font face="Courier New">&gt; Let's say where we don't need timers - in
those cases one can create</font></tt><br>
<tt><font face="Courier New">&gt; (create only if its not there) a global
session (create the</font></tt><br>
<tt><font face="Courier New">&gt; sessioninfo at the drools startup - store the
session primary key</font></tt><br>
<tt><font face="Courier New">&gt; somewhere) - reuse this session across
everywhere?</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; Vijay</font></tt><br>
<tt><font face="Courier New">&gt; -----Original Message-----</font></tt><br>
<tt><font face="Courier New">&gt; From: rules-users-bounces@lists.jboss.org</font></tt><br>
<tt><font face="Courier New">&gt; [mailto:rules-users-bounces@lists.jboss.org]
On Behalf Of Kris</font></tt><br>
<tt><font face="Courier New">&gt; Verlaenen</font></tt><br>
<tt><font face="Courier New">&gt; Sent: Monday, November 16, 2009 5:12 PM</font></tt><br>
<tt><font face="Courier New">&gt; To: Rules Users List;
Pardeep.Ruhil@lntinfotech.com</font></tt><br>
<tt><font face="Courier New">&gt; Subject: Re: [rules-users] Drools Flow
:Persistence Problem : Restore</font></tt><br>
<tt><font face="Courier New">&gt; StatefulKnowledgeSession from database</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; Pardeep,</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; The behavior you are describing is indeed
correct. &nbsp;The session in</font></tt><br>
<tt><font face="Courier New">&gt; this</font></tt><br>
<tt><font face="Courier New">&gt; case is a global session, meaning that it
will be used for all</font></tt><br>
<tt><font face="Courier New">&gt; process</font></tt><br>
<tt><font face="Courier New">&gt; instances. &nbsp;Note however that, unless
you are using timers, all</font></tt><br>
<tt><font face="Courier New">&gt; other</font></tt><br>
<tt><font face="Courier New">&gt; state (process instance state, work items,
etc.) is persisted</font></tt><br>
<tt><font face="Courier New">&gt; separately</font></tt><br>
<tt><font face="Courier New">&gt; and the session state will basically be
empty.</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; It is also possible to have one session per
process instance (or</font></tt><br>
<tt><font face="Courier New">&gt; whatever partitioning you like). &nbsp;A
session has a unique id (which</font></tt><br>
<tt><font face="Courier New">&gt; you</font></tt><br>
<tt><font face="Courier New">&gt; can specify when reloading the session).
&nbsp;You'll then have to load</font></tt><br>
<tt><font face="Courier New">&gt; the</font></tt><br>
<tt><font face="Courier New">&gt; right session before continuing the execution
of your process</font></tt><br>
<tt><font face="Courier New">&gt; instance.</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; Kris</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; Quoting Pardeep.Ruhil@lntinfotech.com:</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; &gt; Hi Salaboy,</font></tt><br>
<tt><font face="Courier New">&gt; &gt; Thanks for you replying.</font></tt><br>
<tt><font face="Courier New">&gt; &gt; Yes, of course it is storing multiple
process instance Id in the</font></tt><br>
<tt><font face="Courier New">&gt; &gt; database.</font></tt><br>
<tt><font face="Courier New">&gt; &gt; But, what I feel is that it will fail
when I am trying to run two</font></tt><br>
<tt><font face="Courier New">&gt; &gt; workflow</font></tt><br>
<tt><font face="Courier New">&gt; &gt; at the same time simultaneously, using
the same code by</font></tt><br>
<tt><font face="Courier New">&gt; dynamically</font></tt><br>
<tt><font face="Courier New">&gt; &gt; providing the workflow name and the
parameters for each of them.</font></tt><br>
<tt><font face="Courier New">&gt; &gt; Ideally there should be two entries for
the</font></tt><br>
<tt><font face="Courier New">&gt; StatfulKnowledgeSession</font></tt><br>
<tt><font face="Courier New">&gt; &gt; object</font></tt><br>
<tt><font face="Courier New">&gt; &gt; because when I try to load the
StatefulKnowledgeSession object</font></tt><br>
<tt><font face="Courier New">&gt; from</font></tt><br>
<tt><font face="Courier New">&gt; &gt; the</font></tt><br>
<tt><font face="Courier New">&gt; &gt; database it will give me the session
object of the workflow which</font></tt><br>
<tt><font face="Courier New">&gt; is</font></tt><br>
<tt><font face="Courier New">&gt; &gt; last</font></tt><br>
<tt><font face="Courier New">&gt; &gt; executed.</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt; For example lets &nbsp;suppose I have
two workflow 1 and 2 having two</font></tt><br>
<tt><font face="Courier New">&gt; &gt; humantask</font></tt><br>
<tt><font face="Courier New">&gt; &gt; in each of them . So when I finish the
first Human Task of both</font></tt><br>
<tt><font face="Courier New">&gt; &gt; workflow</font></tt><br>
<tt><font face="Courier New">&gt; &gt; one by one. &nbsp;SessionInfo
&nbsp;present in the database is of workflow 2</font></tt><br>
<tt><font face="Courier New">&gt; &gt; (if 2</font></tt><br>
<tt><font face="Courier New">&gt; &gt; is executed last). Because there is no
field in the sessioninfo</font></tt><br>
<tt><font face="Courier New">&gt; &gt; entity of</font></tt><br>
<tt><font face="Courier New">&gt; &gt; the database regarding to which workflow
it belongs to. Am I right</font></tt><br>
<tt><font face="Courier New">&gt; ?</font></tt><br>
<tt><font face="Courier New">&gt; &gt; So when I &nbsp;try to finish the 1st
workflow by executing the 2nd</font></tt><br>
<tt><font face="Courier New">&gt; &gt; humantask</font></tt><br>
<tt><font face="Courier New">&gt; &gt; left in it , I need to reload the
StatfulKnowledgeSession object</font></tt><br>
<tt><font face="Courier New">&gt; from</font></tt><br>
<tt><font face="Courier New">&gt; &gt; the</font></tt><br>
<tt><font face="Courier New">&gt; &gt; database. As there is no way of
distinguishing that the session</font></tt><br>
<tt><font face="Courier New">&gt; &gt; object</font></tt><br>
<tt><font face="Courier New">&gt; &gt; store in the database is of which
workflow , there might be a</font></tt><br>
<tt><font face="Courier New">&gt; problem</font></tt><br>
<tt><font face="Courier New">&gt; &gt; as I</font></tt><br>
<tt><font face="Courier New">&gt; &gt; may get the ksession object of 2nd
workflow.</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt; In case of Process Instance it is fine ,
because there is a field</font></tt><br>
<tt><font face="Courier New">&gt; &gt; 'processId' which will distinguish which
processInstanceId belongs</font></tt><br>
<tt><font face="Courier New">&gt; to</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt; which worklowId or processId.</font></tt><br>
<tt><font face="Courier New">&gt; &gt; But in case of Session , there is noting
as such.</font></tt><br>
<tt><font face="Courier New">&gt; &gt; I don't what I am saying is handled in
drools persistence. Please</font></tt><br>
<tt><font face="Courier New">&gt; let</font></tt><br>
<tt><font face="Courier New">&gt; &gt; me</font></tt><br>
<tt><font face="Courier New">&gt; &gt; know if it there or not.</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt; Thanks &amp; Regards</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt; Pardeep Ruhil</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt; &gt;</font></tt><br>
<tt><font face="Courier New">&gt;
______________________________________________________________________</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<tt><font face="Courier New">&gt; Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm</font></tt><br>
<tt><font face="Courier New">&gt;
_______________________________________________</font></tt><br>
<tt><font face="Courier New">&gt; rules-users mailing list</font></tt><br>
<tt><font face="Courier New">&gt; rules-users@lists.jboss.org</font></tt><br>
<tt><font face="Courier New">&gt;
https://lists.jboss.org/mailman/listinfo/rules-users</font></tt><br>
<tt><font face="Courier New">&gt; _______________________________________________</font></tt><br>
<tt><font face="Courier New">&gt; rules-users mailing list</font></tt><br>
<tt><font face="Courier New">&gt; rules-users@lists.jboss.org</font></tt><br>
<tt><font face="Courier New">&gt;
https://lists.jboss.org/mailman/listinfo/rules-users</font></tt><br>
<tt><font face="Courier New">&gt; </font></tt><br>
<br>
<br>
<br>
<br>
<tt><font face="Courier New">Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm</font></tt><br>
<br>
<tt><font face="Courier New">______________________________________________________________________</font></tt><br>
</span></font><br>
<br>
______________________________________________________________________<o:p></o:p></p>

</div>

</body>

</html>