<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Context Variable Mappings</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">I am trying to get a non serialisable object to be stored in the context of a workflow process. </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have updated the jbpm.cfg.xml file to point to my modiffed varmapping file, I then added the following XML snippet into jbpm.varmapping.xml file.</FONT></P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">jbpm-type</FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">matcher</FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">bean</FONT><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#7F007F" SIZE=2 FACE="Courier New">class</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">=</FONT><I><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;com.erudine.</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">My</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">Matcher&quot;</FONT></I><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">/&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;/</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">matcher</FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">converter</FONT><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#7F007F" SIZE=2 FACE="Courier New">class</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">=</FONT><I><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;com.erudine.</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">My</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">Convertor&quot;</FONT></I><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">/&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">variable-instance</FONT><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#7F007F" SIZE=2 FACE="Courier New">class</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">=</FONT><I><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;org.jbpm.context.exe.variableinstance.StringInstance&quot;</FONT></I><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">/&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#008080" SIZE=2 FACE="Courier New">&lt;/</FONT><FONT COLOR="#3F7F7F" SIZE=2 FACE="Courier New">jbpm-type</FONT><FONT COLOR="#008080" SIZE=2 FACE="Courier New">&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have written a Junit test case to verify that the number of types returned by the call</FONT> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">JbpmType.</FONT><I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">getJbpmTypes</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">()</FONT><FONT SIZE=2 FACE="Arial"> matches the number the is declared in the modified mapping file.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">MyMatcher class just contains a &quot;return obj instanceof MyClass&quot; in it and the convertor object just returns a constant test string as the conversion to and from the database.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">If I step through the list of the JbpmTypes from the object factory calling match() with an instant of MyClass I get a null pointer from the JbpmType that I think corresponds to the one I have written.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">If I run a workflow ProcessInstance containing an action handler that attempts to store an instance of MyClass I get an hibernate exception complaining that I was attempting to put a non persistent variable into a persistent store.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Any suggestions would be helpful, I am at my wits end trying to get this fixed &#8230; I expect I have missed a simple step somewhere.</FONT></P>

<P><B><FONT FACE="Times New Roman">___________________________</FONT></B><FONT FACE="Times New Roman"> </FONT>

<BR><B><FONT SIZE=2 FACE="Arial">Andrew Norman</FONT></B>

<BR><FONT SIZE=2 FACE="Arial">Developer</FONT>

<BR><A HREF="http://www.erudine.com/"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">www.erudine.com</FONT></U></A>

<BR><FONT SIZE=2 FACE="Arial">T: +44 (0) 1423 522 336</FONT>

<BR><FONT SIZE=2 FACE="Arial">M: +44 (0) 7824 310 089</FONT>

<BR><FONT SIZE=1 FACE="Arial">This email and any files transmitted with it are confidential and solely for the use of the intended recipient. If you receive this email in error, then please inform the sender and delete it from your inbox. Although this email has been checked for all known viruses, it is recommended that recipients undertake their own virus checking as Erudine will not accept any liability for any damage caused. Finally, any opinions expressed in this email are those of the individual and do not necessarily reflect the views of Erudine as a company.</FONT> </P>

<P><FONT SIZE=1 FACE="Arial">Erudine is a trading name of Remote Operations Ltd. and is registered in England and Wales with No.04280731. Registered Office: Kent House, Church Street, Gateshead, NE8 2AT.</FONT></P>
<BR>
<BR>

</BODY>
</HTML>