Bill, Is it possible that your ForEach is starting a subprocess where there also is a process variable role?
Looking at the screenshot, it appear you are indeed persisting the same Role twice (leading to two JPAPersistedVariables), both referring to the same entity (id=1). But the processId seems to be different, and the name of the variable as well, which seems to indicate that the variable is persisted in separate processes. In that case, it would make sense to have two JPAPersistedVariables. Kris Quoting Bill Tarr <[email protected]>: > I'm seeing some strange behavior in the JPAPersistedVariable. > > In this case, my Claim has 2 Role objects. So my Claim workflow has > a ForEach, passing in a Role to each. > > Here is the console output, notice the same Role @Entity having > JPAPersistedVariable objects added for them twice. > > Variable claim -> Persisting external Entity for the first time > =com.csatp.svc.rulesmgr.claim.Claim @ 3881fab4 > Saving JPAPersistedVariable id=1 entityId=1 > class=com.csatp.svc.rulesmgr.claim.Claim > value=com.csatp.svc.rulesmgr.claim.Claim @ 51414b4 > <<<<< Persisting variable claim = com.csatp.svc.rulesmgr.claim.Claim > @ 51414b4 > > Variable 3:2:role -> Updating external Entity = > com.csatp.svc.rulesmgr.claim.Role @ a87f09d8 > Saving JPAPersistedVariable id=2 entityId=1 > class=com.csatp.svc.rulesmgr.claim.Role > value=com.csatp.svc.rulesmgr.claim.Role @ a87f09d8 > <<<<< Persisting variable 3:2:role = > com.csatp.svc.rulesmgr.claim.Role @ a87f09d8 > > Variable 3:3:role -> Updating external Entity = > com.csatp.svc.rulesmgr.claim.Role @ b3ee9f8b > Saving JPAPersistedVariable id=3 entityId=2 > class=com.csatp.svc.rulesmgr.claim.Role > value=com.csatp.svc.rulesmgr.claim.Role @ b3ee9f8b > <<<<< Persisting variable 3:3:role = > com.csatp.svc.rulesmgr.claim.Role @ b3ee9f8b > > Variable role -> Updating external Entity = > com.csatp.svc.rulesmgr.claim.Role @ a87f09d8 > Saving JPAPersistedVariable id=4 entityId=1 > class=com.csatp.svc.rulesmgr.claim.Role > value=com.csatp.svc.rulesmgr.claim.Role @ a87f09d8 > <<<<< Persisting variable role = com.csatp.svc.rulesmgr.claim.Role @ > a87f09d8 > > Variable role -> Updating external Entity = > com.csatp.svc.rulesmgr.claim.Role @ b3ee9f8b > Saving JPAPersistedVariable id=5 entityId=2 > class=com.csatp.svc.rulesmgr.claim.Role > value=com.csatp.svc.rulesmgr.claim.Role @ b3ee9f8b > <<<<< Persisting variable role = com.csatp.svc.rulesmgr.claim.Role @ > b3ee9f8b > > I've attached a screenshot of my SQL Server, lets see if it gets > scrubbed out... > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
