Hi,
we use open session in view. I would like to store some Booleans to db, it is stored, but
no converter is set, so it si later read as String, which makes Exception.
Problem is that when I set variables their values are converted with converters. To find
the right converter Converters.getConverterMaps() is used. It creates new converter map
for given objectFactory. But when when values are stored, ConverterEnumType ask Converters
for id Converters.getConverterId((Converter) value); . It uses the same method
Converters.getConverterMaps() but with different object factory. Converters to
convertersMap are created again and the key to map is converter itself (not its class) so
method Converters.getConverterId(Converter converter) returns null. Why two different
object factories are used in single request? There is the same session. My middle layer
code looks like this:
public void startProcess(final StartEvent startEvent, final String transition){
getTemplate().execute(new JbpmCallback(){
public Object doInJbpm(JbpmContext context) throws JbpmException{
org.jbpm.graph.exe.ProcessInstance processInstance =
context.newProcessInstanceForUpdate(startEvent.getProcess().getName());
processInstance.getContextInstance().setVariables(startEvent);
processInstance.signal(transition);
return null;
}});
}
We use spring jbpm module and spring is configured so that callback is wrapped in
transaction. But all the actions form single request are in one session (open session in
view) and every in its own transaction. But this time the only action was startProcess.
StartEvent is our class which implements map for process variables, and is typed (has
process as attribute).
Thanks for your help
Fero
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197810#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...