0 Replies Latest reply on Feb 12, 2009 4:55 AM by Andrew Norman

    Context Variable Mappings

    Andrew Norman Newbie

      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>




      <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.