Actually I had the same problem when overriding other jbpm objects, so I finally wrote a
method like this to get to the target object from the proxies...
public static Object narrowProxy(Object maybeProxy) {
| if (maybeProxy == null)
| throw new IllegalArgumentException("cannot narrow null");
| if ( maybeProxy instanceof HibernateProxy ) {
| HibernateProxy proxy = (HibernateProxy) maybeProxy;
| LazyInitializer li = proxy.getHibernateLazyInitializer();
| return li.getImplementation();
| //get the real object where the proxy is working on.
| //if the proxy is not initialized then it will be initialized here
| } else
| return maybeProxy;
| }
|
This code has more to do with hibernate, but if someone extends the Jbpm objects then it
might be useful
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979694#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...