-
1. Re: Problems with setProcessDefinition over reflection and G
camunda Mar 3, 2006 5:20 AM (in response to camunda)Hi all,
has nobody a hint for me?
Thanks
Bernd -
2. Re: Problems with setProcessDefinition over reflection and G
aguizar Mar 3, 2006 2:27 PM (in response to camunda)Bernd, how about updating the database directly? By using reflective access you are most probably bypassing the bytecode enhancement.
-
3. Re: Problems with setProcessDefinition over reflection and G
tom.baeyens Mar 4, 2006 3:07 AM (in response to camunda)i don't know about the reflection problem. the way you code it should be ok. if you started from processInstance.getClass().getDeclaredMethod(...) then you could have a problem that you had to solve by searching the super classes recursively.
direct db access should not be necessary.
maybe it is because the hibernate proxy is not yet initialized. try initializing explicitely with Hibernate.initializeProxy or somthing like that. maybe the proxies have a cache of all the members... what happens when you save the process instance ?
you could also add a jira issue to ask for a setter on the version.
regards, tom. -
4. Re: Problems with setProcessDefinition over reflection and G
brianmb99 Mar 5, 2006 3:27 AM (in response to camunda)Hello,
The hibernate proxy object can be got at this way:Session session = jbpmSession.getSession(); Serializable identifier = jbpmSession.getSession().getIdentifier(processInstance); Object proxy = session.get(ProcessInstance.class, identifier);
But what if anything can be done with that I'm not sure. I tried setting fields in the proxy object with no success. I'm really new at hibernate, but I would think there should be some way to set arbitrary fields of a proxied object, as long as it's a hibernate-managed mapping.
I'm thinking maybe a net.sf.hibernate.Interceptor could work for this problem?
-Brian -
5. Re: Problems with setProcessDefinition over reflection and G
camunda Mar 10, 2006 2:04 PM (in response to camunda)OK, the problem is solved in jbpm HEAD, because a setter is introduced :-)
see http://jira.jboss.com/jira/browse/JBPM-585.
So I will not waste more time on this issue.
Thanks a lot Tom!