Hi,

we have developed a workaround to update running processes to a new version. 
This also needs to change the processDefinition attribute in ProcessInstance. 
Because there is no setter, we have done it over reflection:


  |             Field field = 
ProcessInstance.class.getDeclaredField("processDefinition");
  |             field.setAccessible(true);
  |             field.set(pi, newDef);
  |             field.setAccessible(false);
  | 

Now, this does not work any more with 3.1, because of the enhanced classes 
(Hibernate uses CGLIB ByteCode Enhancement for Lazy Loading), as we can see in 
the log:


  | 2006-02-23 16:58:04,693 WARN  
[com.camunda.toolkit.jbpm.service.AdminServicesImpl] class = class 
org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$5835a02d
  | 2006-02-23 16:58:04,693 WARN  
[com.camunda.toolkit.jbpm.service.AdminServicesImpl] super-class = class 
org.jbpm.graph.exe.ProcessInstance
  | 

The behavior is strange, we set the field (no Exception!), but after the call 
the processDefinition has not changed!

How can we set this field over reflection of the GCLIB? Google has not helped 
very much on this issue :-(

Thanks for hints!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925871#3925871

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925871


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to