I use multi tenancy in one database with Activiti by prefixing process definitions and executions with some tenant identity. This seems to work so far. Now in case I need to remove a tenant from the database or doing a backup of only the tenant's data what about the dependencies of all those Activiti tables? Ok - some relations are quite obvious because there are foreign keys defined. But some relations are not known to the database. What are these? Or even more specific: Given the tenant prefix "TENANT-XYZ" what do for instance select statements for all tables look like to get the desired records for just this tenant?
Sorry for bothering you again. But the references aren't as obvious to me as expected. So could you please have a look at what I've put together so far? Things unclear to me are marked with a "?". "=>" stands for a foreign key. "->" might be a reference without a foreign key definition.
In short, we try to make naming as clear as possible, so all assumptions you made for tables referenced is correct. Only for users/groups, there is no hard link with the identity-tables, as you can plug in alternative identity-management (e.g. LDAP) that doesn't use the act_id_* tables.