[jboss-user] [jBPM Users] - Entity variable
juanignaciosl
do-not-reply at jboss.com
Fri Dec 4 09:03:44 EST 2009
I'm developing a Seam/jBPM4 web application. I can already hot deploy processes through the web interface, start and signal processes, storing String and Integer variables within them...
My problem arises when I try to attach and store an entity variable. My application and jBPM share the same datasource, but I know mine uses JPA and jBPM uses Hibernate, so there's sort of mismatch. I tried the no-brainer: adding my entity as a variable and saving, but it obviously won't work:
org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.pvm.internal.type.variable.UnpersistableVariable is not a: org.jbpm.pvm.internal.type.Variable
I've debugged jBPM code and I've reached org.jbpm.pvm.internal.type.matcher.HibernateIdMatcher. The line where my variable will become "UnpersistableVariable" is sessionFactory.getClassMetadata(value.getClass()), which will return null.
How should I configure class metadata?
Can I share the entity between jBPM and Seam?
Can I somehow hot deploy classes and metadata? (maybe in a .bar file)
I've searched through the documentation and examples, but there's not much information on hibernate entities as variables.
Thank you in advance!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269015#4269015
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269015
More information about the jboss-user
mailing list