Adding user is not easy as adding user to it's JBPM_ID_USER table.
Follwing is neccessary during adding a user.
1) Add a user to it's JBPM_ID_USER and note your USER_ID
2) Check JBPM_ID_GROUP table to find the ID corresponding to user role and note it as GROUP_ID
(This is neccessary because as per current context a user should have at least an user role)
3) Go to JBPM_ID_MEMBERSHIP table and make sure that the USER_ID(noted step-1) should have atleast GROUP_ID(noted step-2)
However for additional role to be added for a user you can add additional GROUP_ID found in JBPM_ID_GROUP table and subsequently be inserted them in JBPM_ID_MEMBERSHIP table. But remember that your custom user should have atleast a user role found in JBPM_ID_GROUP table.
If you can check the dependency between the tables mentioned at step 1-2 and 3 then you will definitely understand the described story. check ER- diagram for them as well.Hope that this will solve your problem well.
Well, firs of all let me thank you your help soumya, and your time too.
I've worked with the database and the problem was there. I used an example script which came with the book to update the users (there were in the correct JBPM table). But the user I was trying to use was set as "participant" (apart from his properly TASKS group). I changed that "participant" role by "user" and it worked.
My question is, how can I change the level of the role "participant" to let it logging correctly? Because I have a lot of other users, as participants, and I would like to keep them with that role, and being able to log correctly.
Or if you know where I can find information It would be very useful.
Thanks a lot,
For a role X make sure that the user that you have added must have an user role.
So you need to do two things
1) All user should have X role.
2) Additionally all user should have user role.
Therefore all user_id must corresponds to a group_id(that you have created in JBPM_ID_GROUP table) and additionally a group_id(corresponds to user
role) in JBPM_ID_MEMBERSHIP table.
Ok, I'll work on it.
Thanks a lot!!