Come on, is there realy no one who can help me?
I think it must be possible by deleting the Membership on the Database with this:
"delete from org.jbpm.identity.Membership as m where m.id = ?1 "
and delete the Membership from the User and Group Object in JBPM
I can't remove a Membership from a User
the Group Objects have
.setMemberships( memberships );
but the User Objects has only .addMembership( ... )
I didn'T find a way :(
Can't you let hibernate take care of this?
I mean you can do Session.delete(membership)...
Haven't tried it though.
The deleting on the Database is not realy the Problem.
The Problem is, that the Memberships are still in use by other Objects like User and Group whitch are have a Hash-Table of there memberships.
And the User didn't have a methode to delete a Membership. Only Group have setMemberships. The User have only addMembership :(
I thought that doing a session.delete of a membership will also remove this membership out of the collections in user and group.
This because the membership is a hibernate object and calling delete removes the object from the session (so also from the mapped collection in the same hibernate session).
But like I said I didn't really try that.
Thanks for the fast answer, and sorry for the delay but i was ill.
Hmm, after thinking a little about it, i think u are right and Hibernate will manage this for me.