Denna,
I don't know much about JBPM and how it affects your processing
> setPrimaryContact(aUser);
> aUser.addToDealsForPriContact(this);
These two lines seem redundant (first one should automatically create
reverse relationship), but they are still correct and shouldn't cause
any problems...
> {
> String aUserRole="Sales Team";
> SystemUser aUser=getNextUserFromUserRole(aUserRole);
> //System.out.println(aUser);
> setPrimaryContact(aUser);
> aUser.addToDealsForPriContact(this);
> dataContext.commitChanges();
> }
> But in our real application we are using JBPM(Java Business Process
> Management) workflow. If I call this method from workflow xml then
> it won't work. I am not getting any error or any message but if i
> print primary contact right after setting it, state is "modified",
> but there is no data in database.(I am using postgresql)
I know nothing about JBPM.... But what's important is whether the
data gets to the database AFTER the commit. Of course you won't see
any changes until they are saved. Your print statement is before the
commit, try also checking it after. Also do you see Cayenne-generated
SQL output - I wonder what is printed during the commit?
Andrus
This archive was generated by hypermail 2.0.0 : Thu Jul 07 2005 - 03:08:40 EDT