Probably through plain JDBC (there are user and groups tables), but that is the domain of the JBoss Identity component, with which I haven't been able to play yet ...
added some users and groups over the api.. adding users works but adding groups failes.. without any exception.
IdentityService ids = processEngine.getIdentityService();
ids.createGroup("salesmanager", "salesmanagertyp", "manager");
ids.createUser("tina", "Tina", "Family","firstname.lastname@example.org");
ids.createMembership("tina", "salesmanager"); <- this causes an "group doesnt exist" exception... realy strange
even cant add a group and find it later over id, simply doesnt exist.
ok i had a mistake, you have to use the ID which is returned by the creation.
meanwhile i have multiple groups with the same name and ID, because the ID consists of "type.name" -_-
cant delete them because you can only search for groups with UNIQUE ID otherwise exception.