I am trying to get a non serialisable object to be stored in the context of a workflow process.
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.
<jbpm-type>
<matcher>
<bean class="com.erudine.MyMatcher" />
</matcher>
<converter class="com.erudine.MyConvertor" />
<variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance" />
</jbpm-type>
I have written a Junit test case to verify that the number of types returned by the call JbpmType.getJbpmTypes() matches the number the is declared in the modified mapping file.
MyMatcher class just contains a "return obj instanceof MyClass" in it and the convertor object just returns a constant test string as the conversion to and from the database.
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.
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.
Any suggestions would be helpful, I am at my wits end trying to get this fixed … I expect I have missed a simple step somewhere.
___________________________
Andrew Norman
Developer
www.erudine.com
T: +44 (0) 1423 522 336
M: +44 (0) 7824 310 089
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.
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.