<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:x = 
"urn:schemas-microsoft-com:office:excel" xmlns:p = 
"urn:schemas-microsoft-com:office:powerpoint" xmlns:a = 
"urn:schemas-microsoft-com:office:access" xmlns:dt = 
"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s = 
"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs = 
"urn:schemas-microsoft-com:rowset" xmlns:z = "#RowsetSchema" xmlns:b = 
"urn:schemas-microsoft-com:office:publisher" xmlns:ss = 
"urn:schemas-microsoft-com:office:spreadsheet" xmlns:c = 
"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc = 
"urn:schemas-microsoft-com:office:odc" xmlns:oa = 
"urn:schemas-microsoft-com:office:activation" xmlns:html = 
"http://www.w3.org/TR/REC-html40" xmlns:q = 
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc = 
"http://microsoft.com/officenet/conferencing" XMLNS:D = "DAV:" XMLNS:Repl = 
"http://schemas.microsoft.com/repl/" xmlns:mt = 
"http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2 = 
"http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda = 
"http://www.passport.com/NameSpace.xsd" xmlns:ois = 
"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir = 
"http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds = 
"http://www.w3.org/2000/09/xmldsig#" xmlns:dsp = 
"http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc = 
"http://schemas.microsoft.com/data/udc" xmlns:xsd = 
"http://www.w3.org/2001/XMLSchema" xmlns:sub = 
"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec = 
"http://www.w3.org/2001/04/xmlenc#" xmlns:sp = 
"http://schemas.microsoft.com/sharepoint/" xmlns:sps = 
"http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi = 
"http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs = 
"http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf = 
"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p = 
"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf = 
"http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss = 
"http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi = 
"http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi = 
"http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver = 
"http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels = 
"http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp = 
"http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t = 
"http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m = 
"http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl = 
"http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl = 
"http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" 
XMLNS:Z = "urn:schemas-microsoft-com:" xmlns:st = ""><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Consolas;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
PRE {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"; FONT-SIZE: 10pt; mso-style-priority: 99; mso-style-link: "HTML Preformatted Char"
}
SPAN.HTMLPreformattedChar {
        FONT-FAMILY: Consolas; mso-style-priority: 99; mso-style-link: "HTML Preformatted"; mso-style-name: "HTML Preformatted Char"
}
SPAN.EmailStyle19 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle20 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle21 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US link=blue bgColor=#ffffff vLink=purple>
<DIV><FONT size=2 face=Arial>Vijay,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>I've taken a look and you are correct, the work 
item object should not be reset on completion as that way, listeners or on-exit 
actions might not have access to it anymore.&nbsp; I've used another approach to 
solve the issue that resulted in me adding this reset to -1.&nbsp; Let me know 
if this works for you using the latest trunk (r34218, 
JBRULES-2598).</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Kris</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=VPandey@mdes.ms.gov href="mailto:VPandey@mdes.ms.gov">Vijay K 
  Pandey</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org 
  href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, July 21, 2010 5:28 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] FW: Drools 
  5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem 
  object</DIV>
  <DIV><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Hi 
  @Salaboy,<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Did 
  you get a chance to look into this?<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Thanks<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Vijay<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <DIV>
  <DIV 
  style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
  <P class=MsoNormal><B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Vijay K Pandey 
  <BR><B>Sent:</B> Thursday, July 15, 2010 1:26 PM<BR><B>To:</B> <A 
  href="mailto:'rules-users@lists.jboss.org'">'rules-users@lists.jboss.org'</A><BR><B>Subject:</B> 
  FW: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get 
  hold of WorkItem object<o:p></o:p></SPAN></P></DIV></DIV>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Hi 
  @Salaboy,<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">I 
  am not sure if you received the email below. &nbsp;Thanks for looking into 
  this.<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Vijay<o:p></o:p></SPAN></P>
  <DIV>
  <DIV 
  style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
  <P class=MsoNormal><B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Vijay K Pandey 
  <BR><B>Sent:</B> Tuesday, July 13, 2010 8:53 AM<BR><B>To:</B> 'Mauricio 
  Salatino'<BR><B>Subject:</B> RE: [rules-users] Drools 5.1.0.M2 - 
  WorkItemNodeInstance --Listeners can't get hold of WorkItem 
  object<o:p></o:p></SPAN></P></DIV></DIV>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Thanks 
  for a quick response. I added the Transaction Manager piece of code but the 
  problem still persists. Also it uses the attached persistence.xml file which 
  is placed under META-INF directory that has the correct transaction manager 
  look up class.&nbsp; <o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Thanks<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Vijay<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <DIV 
  style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
  <P class=MsoNormal><B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Mauricio Salatino 
  [mailto:salaboy@gmail.com] <BR><B>Sent:</B> Tuesday, July 13, 2010 6:40 
  AM<BR><B>To:</B> Vijay K Pandey<BR><B>Subject:</B> Re: [rules-users] Drools 
  5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem 
  object<o:p></o:p></SPAN></P></DIV>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <P style="MARGIN-BOTTOM: 12pt" class=MsoNormal>I've just take a quick look to 
  your file and I notice (without running it) that you didn't set the 
  TransactionManager property to your Environment:<o:p></o:p></P><PRE>env.set( EnvironmentName.TRANSACTION_MANAGER,<BR>
<BR>
<o:p></o:p></PRE><PRE><BR>
<BR>
<o:p></o:p></PRE><PRE><o:p>&nbsp;</o:p></PRE><PRE><BR>
<BR>
<o:p></o:p></PRE><PRE><BR>
<BR>
<o:p></o:p></PRE><PRE><o:p>&nbsp;</o:p></PRE><PRE><o:p>&nbsp;</o:p></PRE><PRE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TransactionManagerServices.getTransactionManager() );<o:p></o:p></PRE>
  <P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt">You also need to have the reference to bitronix inside 
  your persistence.xml file:</SPAN><o:p></o:p></P><PRE>&lt;property name="hibernate.transaction.manager_lookup_class"<BR>
<BR>
<o:p></o:p></PRE><PRE><BR>
<BR>
<o:p></o:p></PRE><PRE><o:p>&nbsp;</o:p></PRE><PRE><BR>
<BR>
<o:p></o:p></PRE><PRE><BR>
<BR>
<o:p></o:p></PRE><PRE><o:p>&nbsp;</o:p></PRE><PRE><o:p>&nbsp;</o:p></PRE><PRE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value="org.hibernate.transaction.BTMTransactionManagerLookup"/&gt;<o:p></o:p></PRE>
  <P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><BR>Can you try this and let me 
  know if it fix your problem?<BR>Greetings<o:p></o:p></P>
  <DIV>
  <P class=MsoNormal>On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey &lt;<A 
  href="mailto:VPandey@mdes.ms.gov">VPandey@mdes.ms.gov</A>&gt; 
  wrote:<o:p></o:p></P>
  <DIV>
  <DIV>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt">Thanks Salaboy 
  for looking into this.</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN 
  style="COLOR: #1f497d; FONT-SIZE: 11pt">&nbsp;</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt">Here is the 
  Junit Test case(java file attached) I created for this 
  problem.</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN 
  style="COLOR: #1f497d; FONT-SIZE: 11pt">&nbsp;</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt">Line # 129 
  fails.</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN 
  style="COLOR: #1f497d; FONT-SIZE: 11pt">&nbsp;</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt">Please do let me 
  know if I am doing something wrong or the fix has some issues or maybe there 
  is some other way out to get hold of the “WorkItem” object in the process 
  event listener.</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN 
  style="COLOR: #1f497d; FONT-SIZE: 11pt">&nbsp;</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN 
  style="COLOR: #1f497d; FONT-SIZE: 11pt">Thanks</SPAN><o:p></o:p></P>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><SPAN 
  style="COLOR: #1f497d; FONT-SIZE: 11pt">Vijay</SPAN><o:p></o:p></P>
  <DIV>
  <DIV 
  style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
  style="FONT-SIZE: 10pt"> <A href="mailto:rules-users-bounces@lists.jboss.org" 
  target=_blank>rules-users-bounces@lists.jboss.org</A> [mailto:<A 
  href="mailto:rules-users-bounces@lists.jboss.org" 
  target=_blank>rules-users-bounces@lists.jboss.org</A>] <B>On Behalf Of 
  </B>Salaboy<BR><B>Sent:</B> Friday, July 09, 2010 11:11 AM<BR><B>To:</B> Rules 
  Users List<BR><B>Subject:</B> Re: [rules-users] Drools 5.1.0.M2 - 
  WorkItemNodeInstance -- Listeners can't get hold of WorkItem 
  object</SPAN><o:p></o:p></P></DIV></DIV>
  <DIV>
  <DIV>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal>&nbsp;<o:p></o:p></P>
  <DIV>
  <P style="MARGIN-BOTTOM: 12pt; mso-margin-top-alt: auto" class=MsoNormal>I 
  would like to take a look on this issue. Can you provide me a test case that 
  show the problem?&nbsp;<o:p></o:p></P>
  <DIV>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal>- CTO @ <A href="http://www.plugtree.com" 
  target=_blank>http://www.plugtree.com</A><o:p></o:p></P></DIV>
  <DIV>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal>- MyJourney @ <A href="http://salaboy.wordpress.com" 
  target=_blank>http://salaboy.wordpress.com</A><o:p></o:p></P></DIV>
  <DIV>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal>- Co-Founder @ <A href="http://www.jbug.com.ar" 
  target=_blank>http://www.jbug.com.ar</A><o:p></o:p></P></DIV>
  <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
  class=MsoNormal>- Mauricio "Salaboy" Salatino -<o:p></o:p></P></DIV>
  <DIV>
  <P style="MARGIN-BOTTOM: 12pt; mso-margin-top-alt: auto" 
  class=MsoNormal><BR>On Jul 9, 2010, at 12:43, Vijay K Pandey &lt;<A 
  href="mailto:VPandey@mdes.ms.gov" target=_blank>VPandey@mdes.ms.gov</A>&gt; 
  wrote:<o:p></o:p></P></DIV>
  <BLOCKQUOTE style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt">
    <DIV>
    <DIV>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">I guess this problem was due to 
    a fix done in WorkItemNodeInstance? Is this the correct behavior? If yes how 
    do we get hold of “WorkItem” instance in the attached 
    listeners?</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><A 
    href="http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&amp;r2" 
    target=_blank>http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&amp;r2</A>=<o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Thanks</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Vijay</SPAN><o:p></o:p></P>
    <DIV>
    <DIV 
    style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt"> Vijay K Pandey <BR><B>Sent:</B> Tuesday, June 15, 
    2010 9:20 AM<BR><B>To:</B> 'Rules Users List'<BR><B>Subject:</B> RE: Drools 
    5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem 
    object</SPAN><o:p></o:p></P></DIV></DIV>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal>&nbsp;<o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Any one on this issue? Any 
    Drools Flow expert?</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Appreciate your time for taking 
    a look at it.</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Thanks</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Vijay</SPAN><o:p></o:p></P>
    <DIV>
    <DIV 
    style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt"> Vijay K Pandey <BR><B>Sent:</B> Thursday, June 10, 
    2010 12:03 PM<BR><B>To:</B> 'Rules Users List'<BR><B>Subject:</B> RE: Drools 
    5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem 
    object</SPAN><o:p></o:p></P></DIV></DIV>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal>&nbsp;<o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Should I log this as a JIRA 
    ticket.</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Thanks</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Vijay</SPAN><o:p></o:p></P>
    <DIV>
    <DIV 
    style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt"> Vijay K Pandey <BR><B>Sent:</B> Wednesday, June 09, 
    2010 9:57 AM<BR><B>To:</B> 'Rules Users List'<BR><B>Subject:</B> Drools 
    5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem 
    object</SPAN><o:p></o:p></P></DIV></DIV>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal>&nbsp;<o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Hi,</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">There is a change done in 
    Drools 5.1.0.M2 - <B>org.drools.workflow.instance.node.WorkItemNodeInstance 
    </B>class in the method </SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN style="COLOR: #1f497d">public void 
    triggerCompleted(WorkItem workItem) &nbsp;&nbsp;&nbsp;&nbsp;at line 196 
    &nbsp;</SPAN></B><SPAN style="COLOR: #1f497d">which is setting the 
    workItemId as -1</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN style="COLOR: #1f497d">this.workItemId = 
    -1;</SPAN></B><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN 
    style="COLOR: #1f497d">&nbsp;</SPAN></B><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Due to the above change the 
    listeners which are attached to the &nbsp;“complete” event of the work item 
    – such as the method below </SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><B><SPAN style="COLOR: #1f497d">public void 
    beforeNodeLeft(ProcessNodeLeftEvent event)</SPAN></B><SPAN 
    style="COLOR: #1f497d">&nbsp; are not able to get hold of the associated 
    workitem object as it returns null.</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Is there any specific reason 
    that workItemId is set to -1 even before the associated listeners get 
    triggered or is this a bug?</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">If it was an intended change 
    then how do I get hold of the “WorkItem” object in the attached 
    listeners.</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">&nbsp;</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Thanks</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">Vijay</SPAN><o:p></o:p></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal><SPAN style="COLOR: #1f497d">p.s This change was not there 
    in the snapshot of 18<SUP>th</SUP> April 2010 which I was earlier working 
    on. Above is the only change in this class from the snapshot of 
    18<SUP>th</SUP> April and 
  5.1.0.M2</SPAN><o:p></o:p></P></DIV></DIV></BLOCKQUOTE>
  <BLOCKQUOTE style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt">
    <DIV>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" 
    class=MsoNormal>_______________________________________________<BR>rules-users 
    mailing list<BR><A href="mailto:rules-users@lists.jboss.org" 
    target=_blank>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><o:p></o:p></P></DIV></BLOCKQUOTE></DIV></DIV></DIV></DIV></DIV>
  <P class=MsoNormal><BR><BR clear=all><BR>-- <BR>&nbsp;- CTO @ <A 
  href="http://www.plugtree.com">http://www.plugtree.com</A>&nbsp; <BR>&nbsp;- 
  MyJourney @ <A 
  href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</A><BR>&nbsp;- 
  Co-Founder @ <A 
  href="http://www.jbug.com.ar">http://www.jbug.com.ar</A><BR>&nbsp;<BR>&nbsp;- 
  Salatino "Salaboy" Mauricio -<o:p></o:p></P></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>rules-users mailing 
  list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE><br>
<FONT FACE=3D"Helvetica" SIZE=3D2>Disclaimer: <A HREF="http://www.kuleuven.be/cwis/email_disclaimer.htm">http://www.kuleuven.be/cwis/email_disclaimer.htm</A> for more information.</FONT>
 <BR>

</BODY></HTML>