This content has been marked as final.
Show 1 reply
-
1. Re: JbpmSession - HibernateException: Found shared reference
jsanmarco Sep 21, 2005 10:35 AM (in response to jsanmarco)Hi,
the HibernateException wasn't related to the cyclic aspect of the process definition.
In some action class I had the following:SimpleVO vo = (SimpleVO) processInstance.getContextInstance().getVariable("simpleVO"); vo.setValue(newValue); processInstance.getContextInstance().setVariable("simpleVO",vo);
The second time this action was executed caused the org.hibernate.HibernateException: Found shared references to a collection.
To solve this problem I did the following:SimpleVO vo = (SimpleVO) processInstance.getContextInstance().getVariable("simpleVO"); vo.setValue(newValue); //delete the old variable first processInstance.getContextInstance().deleteVariable("simpleVO"); processInstance.getContextInstance().setVariable("simpleVO",vo);
The difference is the previous deletion of the variable 'simpleVO'. I don't know if there is a better way to modify a variable rather than deleting and recreating it.
Regards,
Juan Manuel